VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreStartPageQml Class Reference

Detailed Description

DtVreStartPageQml provides the interface between the C++ backend and the QML frontend of the start page. It manages the selection state, scenario descriptions, SMS information, and button actions, exposing these to QML for the user interface.

#include <vreStartPage.h>

Inheritance diagram for makVre::DtVreStartPageQml:
[legend]

Public Types

enum  ButtonAction { HOST , UNHOST , NONE }
 

Public Slots

virtual void setButtonAction (ButtonAction ba)
 
virtual void setSelectedFile (QString file)
 
virtual void setDescription (QString description)
 
virtual void setSMS (QString sms)
 

Signals

void buttonClicked (ButtonAction btnAction)
 
void fileSelected (QString file)
 
void descriptionChanged (QString description)
 
void smsChanged (QString sms)
 
void sessionStarted ()
 
void sessionJoined ()
 
void propertiesChanged ()
 

Public Member Functions

 DtVreStartPageQml (QObject *parent=nullptr)
 
virtual ~DtVreStartPageQml () override
 
void setDescriptionInformation ()
 
 Q_ENUM (ButtonAction)
 
virtual ButtonAction getButtonAction () const
 
virtual QString getSelectedFile () const
 
virtual QString getDescription () const
 
virtual QString getSMS () const
 
virtual Q_INVOKABLE void startSession ()
 
virtual Q_INVOKABLE void joinSession ()
 
virtual Q_INVOKABLE void resetProperties ()
 

Protected Attributes

QString mySelectedFile
 
ButtonAction myButtonAction
 
QString myDescription
 
QString mySms
 
DtPlayerStationAppmyApp
 

Properties

ButtonAction buttonAction
 
QString description
 
QString sms
 
QString selectedFile
 

Member Enumeration Documentation

◆ ButtonAction

Enumeration of possible button actions.

Defines the possible states for the main action button in the UI.

Enumerator
HOST 

Host a new session with the selected scenario.

UNHOST 

Stop hosting the current session.

NONE 

No action available.

Constructor & Destructor Documentation

◆ DtVreStartPageQml()

makVre::DtVreStartPageQml::DtVreStartPageQml ( QObject * parent = nullptr)
explicit

Constructor.

Parameters
parentOptional parent QObject for memory management

Creates a new QML interface for the start page.

◆ ~DtVreStartPageQml()

virtual makVre::DtVreStartPageQml::~DtVreStartPageQml ( )
overridevirtual

Destructor.

Cleans up resources used by the QML interface.

Member Function Documentation

◆ setDescriptionInformation()

void makVre::DtVreStartPageQml::setDescriptionInformation ( )

Updates the description information from the selected file.

Loads and sets the description text based on the currently selected file. This is called automatically when a new file is selected.

◆ Q_ENUM()

makVre::DtVreStartPageQml::Q_ENUM ( ButtonAction )

◆ getButtonAction()

virtual ButtonAction makVre::DtVreStartPageQml::getButtonAction ( ) const
virtual

Gets the current button action state.

Returns
Current button action state

Returns the current button action state for the UI.

◆ getSelectedFile()

virtual QString makVre::DtVreStartPageQml::getSelectedFile ( ) const
virtual

Gets the currently selected file.

Returns
Path to the selected file

Returns the path to the currently selected file.

◆ getDescription()

virtual QString makVre::DtVreStartPageQml::getDescription ( ) const
virtual

Gets the current description text.

Returns
Description text

Returns the description text for the selected scenario.

◆ getSMS()

virtual QString makVre::DtVreStartPageQml::getSMS ( ) const
virtual

Gets the current SMS information.

Returns
SMS information text

Returns the SMS (System Management Status) information.

◆ startSession()

virtual Q_INVOKABLE void makVre::DtVreStartPageQml::startSession ( )
virtual

Starts a new session as host.

QML-invokable method that initiates a new session using the selected scenario, with this instance as the host. Emits the sessionStarted signal.

◆ joinSession()

