VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtVreManagerWidget Class Reference

Detailed Description

This class provides the main user interface for managing VREngage applications, including monitoring application status, assigning roles and entities to applications, and controlling spectator mode settings. It integrates with the VREngage status listener to maintain real-time status information.

#include <vreManagerWidget.h>

Inheritance diagram for makVre::DtVreManagerWidget:
[legend]

Public Slots

virtual void onSubmit ()
 
virtual void onSubmitWithConflicts ()
 
virtual void onRevert ()
 
virtual void onUserEditComplete ()
 
virtual void onDataChanged ()
 
virtual void onAssignmentStateChanged ()
 
virtual void handleVreAppAdded (const std::string &id)
 
virtual void handleVreAppRemoved (const std::string &id)
 
virtual void handleVreAppChanged (const std::string &id)
 
Phase 3: New UI Interaction Slots

Slots for the two-panel splitter-based layout.

virtual void onEntitySearchChanged (const QString &text)
 
virtual void onStationSearchChanged (const QString &text)
 
virtual void onToggleExpandCollapse ()
 
virtual void onEntityRoleTreeClicked (const QModelIndex &index)
 
virtual void onStationListClicked (const QModelIndex &index)
 
virtual void onStationListContextMenu (const QPoint &pos)
 
virtual void onSpectatorToggleClicked (const QString &stationId)
 
virtual void onStatusIndicatorClicked (const QString &stationId)
 
virtual void onStatusSortButtonClicked ()
 
virtual void onStationNameSortButtonClicked ()
 
virtual void onEntityRoleHeaderSortIndicatorChanged (int section, Qt::SortOrder order)
 
virtual void onTreeHeaderContextMenu (const QPoint &pos)
 
Phase 8: Assignment Persistence

Slots for save and load assignment file operations.

virtual void onSaveAssignments ()
 
virtual void onLoadAssignments ()
 

Signals

void entityForceTypeChanged (const QString &entityUUID, int newRawForceType)
 

Public Member Functions

virtual ~DtVreManagerWidget () override
 
virtual QIcon icon () override
 
virtual QString title () override
 
virtual const std::string & pageClassName () const override
 
virtual void activate () override
 
virtual void deactivate () override
 
virtual makVrv::DtQIconConfigurations qIconConfigurations () const override
 
virtual QSize sizeHint () const override
 
virtual QSize minimumSizeHint () const override
 
void setStartupAssignmentFile (const QString &filePath)
 
bool entityExistsInCurrentExercise (const DtUUID &entityUUID) const
 
void showPersistenceWarnings (const QStringList &warnings, const QString &title)
 
void submitChanges (bool allowConflicts)
 

Static Public Member Functions

static void vreAppAddedCallback (const std::string &id, void *usr)
 
static void vreAppRemovedCallback (const std::string &id, void *usr)
 
static void vreAppChangedCallback (const std::string &id, void *usr)
 

Protected Member Functions

virtual void onModelSetChanged ()
 
virtual void changeEvent (QEvent *event) override
 
virtual void showEvent (QShowEvent *event) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void refreshExpandButtonIcon ()
 
void syncExpandButtonState ()
 
void setEntityRoleHeaderHoverActive (bool active)
 
void refreshStatusSortButtonIcon ()
 
void refreshStationNameSortButtonIcon ()
 
void applyStationSortState ()
 
virtual void handleActivate ()
 
virtual void handleDeactivate ()
 
 DtVreManagerWidget (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0)
 
void setupUi (QWidget *p)
 
void setupNewUi ()
 
void populateEntitiesFromExercise ()
 
void tryAddEntityToTree (const DtUUID &uuid)
 
void refreshSimEngineAddresses ()
 
void resolveAggregateChain (const makVrf::DtSimObjectReference &ref, std::vector< DtUUID > &chainUUIDs, std::vector< std::string > &chainNames, std::vector< QIcon > &chainIcons, std::vector< int > &chainForces)
 
void removeEntityFromTree (const DtUUID &uuid)
 
void updateStatusLabels ()
 
void updateSubmitButtonState ()
 
bool saveAssignmentsToFile (const QString &filePath)
 
bool loadAssignmentsFromFile (const QString &filePath)
 

Protected Attributes

std::string myClassName
 
Ui::DtVreManagerWidgetNew myNewUI
 
