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