|
VR-Engage
2.2
|
This component provides a Qt Quick-based user interface overlay for the spectator role. It displays information, controls, and notifications specific to spectators, allowing them to interact with the simulation through a graphical interface. The overlay manages persistent notifications and provides spectator-specific UI elements.
#include <spectatorOverlay.h>
Public Member Functions | |
| DtSpectatorOverlay () | |
| virtual | ~DtSpectatorOverlay () override |
| virtual bool | initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual void | initdoc (QQuickItem *root) override |
| virtual bool | isPersistentNotificationVisible () |
| virtual bool | isSpectator () |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtQtQuickOverlay | |
| DtQtQuickOverlay () | |
| virtual | ~DtQtQuickOverlay () override |
| virtual bool | postInitialize () override |
| virtual void | setRoot (QQuickItem *root) |
| virtual DtVreMessageResult | handleEnterPlayerState (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleExitPlayerState (DtVreMessage *msg) |
| virtual void | setVisibility (bool visible) |
| virtual bool | isVisible () |
| virtual void | setMenuState (bool on) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| std::shared_ptr< DtPlayerStationPersistentNotification > | myPersistentNotification |
| bool | mySpectator |
Protected Attributes inherited from makVre::DtQtQuickOverlay | |
| DtInitTable | myBindQmlPropertyToAttribute |
| QQuickItem * | myRoot |
| std::string | myTargetWindow |
| std::vector< Connection > | myConnections |
| std::string | myQmlFile |
| std::string | myQmlDataItemName |
| bool | myIsInMenuState |
| bool | myCachedVisibility |
| DtAttributeHandleType< bool > | myVisibilityAttribute |
| bool | myRenderOverlayOnly |
| bool | myWantSceneHidden |
| makVrv::DtOsgChannel * | myChannel |
| makVrv::DtObserverObject * | myObserver |
| QObject | myQObject |
| bool | myHasTickFunction |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtQtQuickOverlay | |
| virtual void | updateVals (double dt) |
| virtual void | disconnect () |
| virtual bool | buildConnections (DtInitTable &connections) |
| virtual void | onVisibilityAttributeChanged (bool on) |
| virtual void | removeModelSetAndSkyFromChannel () |
| virtual void | restoreModelSetAndSkyToChannel () |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtSpectatorOverlay::DtSpectatorOverlay | ( | ) |
Constructor.
| className | Name of the class (used for logging and identification) |
Creates a new spectator overlay with the specified class name
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the overlay component.
| player | Pointer to the player station |
| config | Reference to the initialization configuration |
Sets up the overlay and loads the Qt Quick UI
Reimplemented from makVre::DtQtQuickOverlay.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates overlay state each frame.
| dt | Delta time since the last update in seconds |
Updates overlay elements based on current simulation state
Reimplemented from makVre::DtQtQuickOverlay.
|
overridevirtual |
Performs cleanup when the component is shut down.
Releases overlay resources and cleans up UI elements
Reimplemented from makVre::DtQtQuickOverlay.
|
overridevirtual |
Initializes the Qt Quick document with the root item.
| root | Pointer to the root QQuickItem |
Connects Qt Quick signals and slots and initializes UI elements
Reimplemented from makVre::DtQtQuickOverlay.
|
virtual |
Checks if the persistent notification is visible.
Determines whether the persistent notification is currently displayed
|
virtual |
Checks if the current player is a spectator.
Determines whether the current player is in spectator mode
|
overridevirtual |
Returns the component type identifier.
Reimplemented from makVre::DtQtQuickOverlay.
|
protected |
Shared pointer to the persistent notification.
Manages the persistent notification displayed to the spectator
|
protected |
Flag indicating if the player is in spectator mode.