DtVreStationSortProxyModel * mySortProxy
 
DtVreStatusListener * myVreListener
 
DtVreAssignmentTracker * myAssignmentTracker
 
DtVreEntityRoleTreeModel * myTreeModel
 
DtVreStationListModel * myStationListModel
 
makVrv::DtSignalConnectionManager myConnectionManager
 
bool mySimObjectSignalsConnected = false
 
QString myStartupAssignmentFile
 
DtFilename myLoadedSMSFileName
 
QToolButton * mySaveButton = nullptr
 
QToolButton * myLoadButton = nullptr
 
std::map< DtUUID, int > myEntityForceTypes
 
std::set< DtUUID > myKnownAggregates
 
bool mySimEngineColumnVisible = false
 
QTimer * mySimEngineRefreshTimer = nullptr
 
bool myInSectionResizeGuard = false
 
Phase 3: Selection State

State tracking for the assignment workflow in the new UI.

DtUUID mySelectedEntityUUID
 
QString mySelectedRoleName
 
std::string mySelectedStationId
 
bool myTreeExpanded = false
 
bool myStationSortByStatus = true
 
Qt::SortOrder myStationSortOrder = Qt::AscendingOrder
 
QButtonGroup * myStationSortButtonGroup = nullptr
 
QWidget * myStatusSortOverlay = nullptr
 
QWidget * myStationNameSortOverlay = nullptr
 
QToolButton * myExpandCollapseBtn = nullptr
 
bool myEntityRoleHeaderHovered = false
 
bool myExpandCollapseButtonHovered = false
 
DtEntityRoleTreeDelegate * myTreeColDelegate = nullptr
 

Friends

class DtVreManagerWidgetCreator
 

Constructor & Destructor Documentation

◆ ~DtVreManagerWidget()

virtual makVre::DtVreManagerWidget::~DtVreManagerWidget ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the manager widget, including the table model, entity selection dialog, and VREngage listener.

◆ DtVreManagerWidget()

makVre::DtVreManagerWidget::DtVreManagerWidget ( makVrv::DtDe & de,
QWidget * parent = 0,
Qt::WindowFlags f = 0 )
protected

Constructor.

Parameters
deThe distributed environment reference
parentThe parent widget
fWindow flags to apply to the widget

Initializes a new VREngage manager widget. This constructor is private and can only be called by the DtVreManagerWidgetCreator.

References de().

Member Function Documentation

◆ icon()

virtual QIcon makVre::DtVreManagerWidget::icon ( )
overridevirtual

Gets the icon for this page.

Returns
Icon to display for this page in the application

Returns the icon representing the VREngage Manager in the application UI.

◆ title()

virtual QString makVre::DtVreManagerWidget::title ( )
overridevirtual

Gets the title for this page.

Returns
Title to display for this page in the application

Returns the human-readable title for the VREngage Manager page.

Referenced by showPersistenceWarnings().

◆ pageClassName()

virtual const std::string & makVre::DtVreManagerWidget::pageClassName ( ) const
overridevirtual

Gets the class name of the page.

Returns
Reference to the unique class name string

Returns the unique identifier for this page class type. This name is used for page identification and persistence purposes.

◆ activate()

virtual void makVre::DtVreManagerWidget::activate ( )
overridevirtual

Called when the page is displayed.

Activates the manager widget, setting up the necessary connections, initializing the table model, and refreshing the display. This is called whenever the page becomes visible to the user.

◆ deactivate()

virtual void makVre::DtVreManagerWidget::deactivate ( )
overridevirtual

Called when the page is hidden.

Deactivates the manager widget, cleaning up resources and disconnecting signals. This is called whenever the page becomes invisible to the user.

◆ qIconConfigurations()

virtual makVrv::DtQIconConfigurations makVre::DtVreManagerWidget::qIconConfigurations ( ) const
overridevirtual

Gets the icon configurations for the page.

Returns
The icon configuration settings

Returns the configuration settings used to style the page's icon based on application settings and theme.

◆ sizeHint()

virtual QSize makVre::DtVreManagerWidget::sizeHint ( ) const
overridevirtual

Returns preferred initial size for dock sizing.

Returns
Preferred initial size of the manager dock

Sized so that, when first opened in the right dock area, the panel shows roughly two station cards plus the entire bottom button row without requiring a manual resize.

