177 virtual void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
186 virtual bool removeRows(
int row,
int column = 0,
const QModelIndex& parent = QModelIndex())
override;
193 virtual int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
202 virtual QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
212 virtual bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
220 virtual QHash<int, QByteArray>
roleNames()
const override;
Represents a single chat message entry.
Definition vreChatWindowModel.h:28
QString message() const
Gets the content of the message.
DtChatEntry(const std::string &username, int force, const std::string &channel, const std::string &message)
Constructor.
void setChannel(QString val)
Sets the channel for the message.
double opacity() const
Gets the opacity of the message in the UI.
void setOpacity(double val)
Sets the opacity of the message in the UI.
void setTimerStarted(bool val)
Sets the timer started flag for message fading.
void setForce(int val)
Sets the force identifier of the sender.
QString username() const
Gets the username of the message sender.
bool myVisible
Flag indicating if the message is visible in the UI.
Definition vreChatWindowModel.h:118
QString channel() const
Gets the channel the message was sent to.
bool myTimerStarted
Flag indicating if the fade timer has started.
Definition vreChatWindowModel.h:115
QString myUsername
Username of the message sender.
Definition vreChatWindowModel.h:100
bool timerStarted() const
Checks if the message fade timer has started.
void setMessage(QString val)
Sets the content of the message.
QString myMessage
Content of the chat message.
Definition vreChatWindowModel.h:109
bool visible() const
Checks if the message is visible in the UI.
void setUsername(QString val)
Sets the username of the message sender.
int myForce
Force identifier of the sender (friendly=1, enemy=2, etc.)
Definition vreChatWindowModel.h:106
double myOpacity
Opacity of the message in the UI (0.0 to 1.0)
Definition vreChatWindowModel.h:112
void setVisible(bool val)
Sets the visibility of the message in the UI.
~DtChatEntry()=default
Default destructor.
QString myChannel
Channel the message was sent to.
Definition vreChatWindowModel.h:103
int force() const
Gets the force identifier of the sender.
virtual void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
Sorts the model contents.
virtual void addChat(const DtChatEntry &entry)
Adds a new chat message to the model.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Gets the number of chat entries in the model.
virtual bool removeRows(int row, int column=0, const QModelIndex &parent=QModelIndex()) override
Removes rows from the model.
virtual bool setData(const QModelIndex &index, const QVariant &value, int role) override
Sets data for a specific role and index.
virtual QHash< int, QByteArray > roleNames() const override
Maps role enum values to role name strings.
virtual ~DtVreChatModel() override=default
Default destructor.
virtual void clear()
Clears all messages from the model.
QList< DtChatEntry > myChat
List of chat entries in the model.
Definition vreChatWindowModel.h:226
ChatRoles
Enumeration of data roles for accessing chat entry properties.
Definition vreChatWindowModel.h:138
@ OpacityRole
Role for accessing the message opacity.
Definition vreChatWindowModel.h:143
@ UsernameRole
Role for accessing the sender's username.
Definition vreChatWindowModel.h:139
@ TimerStartedRole
Role for accessing the timer started flag.
Definition vreChatWindowModel.h:144
@ ChannelRole
Role for accessing the message channel.
Definition vreChatWindowModel.h:140
@ MessageRole
Role for accessing the message content.
Definition vreChatWindowModel.h:142
@ ForceRole
Role for accessing the sender's force identifier.
Definition vreChatWindowModel.h:141
@ VisibleRole
Role for accessing the message visibility.
Definition vreChatWindowModel.h:145
DtVreChatModel(QObject *parent=nullptr)
Constructor.
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Gets data for a specific role and index.
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