|
VR-Engage
2.2
|
This class implements the business logic for the Virtual Reality settings user interface. It serves as a mediator between the UI components and the underlying VR system settings. The class connects to UI signals to handle user inputs and updates the system settings accordingly. It also listens for changes in the VR system and updates the UI to reflect those changes, ensuring bidirectional synchronization.
#include <DtVirtualRealitySettingsLogic.h>
Public Member Functions | |
| DtVirtualRealitySettingsLogic (DtDe &de, DtVirtualRealitySettingsInterface &gui, DtPersistenceControlsInterface &persistenceGui) | |
| virtual | ~DtVirtualRealitySettingsLogic () |
| virtual void | sendSettingsToGui () |
Protected Member Functions | |
UI Change Handler Methods | |
| virtual void | slot_enabledChanged (bool enabled) |
| virtual void | slot_mirroringChanged (makArchives::DtVirtualRealitySettingsRecord::DtMirroring view) |
| virtual void | slot_mirrorChannelChanged (std::string channelName) |
| virtual void | slot_attachedObserverChanged (std::string observer) |
| virtual void | slot_flipOverlaysChanged (bool flip) |
Settings Change Handler Methods | |
this function is called when the settings manager changes whether or not VR is enabled so the gui can be updated | |
| virtual void | slot_enabledUpdated (bool enabled) |
| virtual void | slot_mirroringUpdated (makArchives::DtVirtualRealitySettingsRecord::DtMirroring view) |
| virtual void | slot_mirrorChannelUpdated (std::string enabled) |
| virtual void | slot_channelsUpdated () |
| virtual void | slot_observersUpdated () |
| virtual void | slot_observerRemoved (const DtObserver *obs) |
| virtual void | slot_attachedObserverUpdated (std::string observerName) |
| virtual void | slot_flipOverlaysUpdated (bool flip) |
Private Member Functions | |
| DtVirtualRealitySettingsLogic () | |
| DtVirtualRealitySettingsLogic (const DtVirtualRealitySettingsLogic &other) | |
| DtVirtualRealitySettingsLogic & | operator= (const DtVirtualRealitySettingsLogic &other) |
Persistence slots | |
| DtDe & | myDe |
| DtVirtualRealitySettingsInterface & | myInterface |
| DtPersistenceControlsInterface & | myPersistenceControls |
| DtSignalConnectionManager | myConnections |
| void | on_import () |
| void | on_export () |
| void | on_importFilePathChosen (const std::string &filePath) |
| void | on_exportFilePathChosen (const std::string &filePath) |
| virtual void | settingsRestored (const DtSettingsBackup *) |
|
private |
Default constructor (private)
This constructor is private to prevent creating the logic without the required dependencies.
Referenced by DtVirtualRealitySettingsLogic(), and operator=().
|
private |
Copy constructor (private)
| other | The object to copy from |
This constructor is private to prevent copying the logic object, as it maintains connections and state that shouldn't be duplicated.
References DtVirtualRealitySettingsLogic().
| makVrv::DtVirtualRealitySettingsLogic::DtVirtualRealitySettingsLogic | ( | DtDe & | de, |
| DtVirtualRealitySettingsInterface & | gui, | ||
| DtPersistenceControlsInterface & | persistenceGui ) |
Constructor.
| de | Reference to the display engine |
| gui | Reference to the VR settings GUI interface |
| persistenceGui | Reference to the persistence controls interface |
Initializes the logic with references to the display engine, settings GUI, and persistence controls. It establishes connections between the GUI signals and the corresponding logic slots, as well as connections from the VR settings to update the GUI when settings change from other sources.
References de().
|
virtual |
Virtual destructor.
Cleans up resources and disconnects signal connections established during the lifetime of this object.
|
private |
Assignment operator (private)
| other | The object to assign from |
This operator is private to prevent assigning the logic object, as it maintains connections and state that shouldn't be duplicated.
References DtVirtualRealitySettingsLogic().
|
virtual |
Updates the GUI to reflect the current VR settings.
Retrieves the current settings from the VR system and updates all GUI controls to match those settings. This method is called during initialization and whenever the settings are changed from outside the GUI.
|
protectedvirtual |
Handles changes to the VR enabled state from the UI.
This slot is called when the user toggles the VR enabled checkbox in the UI. It updates the VR system settings to match the new state selected by the user.
| enabled | New enabled state (true if enabled, false if disabled) |
|
protectedvirtual |
Handles changes to the mirroring mode from the UI.
| view | New mirroring mode selected by the user |
This slot is called when the user selects a different mirroring mode from the dropdown in the UI. It updates the VR system settings to use the new mirroring mode.
|
protectedvirtual |
Handles changes to the mirror channel from the UI.
| channelName | Name of the channel selected by the user |
This slot is called when the user selects a different mirror channel from the dropdown in the UI. It updates the VR system settings to use the new mirror channel.
|
protectedvirtual |
Handles changes to the attached observer from the UI.
| observer | Name of the observer selected by the user |
This slot is called when the user selects a different observer from the dropdown in the UI. It updates the VR system settings to attach the HMD view to the selected observer.
|
protectedvirtual |
Handles changes to the flip overlays setting from the UI.
| flip | New flip overlays state (true if enabled, false if disabled) |
This slot is called when the user toggles the flip overlays checkbox in the UI. It updates the VR system settings to apply or remove the vertical flip to overlays as requested.
|
protectedvirtual |
this function is called when the settings manager changes the mirror setting so the gui can be updated
|
protectedvirtual |
this function is called when the settings manager changes the mirror setting so the gui can be updated
|
protectedvirtual |
this function is called when the settings manager changes the mirror channel so the gui can be updated
|
protectedvirtual |
this function is called when the settings manager changes the available channels so the gui can be updated
|
protectedvirtual |
this function is called when the settings manager changes the available observers so the gui can be updated
|
protectedvirtual |
this function is called when an observer is removed and needs to be taken out of GUI list
|
protectedvirtual |
this function is called with the settings manager changes the attached observer so the gui can be updated
|
protectedvirtual |
this function is called when the settings manager changes the flip overlays setting so the gui can be updated
|
protected |
this function is called when the import settings button is pressed
|
protected |
this function is called when the export settings button is pressed
|
protected |
this function is called when the import file path chosen button is pressed
|
protected |
this function is called when the export path chosen button is pressed
|
protectedvirtual |
Called when settings are restored. Resets GUI if the restored object type is of this class.
|
protected |
this function is called when the import settings button is pressed
|
protected |
this function is called when the import settings button is pressed
|
protected |
this function is called when the import settings button is pressed
|
protected |
this function is called when the import settings button is pressed