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