|
VR-Engage
2.3
|
DtWindowLayoutComponent changes the size and position of the main application window when a player engages in a role that includes this component, and restores the original window geometry when the player leaves the role. This allows different roles to have customized window layouts optimized for their specific needs.
#include <windowLayoutComponent.h>
Public Member Functions | |
| DtWindowLayoutComponent () | |
| virtual | ~DtWindowLayoutComponent () override |
| virtual bool | initialize (DtPlayerStation *station, DtInitTable &config) override |
| virtual DtInitTickStatus | finalizeInitTick (double dt) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| bool | componentReady () const |
| void | setComponentReady (bool ready) |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
| virtual const DtAttributeHandle & | ownshipState () const |
| virtual void | setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId()) |
Protected Member Functions | |
| virtual void | onCurrentStateChanged (std::string state) |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
Protected Attributes | |
| int | myHeight |
| int | myWidth |
| int | myPositionX |
| int | myPositionY |
| QRect | myCachedGeometry |
| QMainWindow * | myMainWindow |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| bool | myComponentReady = true |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtVreMessageHandlerGroup | myMessageHandlers |
| makVre::DtWindowLayoutComponent::DtWindowLayoutComponent | ( | ) |
Constructor for DtWindowLayoutComponent.
Initializes the component with default settings
|
overridevirtual |
Virtual destructor for DtWindowLayoutComponent.
|
overridevirtual |
Initializes the window layout component.
| station | Pointer to the player station this component belongs to |
| config | Configuration table containing window geometry settings |
Reads window geometry parameters from the configuration, including width, height, and position coordinates. Caches the current main window geometry to allow restoration when leaving the role or shutting down the component.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Called after postInitialize() to apply one-time window geometry.
| dt | Delta time since the last frame in seconds |
Applies the configured window geometry settings to the main application window. This runs during the LOADING_PLAYER_STATE phase before engaged tick.
Reimplemented from makVre::DtPlayerComponent.
|
inlineoverridevirtual |
Called every frame to update the component state.
| dt | Delta time since the last frame in seconds This component does not require per-frame updates, so this function is a no-op. |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the window layout component.
Restores the original window geometry that was cached during initialization and removes the state change callback
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the type identifier for this component.
Implements makVre::DtPlayerComponent.
|
protectedvirtual |
Handler for application state changes.
| state | The new application state name |
Applies configured window geometry when entering ENGAGED_STATE and restores the cached geometry when entering MENU_STATE
|
protected |
Configured window height in pixels.
|
protected |
Configured window width in pixels.
|
protected |
Configured window X position in screen coordinates.
|
protected |
Configured window Y position in screen coordinates.
|
protected |
Original window geometry cached during initialization.
|
protected |
Pointer to the main application window.