|
VR-Engage
2.2
|
This class implements a checkable menu item that allows users to toggle the virtual reality mode on and off. When checked, the application enters VR mode and begins rendering to the VR headset. When unchecked, the application returns to standard display mode.
#include <DtVirtualRealityMenuItem.h>
Public Member Functions | |
| DtVirtualRealityMenuItem (DtDe &de) | |
| virtual | ~DtVirtualRealityMenuItem () |
| QAction * | createAction (DtDe &de, QWidget *parent) |
Protected Member Functions | |
| virtual void | setValue (bool value) |
| virtual bool | getValue () const |
| makVrv::DtVirtualRealityMenuItem::DtVirtualRealityMenuItem | ( | DtDe & | de | ) |
Constructor.
| de | Reference to the display engine |
Initializes a new VR menu item associated with the specified display engine. The menu item state will reflect the current VR enabled state of the display engine.
References de().
|
virtual |
Virtual destructor.
Cleans up resources associated with the VR menu item.
| QAction * makVrv::DtVirtualRealityMenuItem::createAction | ( | DtDe & | de, |
| QWidget * | parent ) |
Creates a QAction for this menu item.
| de | Reference to the display engine |
| parent | Parent widget for the QAction |
Creates and configures a QAction that represents this menu item in the UI. The action is connected to the display engine's signals to keep its state synchronized with the VR enabled state.
Overrides the base class implementation to add VR-specific connections.
References de().
|
protectedvirtual |
Sets the enabled state of the VR system.
| value | True to enable VR mode, false to disable it |
This method is called when the menu item is triggered by the user. It enables or disables the VR system in the display engine based on the value.
Overrides the base class implementation to handle VR-specific state changes.
|
protectedvirtual |
Gets the current VR enabled state.
Returns the current enabled state of the VR system from the display engine.
Overrides the base class implementation to retrieve the VR-specific state.