◆ minimumSizeHint()

virtual QSize makVre::DtVreManagerWidget::minimumSizeHint ( ) const
overridevirtual

Returns the smallest sensible size for the dock.

Returns
Minimum size that still keeps the bottom button row visible

The dock can be shrunk down to this size but no further, so the Submit / Submit-with-Conflicts / Revert button row is never clipped.

◆ vreAppAddedCallback()

static void makVre::DtVreManagerWidget::vreAppAddedCallback ( const std::string & id,
void * usr )
static

Static callback for VREngage application discovery.

Parameters
idThe unique identifier of the discovered application
usrUser-defined data (pointer to the manager widget instance)

Static callback function invoked when a new VREngage application is discovered. Routes the callback to the appropriate instance method.

◆ vreAppRemovedCallback()

static void makVre::DtVreManagerWidget::vreAppRemovedCallback ( const std::string & id,
void * usr )
static

Static callback for VREngage application removal.

Parameters
idThe unique identifier of the removed application
usrUser-defined data (pointer to the manager widget instance)

Static callback function invoked when a VREngage application is removed. Routes the callback to the appropriate instance method.

◆ vreAppChangedCallback()

static void makVre::DtVreManagerWidget::vreAppChangedCallback ( const std::string & id,
void * usr )
static

Static callback for VREngage application status changes.

Parameters
idThe unique identifier of the changed application
usrUser-defined data (pointer to the manager widget instance)

Static callback function invoked when a VREngage application's status changes. Routes the callback to the appropriate instance method.

◆ entityForceTypeChanged

void makVre::DtVreManagerWidget::entityForceTypeChanged ( const QString & entityUUID,
int newRawForceType )
signal

Emitted when a known entity's force type changes at runtime.

Parameters
entityUUIDUUID of the entity whose force type changed
newRawForceTypeNew SISO force-type value (0=Other, 1=Friendly, 2=Opposing, 3=Neutral)

Fired inside tryAddEntityToTree() whenever the force type reported by the sim object reference differs from the last-observed value. The tree model slot DtVreEntityRoleTreeModel::moveEntityToForce() is connected to this signal via Qt::QueuedConnection so the move always executes on the GUI thread, even if the sim object manager fires its update callback from a different thread.

◆ onSubmit

virtual void makVre::DtVreManagerWidget::onSubmit ( )
virtualslot

Handles submission of changes.

Called when the user submits changes to VREngage application settings. Applies the changes to the affected applications.

◆ onSubmitWithConflicts

virtual void makVre::DtVreManagerWidget::onSubmitWithConflicts ( )
virtualslot

Handles submission of changes even when conflicts exist.

Called when the user forcefully submits changes despite unresolved conflicts. Uses the same send path as onSubmit().

◆ onRevert

virtual void makVre::DtVreManagerWidget::onRevert ( )
virtualslot

Handles reverting of changes.

Called when the user cancels changes to VREngage application settings. Reverts any pending changes and refreshes the display.

◆ onUserEditComplete

virtual void makVre::DtVreManagerWidget::onUserEditComplete ( )
virtualslot

Handles completion of user edits.

Called when the user completes an edit operation in the manager. Updates internal state and enables/disables UI elements accordingly.

◆ onDataChanged

virtual void makVre::DtVreManagerWidget::onDataChanged ( )
virtualslot

Handles data changes in the table model.

Called when data in the table model changes. Updates the Submit button state based on whether conflicts exist in the current assignments.

◆ onAssignmentStateChanged

virtual void makVre::DtVreManagerWidget::onAssignmentStateChanged ( )
virtualslot

Handles assignment tracker state changes.

Called when the assignment tracker's state changes (station added/removed, pending assignments changed, etc.). Used for testing Phase 1 integration.

◆ handleVreAppAdded

virtual void makVre::DtVreManagerWidget::handleVreAppAdded ( const std::string & id)
virtualslot

Handles VREngage application addition.

Parameters
idThe unique identifier of the added application

Called when a new VREngage application is discovered. Updates the table model and refreshes the display to show the new application.

◆ handleVreAppRemoved

virtual void makVre::DtVreManagerWidget::handleVreAppRemoved ( const std::string & id)
virtualslot

Handles VREngage application removal.

Parameters
idThe unique identifier of the removed application

Called when a VREngage application is removed or times out. Updates the table model and refreshes the display to remove the application.

