VR-Engage  2.2
Loading...
Searching...
No Matches
makVrv::DtVirtualRealityMenuItem Class Reference

Detailed Description

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>

Inheritance diagram for makVrv::DtVirtualRealityMenuItem:
[legend]

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
 

Constructor & Destructor Documentation

◆ DtVirtualRealityMenuItem()

makVrv::DtVirtualRealityMenuItem::DtVirtualRealityMenuItem ( DtDe & de)

Constructor.

Parameters
deReference 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().

◆ ~DtVirtualRealityMenuItem()

virtual makVrv::DtVirtualRealityMenuItem::~DtVirtualRealityMenuItem ( )
virtual

Virtual destructor.

Cleans up resources associated with the VR menu item.

Member Function Documentation

◆ createAction()

QAction * makVrv::DtVirtualRealityMenuItem::createAction ( DtDe & de,
QWidget * parent )

Creates a QAction for this menu item.

Parameters
deReference to the display engine
parentParent widget for the QAction
Returns
Newly created QAction instance

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().

◆ setValue()

virtual void makVrv::DtVirtualRealityMenuItem::setValue ( bool value)
protectedvirtual

Sets the enabled state of the VR system.

Parameters
valueTrue 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.

◆ getValue()

virtual bool makVrv::DtVirtualRealityMenuItem::getValue ( ) const
protectedvirtual

Gets the current VR enabled state.

Returns
True if VR mode is enabled, false otherwise

Returns the current enabled state of the VR system from the display engine.

Overrides the base class implementation to retrieve the VR-specific state.


The documentation for this class was generated from the following file: