229 virtual void sendChatMessage(
const QString& message,
const QString& channel,
const int force);
247 Q_INVOKABLE
virtual void send(
const QString& message);
Provides attribute handling system for hierarchical data storage and manipulation.
Definition attributeCallback.h:166
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Data model for the chat window contents.
Definition vreChatWindowModel.h:128
QML interface for the VR-Engage chat system.
Definition vreChatWindow.h:89
void setCurrentUsername(QString username)
Sets the current username.
std::vector< ChannelInfo > myChannels
Definition vreChatWindow.h:316
QString myEntityRole
Definition vreChatWindow.h:310
DtVreChatModel * chatModel
Model containing chat messages for display.
Definition vreChatWindow.h:104
virtual Q_INVOKABLE void send(const QString &message)
Processes and sends a message or command.
void setChat(DtVreChatModel *model)
Sets the chat message model.
bool myUsingCustomUsername
Definition vreChatWindow.h:308
void currentUsernameChanged(QString username)
Signal emitted when the username changes.
DtFilename myDefaultChatConfigFile
Definition vreChatWindow.h:315
virtual void setUsingCustomUsername(bool usingCustom)
Sets whether to use a custom username instead of entity name.
Definition vreChatWindow.h:178
QString currentUsername
Current username for the chat system.
Definition vreChatWindow.h:101
virtual void sendSlashCommand(const QString &message)
Processes a slash command.
virtual void sendToSystemChannel(const std::string &message)
Sends a message to the system channel.
void setEntityRole(QString val)
Sets the entity role text for username generation.
Definition vreChatWindow.h:206
bool myPinChat
Definition vreChatWindow.h:320
DtPlayerStationApp & myApp
Definition vreChatWindow.h:326
DtVreChatQML(DtPlayerStationApp &app, QObject *parent=nullptr)
Constructor.
virtual Q_INVOKABLE QVariant getChannelInfo(int idx)
Gets information about a specific channel.
int myCurrentChannelIdx
Definition vreChatWindow.h:317
virtual void updateUsername()
Updates the username based on current settings.
virtual const std::vector< ChannelInfo > & getChannels() const
Gets the list of all available channels.
Definition vreChatWindow.h:165
void chatChanged()
Signal emitted when the chat model changes.
QString entityRole() const
Gets the entity role text for username generation.
Definition vreChatWindow.h:202
int myEntityForce
Definition vreChatWindow.h:311
virtual bool sendChannelCommand(const QString &channelCommand)
Processes a channel switching command.
virtual void switchToFirstAvailableChannel()
Switches to the first available channel.
virtual bool isChannelActive(const QString &channelName, int force)
Checks if a channel is currently active.
virtual void clearChannels()
Removes all channels from the chat system.
virtual QString entityMarkingText() const
Gets the entity marking text for username generation.
Definition vreChatWindow.h:186
virtual Q_INVOKABLE void cycleChannels(bool direction)
Cycles through available channels.
void pinChatChanged(bool pinned)
Signal emitted when the pinned state changes.
virtual int entityForce() const
Gets the entity force identifier for username generation.
Definition vreChatWindow.h:194
virtual ~DtVreChatQML() override
Virtual destructor.
virtual void updateAvailableChannels()
Updates the list of available channels in the UI.
virtual Q_INVOKABLE void togglePinChat()
Toggles the pinned state of the chat window.
bool pinChat
Flag indicating if the chat window is pinned (always visible)
Definition vreChatWindow.h:98
QScopedPointer< DtVreChatModel > myChatModel
Definition vreChatWindow.h:323
virtual void setEntityForce(int val)
Sets the entity force identifier for username generation.
Definition vreChatWindow.h:198
DtFilename myCurrentChatConfigFile
Definition vreChatWindow.h:314
int currentChannelIdx
Index of the currently active chat channel.
Definition vreChatWindow.h:95
QString myCurrentUsername
Definition vreChatWindow.h:307
virtual bool isUsingCustomUsername() const
Checks if a custom username is being used.
Definition vreChatWindow.h:182
QString myEntityMarkingText
Definition vreChatWindow.h:309
virtual QString getCurrentUsername()
Gets the current username.
void currentChannelIdxChanged(int channelIdx)
Signal emitted when the active channel changes.
virtual bool addChannel(const makVre::ChannelInfo &channelInfo, bool updateAvailableChannels=false)
Adds a channel to the available channels list.
virtual DtVreChatModel * getChat()
Gets the chat message model.
virtual void sendChatMessage(const QString &message, const QString &channel, const int force)
Sends a regular chat message to a specific channel.
static std::string convertTextToHTML(const std::string &inputText)
Converts plain text to HTML format for QML display.
virtual void setEntityMarkingText(QString val)
Sets the entity marking text for username generation.
Definition vreChatWindow.h:190
virtual bool isFullChatVisible()
Checks if the full chat window is visible.
virtual void togglePinChat()
Toggles the pinned state of the chat window.
DtVreChatWindow(DtPlayerStationApp &app)
Constructor.
makVre::DtVreMessageResult handlePlayerCreatedMessage(DtVreMessage *msg)
Handles messages about player entity creation.
DtFilename myDefaultChatConfigUserFilenamePostfix
Filename postfix for user-specific chat configurations.
Definition vreChatWindow.h:509
virtual void onCurrentStateChanged(std::string state)
Handles changes to the current application state.
makVre::DtVreMessageResult handlePlayerDestroyedMessage(DtVreMessage *msg)
Handles messages about player entity destruction.
virtual void openOrFocus()
Opens the chat window or gives it focus if already open.
DtFilename myDefaultConfigDirectory
Directory containing default configuration files.
Definition vreChatWindow.h:506
makVre::DtVreMessageResult handleIncomingChatMessage(DtVreMessage *msg)
Handles incoming chat messages.
DtVreChatQML * getChatObject()
Gets the chat QML object.
virtual bool updateChatChannelsFromConfigFile(const DtFilename &chatConfigFile)
Updates chat channels from a configuration file.
DtFilename myDefaultChatConfigFile
Path to the default chat configuration file.
Definition vreChatWindow.h:496
makVre::DtVreMessageResult handleVrfSessionStatusMessage(DtVreMessage *msg)
Handles session status messages.
virtual bool isVisible()
Checks if the chat window is currently visible.
std::unique_ptr< DtVreChatQML > myChatObject
Chat QML interface object.
Definition vreChatWindow.h:483
virtual void open()
Opens the chat window.
virtual void close()
Closes the chat window.
DtFilename myCurrentChatConfigFile
Path to the current chat configuration file in use.
Definition vreChatWindow.h:499
QQuickItem * myRoot
Root QML item for the chat window.
Definition vreChatWindow.h:488
DtFilename myDefaultChatConfigUserDirectory
Directory containing user-specific chat configurations.
Definition vreChatWindow.h:512
DtAttributeCallbackManager myAttributeCallbacks
Member-scope instance of Attribute callback manager.
Definition vreChatWindow.h:518
DtPlayerStationApp & myApp
Reference to the player station application.
Definition vreChatWindow.h:493
virtual void setVisibility(bool visible)
Sets the visibility of the chat window.
virtual ~DtVreChatWindow() override
Virtual destructor.
virtual bool updateChatChannelsFromScenario(const DtFilename &scenario)
Updates chat channels based on a scenario file.
DtFilename myDefaultConfigFilename
Default configuration filename.
Definition vreChatWindow.h:503
virtual DtFilename getChatConfigFile(const DtFilename &scenarioFilename)
Gets the chat configuration file for a scenario.
virtual void updatePositionFromState(const std::string &state)
Updates the chat window position based on application state.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
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
Q_DECLARE_METATYPE(makVre::ChannelInfo)
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Structure defining a chat communication channel.
Definition vreChatWindow.h:39
int force
Force identifier property exposed to QML.
Definition vreChatWindow.h:45
QString channel
Channel name property exposed to QML.
Definition vreChatWindow.h:42
ChannelInfo()=default
Default constructor.
QStringList entities
List of entities in this channel property exposed to QML.
Definition vreChatWindow.h:51
bool myActive
Flag indicating if this channel is currently active.
Definition vreChatWindow.h:74
ChannelInfo(QString ch, int f, bool a)
Constructor with parameters.
Definition vreChatWindow.h:61
bool active
Channel activation status property exposed to QML.
Definition vreChatWindow.h:48
QString myChannelName
Name of the communication channel.
Definition vreChatWindow.h:67
int myForce
Force identifier associated with this channel (Typically: 1=friendly, 2=enemy, 3=neutral,...
Definition vreChatWindow.h:71
QStringList myEntities
List of entities (participants) in this channel.
Definition vreChatWindow.h:77
Defines the data model for the chat window in VR-Engage.
Defines the base class for all VREngage messages.