20#include <QScopedPointer>
21#include <QAbstractListModel>
48 DtFileEntry(
const QString& fileName,
const QString& filePath);
124 virtual void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
133 virtual bool removeRows(
int row,
int column = 0,
const QModelIndex& parent = QModelIndex())
override;
140 virtual int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
148 virtual QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
157 virtual bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
165 virtual QHash<int, QByteArray>
roleNames()
const override;
375 virtual void tick(
double dt)
override;
417 virtual void appModeUpdated(
const std::string& newAppMode,
const std::string& oldAppMode)
override;
Class representing a file entry in the file selection models.
Definition vreStartPage.h:36
QString getFilePath() const
Gets the full path to the file.
QString myFileName
Display name of the file.
Definition vreStartPage.h:76
QString myFilePath
Full path to the file.
Definition vreStartPage.h:79
QString getFileName() const
Gets the display name of the file.
DtFileEntry()
Default constructor.
DtFileEntry(const QString &fileName, const QString &filePath)
Constructor with name and path.
void setFilePath(const QString &name)
Sets the full path to the file.
void setFileName(const QString &name)
Sets the display name of the file.
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Model for displaying files in a list view.
Definition vreStartPage.h:88
FileModelRoles
Enumeration of data roles for the model.
Definition vreStartPage.h:96
@ FileNameRole
Role for accessing the file name.
Definition vreStartPage.h:97
@ FilePathRole
Role for accessing the file path.
Definition vreStartPage.h:98
virtual void clear()
Clears all file entries from the model.
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Gets data for a specific index and role.
virtual void addFile(const DtFileEntry &entry)
Adds a file entry to the model.
QList< DtFileEntry > myFiles
List of file entries in the model.
Definition vreStartPage.h:170
virtual bool setData(const QModelIndex &index, const QVariant &value, int role) override
Sets data for a specific index and role.
virtual void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
Sorts the file entries.
virtual QHash< int, QByteArray > roleNames() const override
Gets the mapping from role IDs to role names.
virtual bool removeRows(int row, int column=0, const QModelIndex &parent=QModelIndex()) override
Removes rows from the model.
DtRecursiveFileModel(QObject *parent=0)
Constructor.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Gets the number of rows in the model.
virtual void initMain() override
Initializes the main content of the page.
virtual void setMenuVisibility(bool visible)
Sets the visibility of the menu part of the page.
DtVreStartPage(DtPlayerStationApp &app, const std::string &target_window="")
Constructor.
virtual void appModeUpdated(const std::string &newAppMode, const std::string &oldAppMode) override
Handles application mode changes.
DtRecursiveFileModel myTerrainsModel
Model containing available terrain files.
Definition vreStartPage.h:433
virtual DtVreStartPageQml * getSingleton() const
Gets the QML interface singleton.
virtual void tick(double dt) override
Updates the start page each frame.
QScopedPointer< DtVreStartPageQml > myQmlSingleton
QML interface singleton.
Definition vreStartPage.h:423
DtRecursiveFileModel myScenariosModel
Model containing available scenarios.
Definition vreStartPage.h:428
virtual void setVisibility(bool visible) override
Sets the visibility of the start page.
virtual ~DtVreStartPage() override
Destructor.
virtual void setVideoPlaying(bool visible)
Controls the background video playback.
QML interface for the start page.
Definition vreStartPage.h:180
void sessionStarted()
Signal emitted when a session is started.
virtual Q_INVOKABLE void resetProperties()
Resets properties to their default values.
virtual Q_INVOKABLE void startSession()
Starts a new session as host.
virtual ButtonAction getButtonAction() const
Gets the current button action state.
QString sms
SMS configuration information.
Definition vreStartPage.h:197
DtVreStartPageQml(QObject *parent=nullptr)
Constructor.
virtual void setButtonAction(ButtonAction ba)
Sets the button action state.
DtPlayerStationApp * myApp
Pointer to the player station application.
Definition vreStartPage.h:345
ButtonAction myButtonAction
Current button action state.
Definition vreStartPage.h:333
QString myDescription
Current description text.
Definition vreStartPage.h:336
virtual QString getDescription() const
Gets the current description text.
void setDescriptionInformation()
Updates the description information from the selected file.
void fileSelected(QString file)
Signal emitted when a file is selected.
void propertiesChanged()
Signal emitted when properties are reset.
virtual Q_INVOKABLE void joinSession()
Joins an existing session.
virtual QString getSelectedFile() const
Gets the currently selected file.
virtual void setSelectedFile(QString file)
Sets the selected file.
virtual void setSMS(QString sms)
Sets the SMS information.
ButtonAction
Enumeration of possible button actions.
Definition vreStartPage.h:227
@ UNHOST
Stop hosting the current session.
Definition vreStartPage.h:229
@ NONE
No action available.
Definition vreStartPage.h:230
@ HOST
Host a new session with the selected scenario.
Definition vreStartPage.h:228
QString mySms
Current SMS information text.
Definition vreStartPage.h:339
void sessionJoined()
Signal emitted when a session is joined.
virtual QString getSMS() const
Gets the current SMS information.
void smsChanged(QString sms)
Signal emitted when the SMS information changes.
virtual ~DtVreStartPageQml() override
Destructor.
virtual void setDescription(QString description)
Sets the description text.
QString mySelectedFile
Path to the selected file.
Definition vreStartPage.h:330
QString selectedFile
Currently selected file.
Definition vreStartPage.h:202
QString description
Scenario description.
Definition vreStartPage.h:192
void buttonClicked(ButtonAction btnAction)
Signal emitted when the button action changes.
ButtonAction buttonAction
Current button action state.
Definition vreStartPage.h:187
void descriptionChanged(QString description)
Signal emitted when the description changes.
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49