VR-Engage  2.2
Loading...
Searching...
No Matches
vreChatWindow.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file vreChatWindow.h
7//! \brief Defines the chat window component for in-application communication
8//!
9//! This file contains the classes that implement the chat functionality in VR-Engage,
10//! including the chat window UI, message handling, channel management, and text
11//! formatting. The chat system allows users to communicate with other participants
12//! in a simulation session through configurable channels.
13
14#pragma once
15
18
20
21#include "vreUtil/attribute.h"
22
23#include <QObject>
24
25class QQuickItem;
26
27namespace makVre
28{
30
31//! \brief Structure defining a chat communication channel
32//!
33//! ChannelInfo represents a communication channel in the chat system,
34//! characterized by a name, associated force (friendly, enemy, etc.),
35//! and activation status. This structure is designed to be accessible from QML
36//! through the Q_PROPERTY mechanism, allowing the UI to display and interact
37//! with channel information.
39{
40 Q_GADGET;
41 //! \brief Channel name property exposed to QML
42 Q_PROPERTY(QString channel MEMBER myChannelName);
43
44 //! \brief Force identifier property exposed to QML
45 Q_PROPERTY(int force MEMBER myForce);
46
47 //! \brief Channel activation status property exposed to QML
48 Q_PROPERTY(bool active MEMBER myActive);
49
50 //! \brief List of entities in this channel property exposed to QML
51 Q_PROPERTY(QStringList entities MEMBER myEntities);
52
53public:
54 //! \brief Default constructor
55 ChannelInfo() = default;
56
57 //! \brief Constructor with parameters
58 //! \param ch Channel name
59 //! \param f Force identifier (friendly=1, enemy=2, neutral=3, etc.)
60 //! \param a Activation status (true if channel is currently active)
61 ChannelInfo(QString ch, int f, bool a)
62 : myChannelName(ch)
63 , myForce(f)
64 , myActive(a) {};
65
66 //! \brief Name of the communication channel
68
69 //! \brief Force identifier associated with this channel
70 //! (Typically: 1=friendly, 2=enemy, 3=neutral, etc.)
71 int myForce = 0;
72
73 //! \brief Flag indicating if this channel is currently active
74 bool myActive = false;
75
76 //! \brief List of entities (participants) in this channel
77 QStringList myEntities;
78};
80
81//! \brief QML interface for the VR-Engage chat system
82//!
83//! DtVreChatQML provides the bridge between the C++ chat functionality and
84//! the QML-based UI. It exposes properties and methods that can be accessed
85//! from QML to display chat messages, manage channels, and send/receive
86//! communications. This class handles the business logic of the chat system,
87//! including message formatting, channel management, and command processing.
88class PLAYERSTATION_DLL DtVreChatQML : public QObject
89{
90 // Needed QT Objects
91 Q_OBJECT;
92
93 // Q_PROPERTY that can be set from qml
94 //! \brief Index of the currently active chat channel
96
97 //! \brief Flag indicating if the chat window is pinned (always visible)
98 Q_PROPERTY(bool pinChat MEMBER myPinChat NOTIFY pinChatChanged);
99
100 //! \brief Current username for the chat system
102
103 //! \brief Model containing chat messages for display
104 Q_PROPERTY(DtVreChatModel* chatModel READ getChat WRITE setChat NOTIFY chatChanged)
105
106public: // General Items
107 //! \brief Constructor
108 //! \param app Reference to the player station application
109 //! \param parent Parent QObject (default: nullptr)
110 //!
111 //! Creates a new chat QML interface associated with the specified application.
112 //! The interface will be initialized with default settings and an empty chat model.
113 explicit DtVreChatQML(DtPlayerStationApp& app, QObject* parent = nullptr);
114
115 //! \brief Virtual destructor
116 //!
117 //! Ensures proper cleanup of chat resources.
118 virtual ~DtVreChatQML() override;
119
120 //! \brief Sends a message to the system channel
121 //! \param message Text message to send to the system channel
122 //!
123 //! Sends a text message to the system notification channel, which is
124 //! typically used for system events, errors, and information messages.
125 //! These messages are visible to all users regardless of their channel settings.
126 virtual void sendToSystemChannel(const std::string& message);
127
128 //! \brief Converts plain text to HTML format for QML display
129 //! \param inputText Plain text to convert
130 //! \return HTML-formatted string
131 //!
132 //! Converts a plain text string to HTML format, handling special characters,
133 //! links, and other formatting needed for proper display in QML text components.
134 static std::string convertTextToHTML(const std::string& inputText);
135
136 //! \brief Adds a channel to the available channels list
137 //! \param channelInfo Information about the channel to add
138 //! \param updateAvailableChannels Whether to update the UI after adding the channel
139 //! \return True if channel was added successfully, false otherwise
140 //!
141 //! Adds a new communication channel to the chat system. If a channel with the
142 //! same name and force already exists, it will be updated instead.
143 virtual bool addChannel(const makVre::ChannelInfo& channelInfo, bool updateAvailableChannels = false);
144
145 //! \brief Updates the list of available channels in the UI
146 //!
147 //! Refreshes the available channels list in the QML interface to reflect
148 //! current channel state and availability.
150
151 //! \brief Removes all channels from the chat system
152 //!
153 //! Clears all channels from the chat system, typically used when
154 //! disconnecting from a session or changing scenarios.
155 virtual void clearChannels();
156
157 //! \brief Checks if a channel is currently active
158 //! \param channelName Name of the channel to check
159 //! \param force Force identifier of the channel
160 //! \return True if the channel is active, false otherwise
161 virtual bool isChannelActive(const QString& channelName, int force);
162
163 //! \brief Gets the list of all available channels
164 //! \return Constant reference to the vector of channel information
165 virtual const std::vector<ChannelInfo>& getChannels() const { return myChannels; }
166
167 //! \brief Switches to the first available channel
168 //!
169 //! Selects the first available channel as the active channel.
170 //! Used when initializing the chat or when the current channel becomes unavailable.
172
173 //! \brief Sets whether to use a custom username instead of entity name
174 //! \param usingCustom True to use custom username, false to use entity name
175 //!
176 //! Controls whether the chat system uses a custom username specified by the user
177 //! or automatically generates a username based on the entity information.
178 virtual void setUsingCustomUsername(bool usingCustom) { myUsingCustomUsername = usingCustom; }
179
180 //! \brief Checks if a custom username is being used
181 //! \return True if using custom username, false if using auto-generated name
182 virtual bool isUsingCustomUsername() const { return myUsingCustomUsername; }
183
184 //! \brief Gets the entity marking text for username generation
185 //! \return Current entity marking (call sign) text
186 virtual QString entityMarkingText() const { return myEntityMarkingText; }
187
188 //! \brief Sets the entity marking text for username generation
189 //! \param val New entity marking (call sign) text
190 virtual void setEntityMarkingText(QString val) { myEntityMarkingText = val; }
191
192 //! \brief Gets the entity force identifier for username generation
193 //! \return Current entity force identifier
194 virtual int entityForce() const { return myEntityForce; }
195
196 //! \brief Sets the entity force identifier for username generation
197 //! \param val New entity force identifier
198 virtual void setEntityForce(int val) { myEntityForce = val; }
199
200 //! \brief Gets the entity role text for username generation
201 //! \return Current entity role description
202 QString entityRole() const { return myEntityRole; }
203
204 //! \brief Sets the entity role text for username generation
205 //! \param val New entity role description
206 void setEntityRole(QString val) { myEntityRole = val; }
207
208 //! \brief Updates the username based on current settings
209 //!
210 //! Regenerates the username based on the current settings (custom or auto-generated).
211 //! Auto-generated usernames typically combine entity marking, force, and role.
212 virtual void updateUsername();
213
214 //! \brief Processes a slash command
215 //! \param message Command message starting with a slash (/)
216 //!
217 //! Handles special commands that begin with a slash character, such as
218 //! /help, /clear, /who, etc. This method is called from the send() method
219 //! when a message begins with a slash.
220 virtual void sendSlashCommand(const QString& message);
221
222 //! \brief Sends a regular chat message to a specific channel
223 //! \param message Text message to send
224 //! \param channel Target channel name
225 //! \param force Force identifier for the channel
226 //!
227 //! Sends a chat message to the specified channel. This method is called
228 //! from the send() method for regular (non-command) messages.
229 virtual void sendChatMessage(const QString& message, const QString& channel, const int force);
230
231 //! \brief Processes a channel switching command
232 //! \param channelCommand Command to switch channels (typically channel name)
233 //! \return True if channel switch was successful, false otherwise
234 //!
235 //! Handles commands to switch between communication channels. This can be
236 //! called directly or from a slash command like /channel [name].
237 virtual bool sendChannelCommand(const QString& channelCommand);
238
239public: // Invokable things
240 //! \brief Processes and sends a message or command
241 //! \param message Text message or command to process
242 //!
243 //! Main entry point for processing messages entered by the user. This method
244 //! determines whether the message is a command (starts with slash) or a regular
245 //! message, and routes it to the appropriate handler.
246 //! This method is invokable from QML.
247 Q_INVOKABLE virtual void send(const QString& message);
248
249 //! \brief Cycles through available channels
250 //! \param direction True to cycle forward, false to cycle backward
251 //!
252 //! Switches to the next or previous channel in the channel list based on the
253 //! direction parameter. This method is invokable from QML.
254 Q_INVOKABLE virtual void cycleChannels(bool direction);
255
256 //! \brief Gets information about a specific channel
257 //! \param idx Index of the channel to retrieve information for
258 //! \return QVariant containing the channel information
259 //!
260 //! Retrieves detailed information about a channel at the specified index.
261 //! The returned QVariant can be used in QML to display channel properties.
262 //! This method is invokable from QML.
263 Q_INVOKABLE virtual QVariant getChannelInfo(int idx);
264
265 //! \brief Toggles the pinned state of the chat window
266 //!
267 //! Switches between pinned (always visible) and unpinned (auto-hide) states
268 //! for the chat window. This method is invokable from QML.
269 Q_INVOKABLE virtual void togglePinChat();
270
271public:
272 //! \brief Gets the current username
273 //! \return Current username used in chat
274 virtual QString getCurrentUsername();
275
276 //! \brief Gets the chat message model
277 //! \return Pointer to the current chat model
279
280public slots:
281 //! \brief Sets the current username
282 //! \param username New username to use in chat
283 void setCurrentUsername(QString username);
284
285 //! \brief Sets the chat message model
286 //! \param model New chat model to use
288
289signals:
290 //! \brief Signal emitted when the username changes
291 //! \param username New username
292 void currentUsernameChanged(QString username);
293
294 //! \brief Signal emitted when the active channel changes
295 //! \param channelIdx Index of the new active channel
296 void currentChannelIdxChanged(int channelIdx);
297
298 //! \brief Signal emitted when the chat model changes
300
301 //! \brief Signal emitted when the pinned state changes
302 //! \param pinned New pinned state
303 void pinChatChanged(bool pinned);
304
305protected:
306 // For entities engaged
312
313 // For channels
316 std::vector<ChannelInfo> myChannels;
318
319 // For pinning chat.
321
322 // The actual chat model
323 QScopedPointer<DtVreChatModel> myChatModel;
324
325 // reference to the playstationapp
327};
328
329//! \brief Main chat window manager for VR-Engage
330//!
331//! DtVreChatWindow manages the chat window user interface in VR-Engage,
332//! including its visibility, position, and content. It serves as the primary
333//! interface between the application and the chat functionality, coordinating
334//! message handling, configuration loading, and UI state management. This class
335//! uses the DtVreChatQML class to bridge between C++ and the QML-based UI.
336class PLAYERSTATION_DLL DtVreChatWindow : public QObject
337{
338 Q_OBJECT;
339
340public:
341 //! \brief Constructor
342 //! \param app Reference to the player station application
343 //!
344 //! Creates a new chat window manager associated with the specified application.
345 //! The constructor initializes the chat UI and establishes necessary connections
346 //! to the message system for handling chat-related messages.
348
349 //! \brief Virtual destructor
350 //!
351 //! Ensures proper cleanup of chat window resources.
352 virtual ~DtVreChatWindow() override;
353
354 //! \brief Sets the visibility of the chat window
355 //! \param visible True to show the window, false to hide it
356 //!
357 //! Controls the visibility of the entire chat window. This affects the
358 //! root object of the chat UI, not individual components within it.
359 virtual void setVisibility(bool visible);
360
361 //! \brief Checks if the chat window is currently visible
362 //! \return True if the chat window is visible, false otherwise
363 virtual bool isVisible();
364
365 //! \brief Checks if the full chat window is visible
366 //! \return True if the full chat window is visible, false if minimized or hidden
367 //!
368 //! Determines if the chat window is fully visible, as opposed to being
369 //! minimized or showing only a notification area.
370 virtual bool isFullChatVisible();
371
372 //! \brief Closes the chat window
373 //!
374 //! Hides the chat window and performs any necessary cleanup.
375 virtual void close();
376
377 //! \brief Opens the chat window
378 //!
379 //! Shows the chat window and ensures it's properly initialized.
380 virtual void open();
381
382 //! \brief Opens the chat window or gives it focus if already open
383 //!
384 //! If the chat window is already open, this gives it focus. Otherwise,
385 //! it opens the window. This is typically used when the user invokes
386 //! the chat functionality through a hotkey or menu option.
387 virtual void openOrFocus();
388
389 //! \brief Toggles the pinned state of the chat window
390 //!
391 //! Switches between pinned (always visible) and unpinned (auto-hide) states
392 //! for the chat window. This affects how the chat behaves when the user
393 //! interacts with other parts of the application.
394 virtual void togglePinChat();
395
396 //! \brief Gets the chat QML object
397 //! \return Pointer to the chat QML interface, or nullptr if not available
398 //!
399 //! Provides access to the underlying DtVreChatQML object that manages
400 //! the chat functionality. The caller does not take ownership of the
401 //! returned pointer and should not delete it.
403
404 //! \brief Updates the chat window position based on application state
405 //! \param state Current application state identifier
406 //!
407 //! Adjusts the position of the chat window based on the current state
408 //! of the application. Different states may require different positioning
409 //! to avoid interfering with other UI elements.
410 virtual void updatePositionFromState(const std::string& state);
411
412 //! \brief Gets the chat configuration file for a scenario
413 //! \param scenarioFilename Filename of the scenario (can be empty)
414 //! \return Path to the appropriate chat configuration file
415 //!
416 //! Determines the appropriate chat configuration file to use based on the
417 //! scenario name. If a scenario-specific chat configuration exists, it will
418 //! be returned; otherwise, the default chat configuration file is returned.
419 virtual DtFilename getChatConfigFile(const DtFilename& scenarioFilename);
420
421 //! \brief Updates chat channels based on a scenario file
422 //! \param scenario Filename of the scenario
423 //! \return True if the chat configuration changed, false otherwise
424 //!
425 //! Updates the available chat channels based on the specified scenario.
426 //! Returns true if the chat configuration changed as a result of this update.
427 virtual bool updateChatChannelsFromScenario(const DtFilename& scenario);
428
429 //! \brief Updates chat channels from a configuration file
430 //! \param chatConfigFile Path to the chat configuration file
431 //! \return True if the chat configuration changed, false otherwise
432 //!
433 //! Loads chat channel definitions from the specified configuration file
434 //! and updates the available channels. Returns true if the configuration
435 //! changed as a result of this update.
436 virtual bool updateChatChannelsFromConfigFile(const DtFilename& chatConfigFile);
437
438protected:
439 //! \brief Handles messages about player entity creation
440 //! \param msg Pointer to the player created message
441 //! \return Message handling result
442 //!
443 //! Processes notifications about new player entities being created,
444 //! updating channel participant lists and potentially adjusting the
445 //! current username if this is the local player.
447
448 //! \brief Handles messages about player entity destruction
449 //! \param msg Pointer to the player destroyed message
450 //! \return Message handling result
451 //!
452 //! Processes notifications about player entities being removed,
453 //! updating channel participant lists accordingly.
455
456 //! \brief Handles incoming chat messages
457 //! \param msg Pointer to the incoming chat message
458 //! \return Message handling result
459 //!
460 //! Processes incoming chat messages from other participants or the system,
461 //! adding them to the appropriate channel and updating the UI.
463
464 //! \brief Handles session status messages
465 //! \param msg Pointer to the session status message
466 //! \return Message handling result
467 //!
468 //! Processes notifications about changes to the VRF session status,
469 //! adjusting the chat system's state accordingly.
471
472 //! \brief Handles changes to the current application state
473 //! \param state New application state identifier
474 //!
475 //! Called when the application state changes, allowing the chat window
476 //! to adjust its appearance, position, and behavior to suit the new state.
477 virtual void onCurrentStateChanged(std::string state);
478
479protected:
480 //! \brief Chat QML interface object
481 //!
482 //! Manages the bridge between C++ and QML for chat functionality.
483 std::unique_ptr<DtVreChatQML> myChatObject;
484
485 //! \brief Root QML item for the chat window
486 //!
487 //! The top-level QML item that contains the entire chat window UI.
488 QQuickItem* myRoot;
489
490 //! \brief Reference to the player station application
491 //!
492 //! Provides access to application services during chat operations.
494
495 //! \brief Path to the default chat configuration file
497
498 //! \brief Path to the current chat configuration file in use
500
501protected:
502 //! \brief Default configuration filename
503 DtFilename myDefaultConfigFilename = "defaultChatConfig.mtl";
504
505 //! \brief Directory containing default configuration files
506 DtFilename myDefaultConfigDirectory = "$(APP_DIR)/settings";
507
508 //! \brief Filename postfix for user-specific chat configurations
509 DtFilename myDefaultChatConfigUserFilenamePostfix = "_ChatConfig.mtl";
510
511 //! \brief Directory containing user-specific chat configurations
512 DtFilename myDefaultChatConfigUserDirectory = "$(USER_DIR)/chatConfigs";
513
514 //! \brief Member-scope instance of Attribute callback manager
515 //!
516 //! Used to manage Attribute change callback connections and ensure that all
517 //! callbacks are unregistered when this class instance is destroyed.
519};
520
521} // namespace makVre
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.