◆ handleVreAppChanged

virtual void makVre::DtVreManagerWidget::handleVreAppChanged ( const std::string & id)
virtualslot

Handles VREngage application status changes.

Parameters
idThe unique identifier of the changed application

Called when a VREngage application's status changes. Updates the table model and refreshes the display to show the updated status.

◆ onEntitySearchChanged

virtual void makVre::DtVreManagerWidget::onEntitySearchChanged ( const QString & text)
virtualslot

Handles entity search text changes.

Parameters
textThe current search text

Filters the entity/role tree to show only entities whose display name contains the search text (case-insensitive).

◆ onStationSearchChanged

virtual void makVre::DtVreManagerWidget::onStationSearchChanged ( const QString & text)
virtualslot

Handles station search text changes.

Parameters
textThe current search text

Filters the station list to show only stations whose name contains the search text (case-insensitive).

◆ onToggleExpandCollapse

virtual void makVre::DtVreManagerWidget::onToggleExpandCollapse ( )
virtualslot

Toggles between expanding and collapsing all entity nodes in the tree.

◆ onEntityRoleTreeClicked

virtual void makVre::DtVreManagerWidget::onEntityRoleTreeClicked ( const QModelIndex & index)
virtualslot

Handles clicks on the entity/role tree.

Parameters
indexThe model index of the clicked item

Entity clicks toggle expand/collapse. Role clicks set the selected entity UUID and role name for the assignment workflow.

◆ onStationListClicked

virtual void makVre::DtVreManagerWidget::onStationListClicked ( const QModelIndex & index)
virtualslot

Handles clicks on the station list.

Parameters
indexThe model index of the clicked item

If a role is armed (selected in the entity/role tree), clicking a station creates a pending assignment for that station to the armed role. Otherwise, records the selected station ID.

◆ onStationListContextMenu

virtual void makVre::DtVreManagerWidget::onStationListContextMenu ( const QPoint & pos)
virtualslot

Handles right-click context menu on the station list.

Parameters
posThe position of the right-click in widget coordinates

Shows a context menu with options to clear pending assignments for the clicked station.

◆ onSpectatorToggleClicked

virtual void makVre::DtVreManagerWidget::onSpectatorToggleClicked ( const QString & stationId)
virtualslot

Handles a click on the spectator mode toggle button.

Parameters
stationIdThe ID of the station whose spectator mode should be toggled

Toggles spectator mode for the pending assignment on the given station. Called when the user clicks the spectator mode button embedded in a station card.

◆ onStatusIndicatorClicked

virtual void makVre::DtVreManagerWidget::onStatusIndicatorClicked ( const QString & stationId)
virtualslot

Handles a click on the status indicator circle.

Parameters
stationIdThe ID of the station to unassign or clear pending

◆ onStatusSortButtonClicked

virtual void makVre::DtVreManagerWidget::onStatusSortButtonClicked ( )
virtualslot

Handles clicks on the assignment-status sort button.

◆ onStationNameSortButtonClicked

virtual void makVre::DtVreManagerWidget::onStationNameSortButtonClicked ( )
virtualslot

Handles clicks on the station-name sort button.

◆ onEntityRoleHeaderSortIndicatorChanged

virtual void makVre::DtVreManagerWidget::onEntityRoleHeaderSortIndicatorChanged ( int section,
Qt::SortOrder order )
virtualslot

Applies entity/role tree ordering when the header sort indicator changes.

Parameters
sectionThe logical column index owning the active sort indicator
orderThe active Qt sort order (ascending/descending)

Connected to QHeaderView::sortIndicatorChanged so the built-in header indicator drives the existing custom tree-model ordering exactly once (avoids section-click double-sort wiring).

◆ onTreeHeaderContextMenu

virtual void makVre::DtVreManagerWidget::onTreeHeaderContextMenu ( const QPoint & pos)
virtualslot

Pops the entity/role tree header context menu.

Parameters
posPosition of the right-click within the header viewport

Builds a small QMenu with one checkable action per toggleable column (currently just "Show Sim Engine column"). Designed so future optional columns can register themselves the same way without restructuring the slot.

◆ onSaveAssignments

virtual void makVre::DtVreManagerWidget::onSaveAssignments ( )
virtualslot

Opens a file dialog and saves the current assignment layout to JSON.