virtual Q_INVOKABLE void makVre::DtVreStartPageQml::joinSession ( )
virtual

Joins an existing session.

QML-invokable method that joins an existing session using the current settings. Emits the sessionJoined signal.

◆ resetProperties()

virtual Q_INVOKABLE void makVre::DtVreStartPageQml::resetProperties ( )
virtual

Resets properties to their default values.

QML-invokable method that resets all property values to their defaults. Emits the propertiesChanged signal.

◆ setButtonAction

virtual void makVre::DtVreStartPageQml::setButtonAction ( ButtonAction ba)
virtualslot

Sets the button action state.

Parameters
baNew button action state

Updates the button action state and emits the buttonClicked signal.

◆ setSelectedFile

virtual void makVre::DtVreStartPageQml::setSelectedFile ( QString file)
virtualslot

Sets the selected file.

Parameters
filePath to the newly selected file

Updates the selected file and emits the fileSelected signal. Also triggers a description update.

◆ setDescription

virtual void makVre::DtVreStartPageQml::setDescription ( QString description)
virtualslot

Sets the description text.

Parameters
descriptionNew description text

Updates the description text and emits the descriptionChanged signal.

References description.

◆ setSMS

virtual void makVre::DtVreStartPageQml::setSMS ( QString sms)
virtualslot

Sets the SMS information.

Parameters
smsNew SMS information text

Updates the SMS information and emits the smsChanged signal.

References sms.

◆ buttonClicked

void makVre::DtVreStartPageQml::buttonClicked ( ButtonAction btnAction)
signal

Signal emitted when the button action changes.

Parameters
btnActionNew button action state

◆ fileSelected

void makVre::DtVreStartPageQml::fileSelected ( QString file)
signal

Signal emitted when a file is selected.

Parameters
filePath to the selected file

◆ descriptionChanged

void makVre::DtVreStartPageQml::descriptionChanged ( QString description)
signal

Signal emitted when the description changes.

Parameters
descriptionNew description text

References description.

◆ smsChanged

void makVre::DtVreStartPageQml::smsChanged ( QString sms)
signal

Signal emitted when the SMS information changes.

Parameters
smsNew SMS information text

References sms.

◆ sessionStarted

void makVre::DtVreStartPageQml::sessionStarted ( )
signal

Signal emitted when a session is started.

◆ sessionJoined

void makVre::DtVreStartPageQml::sessionJoined ( )
signal

Signal emitted when a session is joined.

◆ propertiesChanged

void makVre::DtVreStartPageQml::propertiesChanged ( )
signal

Signal emitted when properties are reset.

Member Data Documentation

◆ mySelectedFile

QString makVre::DtVreStartPageQml::mySelectedFile
protected

Path to the selected file.

◆ myButtonAction

ButtonAction makVre::DtVreStartPageQml::myButtonAction
protected

Current button action state.

◆ myDescription

QString makVre::DtVreStartPageQml::myDescription
protected

Current description text.

◆ mySms

QString makVre::DtVreStartPageQml::mySms
protected

Current SMS information text.

◆ myApp

DtPlayerStationApp* makVre::DtVreStartPageQml::myApp
protected

Pointer to the player station application.

Provides access to application services and state. Not owned by this class, simply a convenience pointer.

Property Documentation

◆ buttonAction

ButtonAction makVre::DtVreStartPageQml::buttonAction
readwrite

Current button action state.

QML property that exposes the current button action state (HOST, UNHOST, NONE). This determines which actions are available in the UI.

◆ description

QString makVre::DtVreStartPageQml::description
readwrite

Scenario description.

QML property that exposes the description text for the selected scenario.

Referenced by descriptionChanged(), and setDescription().

◆ sms

QString makVre::DtVreStartPageQml::sms
readwrite

SMS configuration information.

QML property that exposes the SMS (System Management Status) information.

Referenced by setSMS(), and smsChanged().

◆ selectedFile

QString makVre::DtVreStartPageQml::selectedFile
readwrite

Currently selected file.

QML property that exposes the path of the currently selected file.


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