VR-Engage  2.2
Loading...
Searching...
No Matches
DtVirtualRealitySettingsPage.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file DtVirtualRealitySettingsPage.h
7//! \brief Defines the settings page for virtual reality configuration
8//! \ingroup vrvVirtualRealityQt
9//!
10//! This file contains the DtVirtualRealitySettingsPage class which implements
11//! a page in the application settings dialog for configuring virtual reality options.
12//! The page integrates with the DtPage framework and provides a UI for adjusting
13//! all VR-related settings.
14
15#pragma once
16
20
21#include <vrvCoreQt/DtPage.h>
22
23namespace makVrv
24{
25class DtPersistenceToolbarWidget;
28
29//! \brief Settings page for configuring Virtual Reality options
30//!
31//! This class implements a settings page that allows users to configure
32//! virtual reality options through a graphical interface. It integrates with
33//! the application's settings dialog system by extending DtPage. The page
34//! contains controls for enabling/disabling VR, configuring mirroring options,
35//! selecting observer attachments, and other VR-specific settings.
36//! \ingroup vrvVirtualRealityQt
37class DT_DLL_VRVVRQT DtVirtualRealitySettingsPage : public DtPage
38{
39 Q_OBJECT
40
41public:
42 //! \brief Constructor
43 //! \param de Reference to the display engine
44 //! \param parent Parent widget for this page
45 //! \param f Window flags for the page widget
46 //!
47 //! Initializes a new VR settings page with references to the display engine
48 //! and parent widget. Creates the settings widget, logic, and toolbar components
49 //! needed for the page to function.
50 DtVirtualRealitySettingsPage(DtDe& de, QWidget* parent, Qt::WindowFlags f = Qt::Widget);
51
52 //! \brief Virtual destructor
53 //!
54 //! Cleans up resources associated with the VR settings page, including
55 //! the settings widget, logic, and toolbar components.
57
58 //! \brief Gets the icon for this page
59 //! \return QIcon representing the VR settings page
60 //!
61 //! Returns the icon that represents this page in the settings dialog.
62 //! For VR settings, this is typically a VR headset icon.
63 virtual QIcon icon();
64
65 //! \brief Gets the title for this page
66 //! \return QString containing the page title
67 //!
68 //! Returns the title that is displayed for this page in the settings dialog.
69 //! For VR settings, this is typically "Virtual Reality".
70 virtual QString title();
71
72 //! \brief Gets the class name of this page
73 //! \return Reference to a string containing the class name
74 //!
75 //! Returns the class name of this page, which is used for identification
76 //! and persistence purposes in the settings system.
77 virtual const std::string& pageClassName() const;
78
79 //! \brief Gets the class name of this page type (static method)
80 //! \return Reference to a string containing the class name
81 //!
82 //! Static method that returns the class name of the VR settings page.
83 //! This is used by the page creator and settings system to identify
84 //! and instantiate the correct page type.
85 static const std::string& thePageClassName();
86
87protected:
88 //! \brief Sets up the user interface components
89 //!
90 //! Creates and arranges the UI components including the settings widget
91 //! and toolbar. This method is called from the constructor.
92 //!
93 //! \note This method is intentionally non-virtual since it's called from the constructor.
94 void setupGui();
95
96 //! \brief Called when the page is displayed
97 //!
98 //! This method is called when the user navigates to this page in the
99 //! settings dialog. It updates the UI to reflect the current VR settings
100 //! and prepares the page for user interaction.
101 virtual void activate();
102
103 //! \brief Called when the page is hidden
104 //!
105 //! This method is called when the user navigates away from this page
106 //! in the settings dialog. It performs any necessary cleanup or state
107 //! saving operations.
108 virtual void deactivate();
109
110protected:
111 //! \brief The main settings widget containing VR configuration controls
113
114 //! \brief The business logic that connects the UI to the VR system
116
117 //! \brief Toolbar widget for persistence controls (save, restore, etc.)
118 DtPersistenceToolbarWidget* myToolbar;
119
120 //! \brief Container widget for the main layout
121 QWidget* myMainWidget;
122};
123
124//! \brief Creator type for instantiating VR settings pages
125//!
126//! This typedef defines a creator class that can instantiate VR settings
127//! pages. It uses the DtPageCreatorTemplate to implement the standard
128//! page creation interface expected by the settings system.
129typedef DtPageCreatorTemplate<DtVirtualRealitySettingsPage> DtVirtualRealitySettingsPageCreator;
130} // namespace makVrv
Defines the interface for virtual reality settings configuration.
Defines the widget for virtual reality settings configuration.
Business logic for the Virtual Reality settings user interface.
Definition DtVirtualRealitySettingsLogic.h:41
virtual const std::string & pageClassName() const
Gets the class name of this page.
virtual ~DtVirtualRealitySettingsPage()
Virtual destructor.
void setupGui()
Sets up the user interface components.
virtual void deactivate()
Called when the page is hidden.
virtual void activate()
Called when the page is displayed.
DtVirtualRealitySettingsWidget * myWidget
The main settings widget containing VR configuration controls.
Definition DtVirtualRealitySettingsPage.h:112
virtual QIcon icon()
Gets the icon for this page.
DtVirtualRealitySettingsLogic * myLogic
The business logic that connects the UI to the VR system.
Definition DtVirtualRealitySettingsPage.h:115
virtual QString title()
Gets the title for this page.
static const std::string & thePageClassName()
Gets the class name of this page type (static method)
DtVirtualRealitySettingsPage(DtDe &de, QWidget *parent, Qt::WindowFlags f=Qt::Widget)
Constructor.
QWidget * myMainWidget
Container widget for the main layout.
Definition DtVirtualRealitySettingsPage.h:121
DtPersistenceToolbarWidget * myToolbar
Toolbar widget for persistence controls (save, restore, etc.)
Definition DtVirtualRealitySettingsPage.h:118
Widget for displaying and editing virtual reality settings.
Definition DtVirtualRealitySettingsWidget.h:33
Definition appLauncherComponent.h:28
DtPageCreatorTemplate< DtVirtualRealitySettingsPage > DtVirtualRealitySettingsPageCreator
Creator type for instantiating VR settings pages.
Definition DtVirtualRealitySettingsPage.h:129
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.
Main header file for the VRV Virtual Reality Qt module.