VR-Engage  2.2
Loading...
Searching...
No Matches
makVrv::DtVirtualRealitySettingsLogic Class Reference

Detailed Description

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)
 
DtVirtualRealitySettingsLogicoperator= (const DtVirtualRealitySettingsLogic &other)
 

Persistence slots

DtDe & myDe
 
DtVirtualRealitySettingsInterfacemyInterface
 
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 *)
 

Constructor & Destructor Documentation

◆ DtVirtualRealitySettingsLogic() [1/3]

makVrv::DtVirtualRealitySettingsLogic::DtVirtualRealitySettingsLogic ( )
private

Default constructor (private)

This constructor is private to prevent creating the logic without the required dependencies.

Referenced by DtVirtualRealitySettingsLogic(), and operator=().

◆ DtVirtualRealitySettingsLogic() [2/3]

makVrv::DtVirtualRealitySettingsLogic::DtVirtualRealitySettingsLogic ( const DtVirtualRealitySettingsLogic & other)
private

Copy constructor (private)

Parameters
otherThe 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().

◆ DtVirtualRealitySettingsLogic() [3/3]

makVrv::DtVirtualRealitySettingsLogic::DtVirtualRealitySettingsLogic ( DtDe & de,
DtVirtualRealitySettingsInterface & gui,
DtPersistenceControlsInterface & persistenceGui )

Constructor.

Parameters
deReference to the display engine
guiReference to the VR settings GUI interface
persistenceGuiReference 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().

◆ ~DtVirtualRealitySettingsLogic()

virtual makVrv::DtVirtualRealitySettingsLogic::~DtVirtualRealitySettingsLogic ( )
virtual

Virtual destructor.

Cleans up resources and disconnects signal connections established during the lifetime of this object.

Member Function Documentation

◆ operator=()

DtVirtualRealitySettingsLogic & makVrv::DtVirtualRealitySettingsLogic::operator= ( const DtVirtualRealitySettingsLogic & other)
private

Assignment operator (private)

Parameters
otherThe object to assign from
Returns
Reference to this object

This operator is private to prevent assigning the logic object, as it maintains connections and state that shouldn't be duplicated.

References DtVirtualRealitySettingsLogic().

◆ sendSettingsToGui()

virtual void makVrv::DtVirtualRealitySettingsLogic::sendSettingsToGui ( )
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.

◆ slot_enabledChanged()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_enabledChanged ( bool enabled)
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.

Parameters
enabledNew enabled state (true if enabled, false if disabled)

◆ slot_mirroringChanged()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_mirroringChanged ( makArchives::DtVirtualRealitySettingsRecord::DtMirroring view)
protectedvirtual

Handles changes to the mirroring mode from the UI.

Parameters
viewNew 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.

◆ slot_mirrorChannelChanged()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_mirrorChannelChanged ( std::string channelName)
protectedvirtual

Handles changes to the mirror channel from the UI.

Parameters
channelNameName 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.

◆ slot_attachedObserverChanged()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_attachedObserverChanged ( std::string observer)
protectedvirtual

Handles changes to the attached observer from the UI.

Parameters
observerName 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.

◆ slot_flipOverlaysChanged()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_flipOverlaysChanged ( bool flip)
protectedvirtual

Handles changes to the flip overlays setting from the UI.

Parameters
flipNew 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.

◆ slot_enabledUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_enabledUpdated ( bool enabled)
protectedvirtual

this function is called when the settings manager changes the mirror setting so the gui can be updated

◆ slot_mirroringUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_mirroringUpdated ( makArchives::DtVirtualRealitySettingsRecord::DtMirroring view)
protectedvirtual

this function is called when the settings manager changes the mirror setting so the gui can be updated

◆ slot_mirrorChannelUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_mirrorChannelUpdated ( std::string enabled)
protectedvirtual

this function is called when the settings manager changes the mirror channel so the gui can be updated

◆ slot_channelsUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_channelsUpdated ( )
protectedvirtual

this function is called when the settings manager changes the available channels so the gui can be updated

◆ slot_observersUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_observersUpdated ( )
protectedvirtual

this function is called when the settings manager changes the available observers so the gui can be updated

◆ slot_observerRemoved()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_observerRemoved ( const DtObserver * obs)
protectedvirtual

this function is called when an observer is removed and needs to be taken out of GUI list

◆ slot_attachedObserverUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_attachedObserverUpdated ( std::string observerName)
protectedvirtual

this function is called with the settings manager changes the attached observer so the gui can be updated

◆ slot_flipOverlaysUpdated()

virtual void makVrv::DtVirtualRealitySettingsLogic::slot_flipOverlaysUpdated ( bool flip)
protectedvirtual

this function is called when the settings manager changes the flip overlays setting so the gui can be updated

◆ on_import()

void makVrv::DtVirtualRealitySettingsLogic::on_import ( )
protected

this function is called when the import settings button is pressed

◆ on_export()

void makVrv::DtVirtualRealitySettingsLogic::on_export ( )
protected

this function is called when the export settings button is pressed

◆ on_importFilePathChosen()

void makVrv::DtVirtualRealitySettingsLogic::on_importFilePathChosen ( const std::string & filePath)
protected

this function is called when the import file path chosen button is pressed

◆ on_exportFilePathChosen()

void makVrv::DtVirtualRealitySettingsLogic::on_exportFilePathChosen ( const std::string & filePath)
protected

this function is called when the export path chosen button is pressed

◆ settingsRestored()

virtual void makVrv::DtVirtualRealitySettingsLogic::settingsRestored ( const DtSettingsBackup * )
protectedvirtual

Called when settings are restored. Resets GUI if the restored object type is of this class.

Member Data Documentation

◆ myDe

DtDe& makVrv::DtVirtualRealitySettingsLogic::myDe
protected

this function is called when the import settings button is pressed

◆ myInterface

DtVirtualRealitySettingsInterface& makVrv::DtVirtualRealitySettingsLogic::myInterface
protected

this function is called when the import settings button is pressed

◆ myPersistenceControls

DtPersistenceControlsInterface& makVrv::DtVirtualRealitySettingsLogic::myPersistenceControls
protected

this function is called when the import settings button is pressed

◆ myConnections

DtSignalConnectionManager makVrv::DtVirtualRealitySettingsLogic::myConnections
protected

this function is called when the import settings button is pressed


The documentation for this class was generated from the following file: