VR-Engage  2.3
Loading...
Searching...
No Matches
DtVirtualRealitySettingsInterface.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file DtVirtualRealitySettingsInterface.h
7//! \brief Defines the interface for virtual reality settings configuration
8//!
9//! This file contains the DtVirtualRealitySettingsInterface abstract class which defines
10//! the interface for configuring virtual reality settings through a GUI. It provides
11//! signals for notifying when settings are changed by the user and methods for updating
12//! the UI to reflect current settings.
13
14#pragma once
15
17
18#include "vrvVirtualReality/DtVirtualRealitySettingsRecord.h"
19
20#include <vrvUtil/signalslib.h>
21#include <vrvUtil/DtUnicode.h>
22
23#include <string>
24#include <vector>
25
26namespace makVrv
27{
28//! \brief Interface for virtual reality settings GUI interaction
29//!
30//! This abstract class defines the interface for interacting with the virtual reality
31//! settings GUI. It provides signals that are emitted when the user changes settings
32//! in the UI, and setter methods that allow the application to update the UI to
33//! reflect current settings. Implementations of this interface serve as the bridge
34//! between the UI and the underlying virtual reality system.
36{
37public:
38 //! \brief Virtual destructor
39 //!
40 //! Ensures proper cleanup of resources in derived classes.
42
43 //! \name Signal Declarations
44 //! @{
45 //! \brief Signal emitted when the VR enabled state is changed
46 //!
47 //! This signal is emitted when the user toggles the virtual reality
48 //! enabled checkbox in the UI.
49 //! \param enabled The new enabled state (true if enabled, false if disabled)
50 boost::signalslib::signal<void(bool)> signal_enabledChanged;
51
52 //! \brief Signal emitted when the mirroring mode is changed
53 //!
54 //! This signal is emitted when the user selects a different mirroring
55 //! option from the dropdown in the UI.
56 //! \param mirroring The new mirroring mode selected
57 boost::signalslib::signal<void(makArchives::DtVirtualRealitySettingsRecord::DtMirroring)> signal_mirroringChanged;
58
59 //! \brief Signal emitted when the mirror channel is changed
60 //!
61 //! This signal is emitted when the user selects a different channel
62 //! for mirroring the HMD view in the UI.
63 //! \param channelName The name of the selected mirror channel
64 boost::signalslib::signal<void(std::string)> signal_mirrorChannelChanged;
65
66 //! \brief Signal emitted when the attached observer is changed
67 //!
68 //! This signal is emitted when the user selects a different observer
69 //! to attach the HMD view to in the UI.
70 //! \param observerName The name of the selected observer
71 boost::signalslib::signal<void(std::string)> signal_attachedObserverChanged;
72
73 //! \brief Signal emitted when the flip overlays setting is changed
74 //!
75 //! This signal is emitted when the user toggles the flip overlays
76 //! checkbox in the UI. Flipping overlays may be necessary to correct
77 //! their orientation on certain HMD models.
78 //! \param flip True if overlays should be flipped, false otherwise
79 boost::signalslib::signal<void(bool)> signal_flipOverlaysChanged;
80 //@}
81
82 //! \name UI Update Methods
83 //! @{
84
85 //! \brief Updates the VR enabled state in the UI
86 //! \param enabled True to check the enabled checkbox, false to uncheck it
87 //!
88 //! Sets the state of the virtual reality enabled checkbox in the UI.
89 //! This should be called when the VR enabled state changes outside the UI.
90 virtual void setEnabled(bool enabled) = 0;
91
92 //! \brief Updates the mirroring mode in the UI
93 //! \param view The mirroring mode to select in the UI
94 //!
95 //! Sets the selected option in the mirroring mode dropdown in the UI.
96 //! This should be called when the mirroring mode changes outside the UI.
97 virtual void setMirroring(makArchives::DtVirtualRealitySettingsRecord::DtMirroring view) = 0;
98
99 //! \brief Updates the selected mirror channel in the UI
100 //! \param channelName The name of the channel to select in the UI
101 //!
102 //! Sets the selected option in the mirror channel dropdown in the UI.
103 //! This should be called when the mirror channel changes outside the UI.
104 virtual void setMirrorChannel(const std::string& channelName) = 0;
105
106 //! \brief Updates the VR hardware availability state in the UI
107 //! \param available True if VR hardware is available, false otherwise
108 //!
109 //! Enables or disables the VR settings controls based on hardware availability.
110 //! When hardware is unavailable, the UI should indicate this and disable
111 //! controls that require hardware to function.
112 virtual void setVirtualRealityAvailable(bool available) = 0;
113
114 //! \brief Updates the list of available mirror channels in the UI
115 //! \param names Vector of channel names to populate the dropdown with
116 //!
117 //! Populates the mirror channel dropdown with the provided list of channel names.
118 //! This should be called when the available channels change.
119 virtual void setChannelNames(const std::vector<std::string>& names) = 0;
120
121 //! \brief Updates the list of available observers in the UI
122 //! \param names Vector of observer names to populate the dropdown with
123 //!
124 //! Populates the observer dropdown with the provided list of observer names.
125 //! This should be called when the available observers change.
126 virtual void setObserverNames(const std::vector<std::string>& names) = 0;
127
128 //! \brief Updates the selected attached observer in the UI
129 //! \param observerName The name of the observer to select in the UI
130 //!
131 //! Sets the selected option in the observer dropdown in the UI.
132 //! This should be called when the attached observer changes outside the UI.
133 virtual void setAttachedObserver(const std::string& observerName) = 0;
134
135 //! \brief Updates the flip overlays setting in the UI
136 //! \param flip True to check the flip overlays checkbox, false to uncheck it
137 //!
138 //! Sets the state of the flip overlays checkbox in the UI. Flipping overlays
139 //! may be necessary to correct their orientation on certain HMD models.
140 //! This should be called when the flip overlays setting changes outside the UI.
141 virtual void setFlipOverlay(bool flip) = 0;
142
143 //! \brief Enables or disables the flip overlays control in the UI
144 //! \param enabled True to enable the control, false to disable it
145 //!
146 //! Enables or disables the flip overlays checkbox in the UI. This control
147 //! should be disabled when flipping overlays is not supported by the current
148 //! HMD model or configuration.
149 virtual void setFlipOverlayEnabled(bool enabled) = 0;
150
151 //@}
152};
153} // namespace makVrv
Interface for virtual reality settings GUI interaction.
Definition DtVirtualRealitySettingsInterface.h:36
boost::signalslib::signal< void(std::string)> signal_attachedObserverChanged
Signal emitted when the attached observer is changed.
Definition DtVirtualRealitySettingsInterface.h:71
virtual void setEnabled(bool enabled)=0
Updates the VR enabled state in the UI.
virtual void setVirtualRealityAvailable(bool available)=0
Updates the VR hardware availability state in the UI.
virtual void setChannelNames(const std::vector< std::string > &names)=0
Updates the list of available mirror channels in the UI.
virtual void setFlipOverlay(bool flip)=0
Updates the flip overlays setting in the UI.
virtual void setMirroring(makArchives::DtVirtualRealitySettingsRecord::DtMirroring view)=0
Updates the mirroring mode in the UI.
boost::signalslib::signal< void(bool)> signal_flipOverlaysChanged
Signal emitted when the flip overlays setting is changed.
Definition DtVirtualRealitySettingsInterface.h:79
boost::signalslib::signal< void(bool)> signal_enabledChanged
Signal emitted when the mirroring mode is changed.
Definition DtVirtualRealitySettingsInterface.h:50
virtual void setObserverNames(const std::vector< std::string > &names)=0
Updates the list of available observers in the UI.
virtual void setMirrorChannel(const std::string &channelName)=0
Updates the selected mirror channel in the UI.
boost::signalslib::signal< void(makArchives::DtVirtualRealitySettingsRecord::DtMirroring)> signal_mirroringChanged
Signal emitted when the mirroring mode is changed.
Definition DtVirtualRealitySettingsInterface.h:57
boost::signalslib::signal< void(std::string)> signal_mirrorChannelChanged
Signal emitted when the mirror channel is changed.
Definition DtVirtualRealitySettingsInterface.h:64
virtual ~DtVirtualRealitySettingsInterface()
Virtual destructor.
virtual void setAttachedObserver(const std::string &observerName)=0
Updates the selected attached observer in the UI.
virtual void setFlipOverlayEnabled(bool enabled)=0
Enables or disables the flip overlays control in the UI.
Definition appLauncherComponent.h:28
Main header file for the VRV Virtual Reality Qt module.