VR-Engage  2.2
Loading...
Searching...
No Matches
DtVirtualRealityMenuItem.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file DtVirtualRealityMenuItem.h
7//! \brief Defines the VR menu item class for enabling/disabling virtual reality functionality
8//! \ingroup vrvVirtualRealityQt
9//!
10//! This file contains the DtVirtualRealityMenuItem class which provides a menu item
11//! that users can interact with to enable or disable the virtual reality mode within
12//! the application. It extends DtCheckedItem to provide toggle functionality.
13
14#pragma once
15
17#include <vrvCoreQt/DtCheckedItem.h>
18
19namespace makVrv
20{
21//! \brief Menu item for enabling and disabling virtual reality mode
22//!
23//! This class implements a checkable menu item that allows users to toggle
24//! the virtual reality mode on and off. When checked, the application enters
25//! VR mode and begins rendering to the VR headset. When unchecked, the application
26//! returns to standard display mode.
27//! \ingroup vrvVirtualRealityQt
28class DT_DLL_VRVVRQT DtVirtualRealityMenuItem : public DtCheckedItem
29{
30public:
31 //! \brief Constructor
32 //! \param de Reference to the display engine
33 //!
34 //! Initializes a new VR menu item associated with the specified display engine.
35 //! The menu item state will reflect the current VR enabled state of the display engine.
37
38 //! \brief Virtual destructor
39 //!
40 //! Cleans up resources associated with the VR menu item.
42
43 //! \brief Creates a QAction for this menu item
44 //! \param de Reference to the display engine
45 //! \param parent Parent widget for the QAction
46 //! \return Newly created QAction instance
47 //!
48 //! Creates and configures a QAction that represents this menu item in the UI.
49 //! The action is connected to the display engine's signals to keep its state
50 //! synchronized with the VR enabled state.
51 //!
52 //! Overrides the base class implementation to add VR-specific connections.
53 QAction* createAction(DtDe& de, QWidget* parent);
54
55protected:
56 //! \brief Sets the enabled state of the VR system
57 //! \param value True to enable VR mode, false to disable it
58 //!
59 //! This method is called when the menu item is triggered by the user.
60 //! It enables or disables the VR system in the display engine based on the value.
61 //!
62 //! Overrides the base class implementation to handle VR-specific state changes.
63 virtual void setValue(bool value);
64
65 //! \brief Gets the current VR enabled state
66 //! \return True if VR mode is enabled, false otherwise
67 //!
68 //! Returns the current enabled state of the VR system from the display engine.
69 //!
70 //! Overrides the base class implementation to retrieve the VR-specific state.
71 virtual bool getValue() const;
72};
73} // namespace makVrv
virtual ~DtVirtualRealityMenuItem()
Virtual destructor.
QAction * createAction(DtDe &de, QWidget *parent)
Creates a QAction for this menu item.
virtual void setValue(bool value)
Sets the enabled state of the VR system.
virtual bool getValue() const
Gets the current VR enabled state.
DtVirtualRealityMenuItem(DtDe &de)
Constructor.
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.
Main header file for the VRV Virtual Reality Qt module.