◆ onLoadAssignments

virtual void makVre::DtVreManagerWidget::onLoadAssignments ( )
virtualslot

Opens a file dialog and loads an assignment layout from JSON.

If pending changes exist, prompts the operator to confirm replacement before importing. On parse errors shows a critical dialog. On partial success shows a warning summary.

◆ onModelSetChanged()

virtual void makVre::DtVreManagerWidget::onModelSetChanged ( )
protectedvirtual

Handles model set changes.

Populates the model sets that could possibly contain VREngage-controllable entities. This includes any SMS (Simulation Model Set) that derives from VR-Engage.sms somewhere in its ancestry. Called when the available model sets change.

◆ changeEvent()

virtual void makVre::DtVreManagerWidget::changeEvent ( QEvent * event)
overrideprotectedvirtual

Responds to palette changes so toolbar icons repaint in the correct colour.

Catches QEvent::PaletteChange to rebuild the expand/collapse and sort button icons using the updated QPalette::Text colour (important for dark-mode switches).

◆ showEvent()

virtual void makVre::DtVreManagerWidget::showEvent ( QShowEvent * event)
overrideprotectedvirtual

Repaints toolbar icons on first show.

The palette may not be fully resolved during setupNewUi() (before the widget is parented into the main window), so icons are also refreshed here to ensure they use the correct colour from the first visible frame.

◆ eventFilter()

bool makVre::DtVreManagerWidget::eventFilter ( QObject * watched,
QEvent * event )
overrideprotected

Filters mouse events on the entity/role tree viewport.

Clears the tree selection when the user clicks empty space.

◆ refreshExpandButtonIcon()

void makVre::DtVreManagerWidget::refreshExpandButtonIcon ( )
protected

Rebuilds the expand/collapse toggle button icon from the current palette.

◆ syncExpandButtonState()

void makVre::DtVreManagerWidget::syncExpandButtonState ( )
protected

Syncs the expand/collapse toggle button to reflect the tree's actual state.

Computes whether every visible root entity node is expanded and updates myTreeExpanded and the button icon/tooltip accordingly. Call this after any operation that may change the expanded state without going through onToggleExpandCollapse (filter changes, model reset, entity add/remove, individual node expand/collapse by the user).

◆ setEntityRoleHeaderHoverActive()

void makVre::DtVreManagerWidget::setEntityRoleHeaderHoverActive ( bool active)
protected

Mirrors header-hover visual state to the embedded expand/collapse button.

When active, the button receives the same subtle neutral overlay used by tree header hover so the two controls read as one continuous affordance.

◆ refreshStatusSortButtonIcon()

void makVre::DtVreManagerWidget::refreshStatusSortButtonIcon ( )
protected

Rebuilds the assignment-status sort button icon from the current palette.

◆ refreshStationNameSortButtonIcon()

void makVre::DtVreManagerWidget::refreshStationNameSortButtonIcon ( )
protected

Refreshes the station-name sort button presentation.

◆ applyStationSortState()

void makVre::DtVreManagerWidget::applyStationSortState ( )
protected

Applies station-list sort state to proxy and updates button visuals.

◆ handleActivate()

virtual void makVre::DtVreManagerWidget::handleActivate ( )
protectedvirtual

Internal activation handler.

Implementation of the activation logic. Called by activate().

◆ handleDeactivate()

virtual void makVre::DtVreManagerWidget::handleDeactivate ( )
protectedvirtual

Internal deactivation handler.

Implementation of the deactivation logic. Called by deactivate().

◆ setupUi()

void makVre::DtVreManagerWidget::setupUi ( QWidget * p)
protected

Sets up the UI components.

Parameters
pThe parent widget to set up UI on

Initializes and configures the user interface components of the manager widget. Creates the table, buttons, and other controls, and connects signals and slots.

◆ setupNewUi()

void makVre::DtVreManagerWidget::setupNewUi ( )
protected

Sets up the new two-panel splitter UI (Phase 3)

Creates the new UI layout with entity/role tree on the left, station list on the right, search boxes, station sort controls, toolbar buttons, and status labels. Wires the Phase 2 models to the new views and connects all signals.

◆ populateEntitiesFromExercise()

void makVre::DtVreManagerWidget::populateEntitiesFromExercise ( )
protected

Populates the entity/role tree with all VRE-engageable entities.

