|
VR-Engage
2.2
|
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>
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 |
| DtPlayerStationApp * | myApp |
Properties | |
| ButtonAction | buttonAction |
| QString | description |
| QString | sms |
| QString | selectedFile |
|
explicit |
Constructor.
| parent | Optional parent QObject for memory management |
Creates a new QML interface for the start page.
|
overridevirtual |
Destructor.
Cleans up resources used by the QML interface.
| 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.
| makVre::DtVreStartPageQml::Q_ENUM | ( | ButtonAction | ) |
|
virtual |
Gets the current button action state.
Returns the current button action state for the UI.
|
virtual |
Gets the currently selected file.
Returns the path to the currently selected file.
|
virtual |
Gets the current description text.
Returns the description text for the selected scenario.
|
virtual |
Gets the current SMS information.
Returns the SMS (System Management Status) information.
|
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.
|
virtual |
Joins an existing session.
QML-invokable method that joins an existing session using the current settings. Emits the sessionJoined signal.
|
virtual |
Resets properties to their default values.
QML-invokable method that resets all property values to their defaults. Emits the propertiesChanged signal.
|
virtualslot |
Sets the button action state.
| ba | New button action state |
Updates the button action state and emits the buttonClicked signal.
|
virtualslot |
Sets the selected file.
| file | Path to the newly selected file |
Updates the selected file and emits the fileSelected signal. Also triggers a description update.
|
virtualslot |
Sets the description text.
| description | New description text |
Updates the description text and emits the descriptionChanged signal.
References description.
|
virtualslot |
Sets the SMS information.
| sms | New SMS information text |
Updates the SMS information and emits the smsChanged signal.
References sms.
|
signal |
Signal emitted when the button action changes.
| btnAction | New button action state |
|
signal |
Signal emitted when a file is selected.
| file | Path to the selected file |
|
signal |
Signal emitted when the description changes.
| description | New description text |
References description.
|
signal |
Signal emitted when the SMS information changes.
| sms | New SMS information text |
References sms.
|
signal |
Signal emitted when a session is started.
|
signal |
Signal emitted when a session is joined.
|
signal |
Signal emitted when properties are reset.
|
protected |
Path to the selected file.
|
protected |
Current button action state.
|
protected |
Current description text.
|
protected |
Current SMS information text.
|
protected |
Pointer to the player station application.
Provides access to application services and state. Not owned by this class, simply a convenience pointer.
|
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.
|
readwrite |
Scenario description.
QML property that exposes the description text for the selected scenario.
Referenced by descriptionChanged(), and setDescription().
|
readwrite |
SMS configuration information.
QML property that exposes the SMS (System Management Status) information.
Referenced by setSMS(), and smsChanged().
|
readwrite |
Currently selected file.
QML property that exposes the path of the currently selected file.