18#include "vrePlayerStation/chooseRolePanelUI.hpp"
22#include <vrvCoreQt/DtDockable.h>
24#include <vrvCore/DtUniqueID.h>
25#include <vrvCore/DtElementData.h>
26#include <vrvCore/DtSelectionManager.h>
27#include <vrvCore/DtElementAttributeManager.h>
29#include <vrvUtil/DtSignalConnectionManager.h>
34class DtQtDeMainWindow;
59 public Ui::DtChooseRolePanelUI
132 virtual void onElementsChanged(
const makVrv::DtElementAttributeManager::EntryAttributesList& attributes);
157 const makVrv::DtSelectionManager::IdSet& selected,
const makVrv::DtSelectionManager::IdSet& deselected);
166 virtual void onSceneClicked(makVrv::DtUniqueID
id,
const DtVector& location,
double altAboveGround);
506 virtual bool findRoles(
const DtEntityType& entityType, QComboBox* box = NULL);
Defines the DtChooseRoleState class for entity and role selection.
virtual void on_displayUnitChanged()
Updates the altitude box's unit suffix.
virtual bool findRoles(const DtEntityType &entityType, QComboBox *box=NULL)
Finds available roles for an entity type.
bool myDisplayListNeedsUpdate
Flag indicating that the display list needs updating.
Definition chooseRolePanel.h:769
virtual void installEventFilters()
Installs event filters for application-level event handling.
virtual void slot_onEntityItemDoubleClicked(QTreeWidgetItem *, int)
Handles double-clicks on items in the entity list.
virtual void onSceneSelectionChanged(const makVrv::DtSelectionManager::IdSet &selected, const makVrv::DtSelectionManager::IdSet &deselected)
Scene signal handlers.
QAction * myCopyCreateTypeAction
Action for copying entity types from the creation list.
Definition chooseRolePanel.h:639
int myEntityStateUpdateIndex
Index for cycling through entity updates.
Definition chooseRolePanel.h:745
QMainWindow * myMainWindow
Pointer to the main application window.
Definition chooseRolePanel.h:606
virtual void slot_onCreateItemClicked(QTreeWidgetItem *item, int column)
Handles clicks on items in the create entity list.
virtual void slot_onCreateSelectionChanged()
Handles changes in entity selection in the create entity list.
virtual void buildCreateEntityList()
List building methods.
virtual void slot_onCreateContextMenu(const QPoint &pos)
Handles context menu requests in the create entity list.
DtChooseRolePanel(makVrv::DtDe &de, makVrv::DtQtDeMainWindow *mainWindow, DtPlayerStationApp &app)
Constructor.
DtCreateNewEntityEventProcessor * myEventProcessor
Event processor for creating new entities.
Definition chooseRolePanel.h:697
virtual int altitudeSpinboxValueInMeters()
Converts the altitude spinbox value to meters.
virtual bool isObserverViewsButtonActive() const
Checks if the observer views button is active.
virtual void slot_onEntityViewToggled(bool on)
Handles toggling of the entity view.
virtual void slot_onEntityContextMenuActionCopyType()
Handles the "Copy Type" action from the entity context menu.
virtual bool viewAllEntities()
View manipulation methods.
virtual void slot_onCreateNewClicked(bool checked)
Handles clicks on the "Create New" button.
virtual ~DtChooseRolePanel() override
Destructor.
void showOptimizingVRPerformanceDialog()
Shows the VR performance optimization dialog.
makVrv::DtSignalConnectionManager mySignals
Manager for signal connections.
Definition chooseRolePanel.h:703
ViewModes
Enumeration of available view modes.
Definition chooseRolePanel.h:646
@ ViewMode_3D
3D perspective view mode (configurable camera angle)
Definition chooseRolePanel.h:648
@ ViewMode_Map
2D map view mode (top-down orthographic projection)
Definition chooseRolePanel.h:647
virtual void slot_onResetViewClicked()
Handles clicks on the "Reset View" button.
virtual void buildRolesList(const DtEntityType &entityType)
Builds the list of available roles for an entity type.
virtual void onNewEntityCreated()
Handles creation of new entities.
virtual void applyFilter(QTreeWidget *tree)
Applies filters to a specific tree widget.
double mySceneClickTimer
Timer for tracking scene clicks.
Definition chooseRolePanel.h:739
virtual void slot_onMapViewToggled(bool on)
Handles toggling of the map view.
virtual void debugCallback()
Provides debugging information.
virtual void slot_onEntityContextMenu(const QPoint &pos)
Handles context menu requests in the entity list.
virtual void slot_onEntityContextMenuActionCopyId()
Handles the "Copy ID" action from the entity context menu.
DtVreMessageResult handleSmsLoadComplete(DtVreMessage *msg)
Handles SMS load completion messages.
virtual void enableCreateEntity(bool enabled)
Enables or disables the create entity option.
virtual void removeEventFilters()
Removes previously installed event filters.
virtual void onSmsChanged()
Handles SMS changes.
virtual void slot_onTakeControlClicked(bool checked)
UI event handlers (slots)
virtual void slot_onSearchFilterChanged(const QString &text)
Handles changes to the search filter text.
void onDePreTick(makVrv::DtDe &de)
Handles pre-tick events from the display engine.
bool myWantedSpectator
Flag indicating whether spectator mode was requested.
Definition chooseRolePanel.h:721
DtPlayerStationApp & myApp
Reference to the player station application.
Definition chooseRolePanel.h:709
virtual void setViewMode(ViewModes mode=ViewMode_3D)
Sets the current view mode.
virtual void applyFilters()
Filter application methods.
int myLastEntityCount
Last known count of entities in the scene.
Definition chooseRolePanel.h:733
virtual void slot_onCreateItemDoubleClicked(QTreeWidgetItem *item, int column)
Handles double-clicks on items in the create entity list.
QAction * myCopyEntityIdAction
Action for copying entity IDs.
Definition chooseRolePanel.h:626
virtual void slot_onCountryFilterChanged(const QString &country)
Handles changes to the country filter.
virtual void slot_onEntityItemClicked(QTreeWidgetItem *item, int column)
Handles clicks on items in the entity list.
virtual void resetPanel()
Resets the panel to its initial state.
virtual void slot_onCategoryFilterChanged(const QString &category)
Handles changes to the category filter.
virtual void removeElementFromEntityList(makVrv::DtElementID id)
Entity list management methods.
double myEntityStateLastUpdateTime
Time of the last entity state update.
Definition chooseRolePanel.h:751
virtual void slot_onEntitySelectionChanged()
Handles changes in entity selection in the entity list.
virtual void onElementsRemoved(const makVrv::DtElementData::ElementIdList &keys)
Handles the removal of elements from the scene.
virtual void updateDisplayLayoutsList(const makVrv::DtSceneObject *sceneObject)
Updates the list of available display layouts.
virtual DtVreMessageResult handleSimState(DtVreMessage *msg)
Entity message handlers.
makVrv::DtSignalConnectionManager myConnections
Additional manager for signal connections.
Definition chooseRolePanel.h:791
virtual void slot_onPitchChanged(const QString &pitch)
Handles changes to the entity pitch.
virtual void onSceneClicked(makVrv::DtUniqueID id, const DtVector &location, double altAboveGround)
Handles scene clicks.
virtual void slot_onAtAltitudeToggled(bool on)
Handles toggling of the "at altitude" option.
double myEntityStateUpdateTime
Interval between entity state updates.
Definition chooseRolePanel.h:757
virtual bool eventFilter(QObject *p, QEvent *e) override
Application event handling.
virtual bool viewCurrentEntity()
Centers the view on the currently selected entity.
virtual QTreeWidgetItem * findEntityListItem(const DtEntityIdentifier &id)
Finds an item in the entity list by entity ID.
virtual void slot_onResetFiltersClicked()
Handles clicks on the "Reset Filters" button.
virtual void slot_onConfigurationSelectionChanged(const QString &config)
Handles selection of a different display configuration.
virtual void onElementsAdded(const makVrv::DtElementData::ElementIdList &elements)
Element signal handlers.
virtual void buildExistingEntityList()
Builds the list of existing entities in the simulation.
std::map< std::string, std::string > myPreviousRoleSettings
Cache of role settings by entity type.
Definition chooseRolePanel.h:776
virtual void repositionChooseRolePanel()
Repositions the choose role panel.
virtual void slot_onResetSearchClicked()
Handles clicks on the "Reset Search" button.
virtual void slot_onForceFilterChanged(const QString &force)
Handles changes to the force filter.
virtual void hideContainer()
Hides the panel container.
virtual void slot_onPlayClicked()
Handles clicks on the "Play" button.
virtual void buildCategoriesList()
Builds the list of entity categories for filtering.
virtual QTreeWidgetItem * findEntityListItem(const makVrv::DtElementID &id)
Finds an item in the entity list by element ID.
virtual void slot_onCreateContextMenuActionCopyType()
Handles the "Copy Type" action from the create entity context menu.
EntityListItemDataFields
Data fields for entity list items.
Definition chooseRolePanel.h:668
@ DataField_OwnThis
Whether this entity is owned by the current player.
Definition chooseRolePanel.h:676
@ DataField_Type
Entity type (e.g., "T-72", "M1A2", "Infantry")
Definition chooseRolePanel.h:671
@ DataField_ElementId
Display engine element ID from the scene graph.
Definition chooseRolePanel.h:669
@ DataField_Categories
Categories the entity belongs to (e.g., "Ground", "Air")
Definition chooseRolePanel.h:673
@ DataField_EntityId
Simulation entity ID used in network messages.
Definition chooseRolePanel.h:670
@ DataField_Force
Force type (friendly, hostile, neutral, etc.)
Definition chooseRolePanel.h:672
@ DataField_EmbarkedRole
Role this entity is embarked as (if applicable)
Definition chooseRolePanel.h:677
@ DataField_Countries
Countries associated with the entity (e.g., "USA", "UK")
Definition chooseRolePanel.h:674
@ DataField_Name
Display name of the entity shown in the UI.
Definition chooseRolePanel.h:675
@ DataField_EngagedBy
Player name who is currently engaged with this entity.
Definition chooseRolePanel.h:678
void onDePostTick()
Handles post-tick events from the display engine.
virtual void slot_onNameEdited(const QString &name)
Handles edits to the entity name field.
virtual void addElementToEntityList(const makVrv::DtElementEntry &data)
Adds an element to the entity list.
virtual void showContainer()
Shows the panel container.
virtual void slot_onObserverViewsPanelToggled(bool visible)
Handles toggling of the observer views panel.
virtual void buildCountriesList()
Builds the list of countries for filtering.
virtual void slot_onRoleSelectionChanged(const QString &role)
Handles selection of a different role.
virtual void onElementsChanged(const makVrv::DtElementAttributeManager::EntryAttributesList &attributes)
Handles changes to element attributes.
QAction * myCopyEntityTypeAction
Action for copying entity types.
Definition chooseRolePanel.h:632
QMenu * myEntityTreeContextMenu
Context menu for the entity list.
Definition chooseRolePanel.h:613
DtOptimizingVRPerformanceDialog * myOptimizingVRPerformanceDialog
Dialog for VR performance optimization tips.
Definition chooseRolePanel.h:784
makVrv::DtDe & myDe
Reference to the display engine.
Definition chooseRolePanel.h:715
virtual void setEntityStateUpdateTime(double seconds)
Sets the entity state update interval.
virtual bool initiallyVisible() const
Determines initial visibility of the panel.
Definition chooseRolePanel.h:84
virtual void slot_onHeadingChanged(const QString &heading)
Handles changes to the entity heading.
virtual void tick(double dt)
Updates the panel state.
virtual void setReady(bool ready)
Sets the ready state of the panel.
EntityListItemColumns
Column identifiers for the entity list.
Definition chooseRolePanel.h:686
@ ColumnId_Name
Name column showing entity display name.
Definition chooseRolePanel.h:687
@ ColumnId_Host
Host column showing containing entity (if embarked)
Definition chooseRolePanel.h:689
@ ColumnId_Engaged
Engaged column showing engagement status and player.
Definition chooseRolePanel.h:690
@ ColumnId_Type
Type column showing entity type designation.
Definition chooseRolePanel.h:688
bool myDidInitialViewAll
Flag indicating whether an initial view of all entities was performed.
Definition chooseRolePanel.h:727
virtual void clearSelectedEntities()
Clears all entity selections.
DtEntityType mySelectedEntityType
Currently selected entity type.
Definition chooseRolePanel.h:763
QMenu * myCreateTreeContextMenu
Context menu for the create entity list.
Definition chooseRolePanel.h:620
virtual void buildForcesList()
Builds the list of force types for filtering.
virtual void slot_onAltitudeChanged(int altitude)
Handles changes to the altitude value.
Event processor for entity creation and placement.
Definition createNewEntityEventProcessor.h:36
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
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
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.