Enumerates all sim objects in the exercise, filters to VRE-engageable entities via DtVreModelSetDb (those exposing non-empty engage roles), retrieves available roles, and adds each entity to the tree model. Also connects to sim object added/deleted signals for dynamic updates.

◆ tryAddEntityToTree()

void makVre::DtVreManagerWidget::tryAddEntityToTree ( const DtUUID & uuid)
protected

Attempts to add a single sim object to the tree if VRE-engageable.

Parameters
uuidThe entity UUID to evaluate and potentially add

◆ refreshSimEngineAddresses()

void makVre::DtVreManagerWidget::refreshSimEngineAddresses ( )
protected

Refreshes the cached Sim Engine address for every tracked entity.

Iterates over all entities in myEntityForceTypes, looks up their current simEngineAddress(), and calls setEntitySimEngine() on the tree model. Because setEntitySimEngine() short-circuits when the cached value is unchanged, this is cheap to call periodically. Driven by mySimEngineRefreshTimer so ownership transfers that change an entity's simulating engine are reflected in the Sim Engine column.

◆ resolveAggregateChain()

void makVre::DtVreManagerWidget::resolveAggregateChain ( const makVrf::DtSimObjectReference & ref,
std::vector< DtUUID > & chainUUIDs,
std::vector< std::string > & chainNames,
std::vector< QIcon > & chainIcons,
std::vector< int > & chainForces )
protected

Walk the aggregate parent chain for a sim-object reference (Phase 8)

Parameters
[in]refSim-object reference whose aggregate ancestry to walk
[out]chainUUIDsAggregate ancestor UUIDs, root-most first
[out]chainNamesDisplay names parallel to chainUUIDs
[out]chainIconsPre-rendered icons parallel to chainUUIDs
[out]chainForcesSISO force-type per aggregate (parallel)

Empties the output vectors first, then descends from ref using DtSimObject::parent() until the chain ends. chainNames / chainIcons / chainForces are resolved via DtVrfGuiSimObjectManager / DtVrfGuiSymbolMapper. Each aggregate UUID encountered is also inserted into myKnownAggregates so a later signal_objectDeleted can be routed correctly.

◆ removeEntityFromTree()

void makVre::DtVreManagerWidget::removeEntityFromTree ( const DtUUID & uuid)
protected

Removes a sim object from the tree by UUID.

Parameters
uuidThe entity UUID to remove

◆ updateStatusLabels()

void makVre::DtVreManagerWidget::updateStatusLabels ( )
protected

Updates the status labels with current counts.

Refreshes the entity and station status labels in the new UI with current entity count, station count, and unassigned count.

◆ updateSubmitButtonState()

void makVre::DtVreManagerWidget::updateSubmitButtonState ( )
protected

Updates the submit button text and enabled state.

Enables the submit button when pending changes exist and updates the button text to show pending and reassignment counts.

◆ saveAssignmentsToFile()

bool makVre::DtVreManagerWidget::saveAssignmentsToFile ( const QString & filePath)
protected

Saves assignment file data to the given file path.

Returns
true on success; shows a critical dialog and returns false on error.

◆ loadAssignmentsFromFile()

bool makVre::DtVreManagerWidget::loadAssignmentsFromFile ( const QString & filePath)
protected

Loads and imports assignments from the given file path.

Returns
true on (possibly partial) success; shows dialogs for errors and warnings.

◆ setStartupAssignmentFile()

void makVre::DtVreManagerWidget::setStartupAssignmentFile ( const QString & filePath)

Sets the assignment file to load automatically on first activation.

Parameters
filePathPath to a JSON assignment file, or empty to disable.

When non-empty, the file is loaded once the first time activate() is called (i.e. when the Manager Panel first becomes visible). The stored path is cleared immediately after the load attempt so subsequent show/hide cycles do not re-trigger the load.

◆ entityExistsInCurrentExercise()

bool makVre::DtVreManagerWidget::entityExistsInCurrentExercise ( const DtUUID & entityUUID) const

Returns true if the given entity UUID exists in the current exercise.

◆ showPersistenceWarnings()

void makVre::DtVreManagerWidget::showPersistenceWarnings ( const QStringList & warnings,
const QString & title )

Shows a QMessageBox warning listing the given warnings under title.

References title().

◆ submitChanges()

void makVre::DtVreManagerWidget::submitChanges ( bool allowConflicts)

Shared submit implementation.

Parameters
allowConflictsIf true, the submit proceeds even when conflicts exist

Friends And Related Symbol Documentation

◆ DtVreManagerWidgetCreator

friend class DtVreManagerWidgetCreator
friend

Allows the creator class to create page instances.

References DtVreManagerWidgetCreator.

Referenced by DtVreManagerWidgetCreator.

Member Data Documentation

◆ myClassName

std::string makVre::DtVreManagerWidget::myClassName
protected

Class name for this page type.

Unique string identifier for this page class.

◆ myNewUI

Ui::DtVreManagerWidgetNew makVre::DtVreManagerWidget::myNewUI
protected

UI components for the new two-panel splitter layout (Phase 3)

Contains the tree view, list view, search boxes, sort controls, toolbar buttons, and status labels for the redesigned Manager Panel.

◆ mySortProxy

DtVreStationSortProxyModel* makVre::DtVreManagerWidget::mySortProxy
protected

Sort/filter proxy wrapping the station list model.

Provides alphabetical sorting of the station list display while leaving the source model's own filter logic intact.

◆ myVreListener

DtVreStatusListener* makVre::DtVreManagerWidget::myVreListener
protected

VREngage status listener.

Tracks status information for VREngage applications.

◆ myAssignmentTracker

DtVreAssignmentTracker* makVre::DtVreManagerWidget::myAssignmentTracker
protected

Assignment tracker for managing pending and confirmed assignments.

Provides a unified view of station assignments, combining confirmed state from the status listener with pending user edits.

◆ myTreeModel

DtVreEntityRoleTreeModel* makVre::DtVreManagerWidget::myTreeModel
protected

Tree model for entity/role hierarchy display (Phase 2)

Provides a two-level tree model where entities are at level 0 and roles are at level 1. Used for the left panel in the new UI design.

◆ myStationListModel

DtVreStationListModel* makVre::DtVreManagerWidget::myStationListModel
protected

List model for station display (Phase 2)

Provides a flat list of all VR-Engage stations with assignment status. Used for the right panel in the new UI design.

◆ myConnectionManager

makVrv::DtSignalConnectionManager makVre::DtVreManagerWidget::myConnectionManager
protected

Signal connection manager.

Manages Qt signal/slot connections for cleanup.

◆ mySimObjectSignalsConnected

bool makVre::DtVreManagerWidget::mySimObjectSignalsConnected = false
protected

Guards against re-connecting the sim-object manager signals.

activate() may be called on every show; the sim-object manager signal connections must be made only once or each cycle would add a duplicate.

◆ myStartupAssignmentFile

QString makVre::DtVreManagerWidget::myStartupAssignmentFile
protected

Assignment file to load automatically on the first activation.

Set via setStartupAssignmentFile() before the panel is first shown. Consumed and cleared in activate() after the first successful load attempt.

◆ mySelectedEntityUUID

DtUUID makVre::DtVreManagerWidget::mySelectedEntityUUID
protected

Currently selected (armed) entity UUID for assignment.

Set when the user clicks a role node in the entity/role tree. Cleared after an assignment is made or the selection is cancelled.

◆ mySelectedRoleName

QString makVre::DtVreManagerWidget::mySelectedRoleName
protected

Currently selected (armed) role name for assignment.

Set together with mySelectedEntityUUID when a role node is clicked.

◆ mySelectedStationId

std::string makVre::DtVreManagerWidget::mySelectedStationId
protected

Currently selected station ID in the station list.

Set when the user clicks a station in the station list.

◆ myTreeExpanded

bool makVre::DtVreManagerWidget::myTreeExpanded = false
protected

Tracks whether the entity/role tree is fully expanded.

Used by the toggle button to alternate between expand-all and collapse-all.

◆ myStationSortByStatus

bool makVre::DtVreManagerWidget::myStationSortByStatus = true
protected

True when the assignment-status key is the active station sort key.

◆ myStationSortOrder

Qt::SortOrder makVre::DtVreManagerWidget::myStationSortOrder = Qt::AscendingOrder
protected

Active sort direction for the station list.

◆ myStationSortButtonGroup

QButtonGroup* makVre::DtVreManagerWidget::myStationSortButtonGroup = nullptr
protected

Exclusive group owning the two station sort buttons.

◆ myStatusSortOverlay

QWidget* makVre::DtVreManagerWidget::myStatusSortOverlay = nullptr
protected

Overlay child widgets that draw active and hover-hint sort indicator arrows on top of the two station sort buttons. Stored as QWidget* because the concrete type lives in an anonymous namespace in the implementation file.

◆ myStationNameSortOverlay

QWidget* makVre::DtVreManagerWidget::myStationNameSortOverlay = nullptr
protected

Currently selected (armed) entity UUID for assignment.

Set when the user clicks a role node in the entity/role tree. Cleared after an assignment is made or the selection is cancelled.

◆ myExpandCollapseBtn

QToolButton* makVre::DtVreManagerWidget::myExpandCollapseBtn = nullptr
protected

Expand/collapse toggle button embedded in the entity/role tree header.

Created programmatically and parented to the tree's QHeaderView. Positioned so it aligns with force-level disclosure triangles.

◆ myEntityRoleHeaderHovered

bool makVre::DtVreManagerWidget::myEntityRoleHeaderHovered = false
protected

Tracks whether the entity/role header is currently hovered.

◆ myExpandCollapseButtonHovered

bool makVre::DtVreManagerWidget::myExpandCollapseButtonHovered = false
protected

Tracks whether the embedded expand/collapse button is currently hovered.

◆ myTreeColDelegate

DtEntityRoleTreeDelegate* makVre::DtVreManagerWidget::myTreeColDelegate = nullptr
protected

Custom delegate installed on column 1 of the entity/role tree.

Renders the assignment-status column: entity icon + station name for role leaves; "<assigned>/<total>" count text for force / entity branching nodes.

◆ myLoadedSMSFileName

DtFilename makVre::DtVreManagerWidget::myLoadedSMSFileName
protected

Currently loaded SMS filename.

The filename of the currently loaded Simulation Model Set.

◆ mySaveButton

QToolButton* makVre::DtVreManagerWidget::mySaveButton = nullptr
protected

Save assignments toolbar button (new UI path)

◆ myLoadButton

QToolButton* makVre::DtVreManagerWidget::myLoadButton = nullptr
protected

Load assignments toolbar button (new UI path)

◆ myEntityForceTypes

std::map<DtUUID, int> makVre::DtVreManagerWidget::myEntityForceTypes
protected

Cache of the last-observed force type for each entity in the tree.

Maps entity UUID to its last-known SISO force-type value. Updated in tryAddEntityToTree() whenever an entity is added or refreshed, and erased in removeEntityFromTree(). Used to detect force-type changes so that entityForceTypeChanged() can be emitted when the value differs.

◆ myKnownAggregates

std::set<DtUUID> makVre::DtVreManagerWidget::myKnownAggregates
protected

Set of aggregate UUIDs currently mirrored into the tree (Phase 8)

Populated as we walk DtSimObject::parent() chains during tryAddEntityToTree(). Lets signal_objectDeleted distinguish aggregate sim-object deletions (which prune via removeAggregateNode()) from entity deletions (which prune via removeEntityFromTree()).

◆ mySimEngineColumnVisible

bool makVre::DtVreManagerWidget::mySimEngineColumnVisible = false
protected

Whether the optional Sim Engine column (column 2) is currently visible.

Toggled at runtime via the entity/role tree header context menu (onTreeHeaderContextMenu). Kept purely in-memory — the column resets to hidden on every launch.

◆ mySimEngineRefreshTimer

QTimer* makVre::DtVreManagerWidget::mySimEngineRefreshTimer = nullptr
protected

Periodic timer that refreshes the Sim Engine column.

Fires every 2 seconds and calls refreshSimEngineAddresses() to pick up ownership transfers that change an entity's simulating engine address. Owned as a QObject child — cleaned up automatically.

◆ myInSectionResizeGuard

bool makVre::DtVreManagerWidget::myInSectionResizeGuard = false
protected

Re-entrancy guard for the per-column floor enforcement slot.

QHeaderView::minimumSectionSize is global, so per-column floors are enforced in setupNewUi() via a sectionResized lambda that calls resizeSection() back when a column drops below its floor. That nested resizeSection() re-enters the same signal; this flag short-circuits the second pass to avoid infinite recursion. See Phase 5a.


The documentation for this class was generated from the following file: