VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfGuiCoreQt Library API Changes

Table of Contents

This document describes the public API changes in the vrfGuiCoreQt library between VR-Forces 5.2 and 5.3.

This library holds the Qt dialogs, menu items, toolbars, and panel pages that make up the VR-Forces front end, and it is the library most often subclassed or replaced by toolkit applications that customize the user interface.

The bulk of the change in 5.3 falls into four areas: the checkpoint and snapshot user interface was reworked and expanded, the scenario run-duration dialog became a run-until dialog, the selection filter API used by the entity selection and aggregate dialogs gained explicit filter execution, and the Tactical Data Link (TDL) message user interface was removed. In addition, several dialogs gained creator classes so that applications can substitute their own subclasses.

Changes that are internal to an implementation or limited to comments are not listed.

Breaking Changes

Selection filter application is now explicit

DtEntitySelectionDialog, DtAggregateAsDialog, and the DtAggregateAsDialogInterface abstract base all changed the way selection filters are applied. In 5.2, each call to addFilter re-ran the filter over the list immediately. In 5.3, addFilter takes an executeFilter flag that defaults to false, and a new filterItems method applies the accumulated filter set in one pass. Add all filters first, then call filterItems once.

// 5.2
dialog->addFilter(new DtVrfForceFilter(force));
dialog->addFilter(new DtVrfAggregateFilter());
// 5.3
dialog->addFilter(new DtVrfForceFilter(force));
dialog->addFilter(new DtVrfAggregateFilter());
dialog->filterItems();

The affected declarations are:

Class 5.2 declaration 5.3 declaration
DtAggregateAsDialogInterface virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*) = 0; virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*, bool executeFilter = false) = 0;
DtAggregateAsDialogInterface *(none)* virtual void filterItems() = 0;
DtAggregateAsDialog virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*) override; virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*, bool executeFilter = false) override;
DtEntitySelectionDialog virtual void addFilter(const DtVrfSelectionFilter* f); virtual void addFilter(const DtVrfSelectionFilter* f, bool executeFilter = false);

Because filterItems is pure virtual on DtAggregateAsDialogInterface, any class that implements that interface directly must supply an implementation before it will compile.

selectFilter was removed

DtAggregateAsDialogInterface::selectFilter(int) and the DtAggregateAsDialog override were removed. There is no replacement; filter selection by index is no longer part of the contract. Code that called selectFilter should instead build the desired filter set through addFilter and apply it with filterItems.

Scenario run duration became run until

The dialog that controlled how long a scenario runs was reworked to specify an absolute stop time rather than a duration. The header, the dialog class, the menu item class, and the time entry widget member were all renamed. The class structure is otherwise identical, so the update is mechanical.

5.2 name 5.3 name
vrfGuiCoreQt/setScenarioRunDurationDialog.h vrfGuiCoreQt/setScenarioRunUntilDialog.h
DtSetScenarioRunDurationDialog DtSetScenarioRunUntilDialog
DtSetScenarioRunDurationDialog::myRunDurationTime DtSetScenarioRunUntilDialog::myRunUntilTime
DtSetScenarioRunDurationMenuItem (in playScenarioMenuItem.h) DtSetScenarioRunUntilMenuItem

The static create and registerInstance entry points keep their names and signatures on the renamed class:

// 5.2
DtSetScenarioRunDurationDialog* d = DtSetScenarioRunDurationDialog::create(de, parent);
// 5.3
DtSetScenarioRunUntilDialog* d = DtSetScenarioRunUntilDialog::create(de, parent);

DtAvailableCheckpointsWidget was renamed to DtAvailableSnapshotsWidget

The widget that shows the available snapshot list was renamed to match the terminology already used by its methods and members. The header moved with it. The class layout, the protected virtuals, and the public widget members are unchanged.

5.2 name 5.3 name
vrfGuiCoreQt/availableCheckpointsWidget.h vrfGuiCoreQt/availableSnapshotsWidget.h
DtAvailableCheckpointsWidget DtAvailableSnapshotsWidget
DtAvailableCheckpointsWidgetBuilder DtAvailableSnapshotsWidgetBuilder

Applications that registered a custom builder for this widget must register the renamed builder type.

Tactical Data Link message user interface was removed

The TDL message list and its context menu were removed from the front end. The following public and protected virtuals no longer exist:

// vrfContextMenuManager.h -- DtVrfContextMenuManager
virtual std::string createTDLMessageContextMenu(DtVrfContextMenuAssembler&,
// vrfHierarchyPageLogic.h -- DtVrfHierarchyPageLogic
virtual void filterTDLItems();
// vrfOrganizedObjectListPanelPage.h -- DtVrfOrganizedObjectListPageLogic
virtual DtObjectListViewItem* addTDLDomainItem(const std::string&);
virtual void slot_tdlReportModified(DtSimObjectReference);
virtual void createTDLDataRootNode();
virtual void filterTDLItems() override;

The associated protected members myTDLForceType, myDomainItems, and myTDLReportRootNode were removed from DtVrfOrganizedObjectListPageLogic. Subclasses that overrode any of the removed virtuals will fail to compile because of the override specifier, and subclasses that referenced the removed members must drop those references. There is no replacement user interface.

DtVrfHierarchyPageLogic object discovery staggering is now a threshold

Staggered object discovery changed from an on/off switch to a work threshold. The setter and getter changed type, and the default changed from false to -1.

// 5.2
virtual void setStaggerObjectDiscovery(bool);
bool staggerObjectDiscovery() const;
// 5.3
virtual void setStaggerObjectDiscovery(int);
int staggerObjectDiscovery() const;

Code that passed true should pass the operation count at which staggering should begin. Code that passed false should pass a negative value to disable staggering. Overrides of the setter must change their parameter type.

DtQtVrfScriptedTaskManager::addScriptedTaskMetaData returns bool

The protected override changed its return type to report whether the metadata was accepted:

// 5.2
virtual void addScriptedTaskMetaData(const DtScriptedTaskMetaData&, bool signal = true) override;
// 5.3
virtual bool addScriptedTaskMetaData(const DtScriptedTaskMetaData&, bool signal = true) override;

This change originates in the base class in vrfutil. Any subclass that overrides this method must change its return type and return a value.

DtLocalWeatherManagerWidget::slot_removed takes a DtUUID

The removal notification is now keyed by simulation object UUID rather than by element ID:

// 5.2
virtual void slot_removed(makVrv::DtElementID);
// 5.3
virtual void slot_removed(const DtUUID&);

DtMissileTargetWidget::itemClicked was replaced by itemSelectionChanged

The widget now reacts to selection changes rather than to clicks, so the protected slot was replaced:

// 5.2
protected slots:
virtual void itemClicked(QTreeWidgetItem*);
// 5.3
protected slots:
virtual void itemSelectionChanged();

Subclasses that overrode itemClicked must move that logic into itemSelectionChanged and query the widget for the current selection rather than relying on the item argument.

DtSensorControlDialog tracking mode type and misspelled method

The dialog now uses the generalized aimable system enumerations instead of the sensor-specific ones. The header include changed from vrfExtObjects/sensorFieldOfViewEnums.h to vrfExtObjects/aimableSystemEnums.h, and the protected member type changed accordingly:

// 5.2
DtSensorTrackingMode myCurrentMode;
// 5.3

At the same time, the misspelled method checkJoystickAvailablity was corrected to checkJoystickAvailability. Overrides and call sites must use the corrected spelling.

Random number seed, start time, and day/night display elements were removed

The scenario information and scenario modification classes no longer expose a random number seed, a starting date and time, or a day/night model element. The following enumerators were removed from DtScenarioInformationWidget::DisplayElement:

Removed enumerator
StartingDateAndTime
UseDayNightModel
RandomNumberSeed

The remaining enumerators keep their relative order, but because the enumeration is unscoped and implicitly valued, any code that relied on the numeric value of an enumerator after the removed ones must be rechecked. These enumerators are accepted by setDisplayChangeWarningIcon, setVisibleScreenElement, and setEnableScreenElement on DtScenarioInformationWidget, DtScenarioPreviewWidget, DtScenarioPreviewPage, and DtScenarioDescriptionDialog; calls passing a removed enumerator must be deleted.

In DtScenarioModificationHandler, the corresponding RandomNumberSeed = 0x00000040 bit was removed from the change-on-save flag enumeration. The bit value itself is now unused and reserved, so existing flag masks remain numerically valid, but the named constant is gone.

Finally, the protected helper DtScenarioInformationWidget::updateTimeOfDay(std::string, std::string) was removed. There is no replacement.

setScenario takes a const DtScenario pointer

Both DtScenarioInformationWidget and DtScenarioPreviewWidget now accept a const scenario pointer:

// 5.2
virtual bool setScenario(DtScenario* scenario); // DtScenarioInformationWidget
virtual void setScenario(DtScenario* scenario); // DtScenarioPreviewWidget
// 5.3
virtual bool setScenario(const DtScenario* scenario);
virtual void setScenario(const DtScenario* scenario);

Overrides must add const to the parameter type or they will no longer override the base declaration.

DtPointObjectDefinitionWidget::includeSpacer was removed

virtual void includeSpacer(bool flag);

Layout spacing is now handled by the widget's expand and collapse behavior for the visual marking and airbase sections. Remove calls to includeSpacer; there is no replacement.

DtPointObjectDefinitionWidget altitude setters take a conversion flag

Both altitude setters gained a trailing parameter that controls whether the supplied value is converted before it is displayed. The parameter defaults to a false value, so existing calls compile unchanged, but overrides must match the new signature:

// 5.2
virtual void setAltitudeAboveTerrain(double altitude);
virtual void setAltitudeAboveSeaLevel(double altitude);
// 5.3
virtual void setAltitudeAboveTerrain(double altitude, double convert = false);
virtual void setAltitudeAboveSeaLevel(double altitude, double convert = false);

Aggregate menu items no longer override createAction

The expand and collapse aggregate menu items in vrfEntityMenu.h now rely on the base makVrv::DtMenuItem::createAction implementation. The following overrides were removed:

Class Removed overrides
DtVrfExpandAggregateMenuItem createAction
DtVrfExpandAllAggregateMenuItem createAction
DtVrfCollapseAggregateMenuItem createAction, on_aboutToShow
DtVrfCollapseAllAggregateMenuItem createAction

A subclass that called the removed override through its own createAction must call the base class implementation instead.

DtVrfOrganizedObjectListPageLogic::mySpotReportsObserved changed type

The protected map that tracks observed spot reports is now keyed to UUIDs rather than element unique identifiers:

// 5.2
std::map<makVrv::DtUniqueID, std::set<makVrv::DtUniqueID> > mySpotReportsObserved;
// 5.3
std::map<makVrv::DtUniqueID, std::set<DtUUID> > mySpotReportsObserved;

DtScenarioEventManagerDialog::myGrayscaleImage was removed

The protected QPixmap myGrayscaleImage member was removed. Subclasses that referenced it must supply their own pixmap.

Renamed and Moved Headers

5.2 path 5.3 path
vrfGuiCoreQt/availableCheckpointsWidget.h vrfGuiCoreQt/availableSnapshotsWidget.h
vrfGuiCoreQt/setScenarioRunDurationDialog.h vrfGuiCoreQt/setScenarioRunUntilDialog.h
vrfGuiCoreQt/tagSelectorWidget.h vrfGuiCommonQt/tagSelectorWidget.h

tagSelectorWidget.h moved without changing its contents so that it can be shared by front-end components outside vrfGuiCoreQt. Applications that included it directly must update the include path. vrfGuiCoreQt/createObjectPaletteInterface.h now pulls in the header from its new location, so code that relied on that transitive include continues to work.

Additions

Scenario checkpoint user interface

A complete user interface for browsing, loading, renaming, and deleting back-end scenario checkpoints was added.

vrfGuiCoreQt/loadScenarioCheckpointDialog.h defines DtLoadScenarioCheckpointDialog, a dialog that queries the connected back ends for their checkpoint files and presents them as a scenario run tree with the checkpoints for the selected run. It offers load, save-as-scenario, rename, delete checkpoint, delete scenario, and information actions, all exposed as protected virtuals so that subclasses can alter individual behaviors. The companion DtLoadScenarioCheckpointDialogCreator follows the registered-creator pattern described below.

vrfGuiCoreQt/scenarioCheckpointsWidget.h defines DtScenarioCheckpointsWidget, a toolbar widget for taking a checkpoint, opening the checkpoint settings, enabling periodic checkpoints, and opening the checkpoint manager. It is accompanied by DtScenarioCheckpointsToolbar, a makVrv::DtToolbar subclass that builds the toolbar, and DtScenarioCheckpointsWidgetBuilder.

DtLoadScenarioCheckpointMenuItem was added to vrfGuiCoreQt/loadScenarioMenuItem.h to open the new dialog from a menu.

DtVrfScenarioManager gained the corresponding entry points:

virtual void loadScenarioCheckpointFromDialog(QWidget* p);
protected:
virtual void postSaveLoadScenarioCheckpointFromDialog(QWidget*);
virtual DtLoadScenarioCheckpointDialog* createLoadScenarioCheckpointDialog(QWidget* p);
protected slots:
virtual void checkpointDialogDestroyed();

Dialog creator classes

Three dialogs gained a creator class so that an application can substitute its own dialog subclass without replacing the code that opens the dialog. All three follow the same shape:

class DT_DLL_VRFGUICOREQT DtLoadScenarioDialogCreator : public makVrv::DtVirtualBaseClass
{
public:
DtLoadScenarioDialogCreator(makVrv::DtDe&);
virtual ~DtLoadScenarioDialogCreator() override;
static DtLoadScenarioDialogCreator& instance(makVrv::DtDe&);
static void registerInstance(makVrv::DtDe& de, DtLoadScenarioDialogCreator* instance);
virtual DtLoadScenarioDialog* create(QWidget* parent, const Qt::WindowFlags& flags = Qt::Tool);
protected:
makVrv::DtDe& myDe;
};
Header Creator Default window flags
loadScenarioDialog.h DtLoadScenarioDialogCreator Qt::Tool
loadScenarioCheckpointDialog.h DtLoadScenarioCheckpointDialogCreator Qt::Tool
joinSessionDialog.h DtJoinSessionDialogCreator 0

Register a subclass creator during application startup, before the dialog is first opened.

DtClearAllWarningsMenuItem

The new header vrfGuiCoreQt/clearAllWarningsMenuItem.h defines a makVrv::DtMenuItem subclass that clears all outstanding warnings. Its action is enabled and disabled in response to console messages.

DtUnitHasSystemNamed palette filter

vrfGuiCoreQt/createObjectPaletteFilters.h gained a DtPaletteFilter subclass that accepts a creation item only if the unit has a system with the given name:

class DT_DLL_VRFGUICOREQT DtUnitHasSystemNamed : public DtPaletteFilter
{
public:
DtUnitHasSystemNamed(makVrv::DtDe&, const DtString& name);
DtUnitHasSystemNamed(const DtUnitHasSystemNamed&);
virtual ~DtUnitHasSystemNamed() override;
virtual bool shouldAddCreationItem(const DtCreateObjectPaletteItem&,
const std::set<std::string>& categories, const std::string& deployedCountry,
int force) const override;
virtual DtPaletteFilter* clone() const override;
virtual bool operator==(const DtPaletteFilter&) const override;
// ...
};

Note that local palette filters combine with a logical OR: if any registered filter accepts an item, the item is added. This was previously undocumented and is now stated in DtCreateObjectPaletteLogic::addLocalPaletteFilter.

Scenario information and preview

DtScenarioInformationWidget gained an overload that fills the display from a scenario object rather than from a file name:

virtual bool displayScenarioInformation(const DtScenario& u);

DtScenarioPreviewWidget and DtScenarioPreviewPage each gained a matching virtual:

virtual void previewScenario(const DtScenario&);

This overloads the existing previewScenario(const QString&) slot. A subclass that declares its own previewScenario will hide both base overloads unless it introduces them with a using declaration.

Point object definition dialog

DtPointObjectDefinitionWidget gained altitude mode control, a location backup mechanism, and collapsible sections:

virtual QSize sizeHint() const override;
virtual void setUseAltitudeAboveSeaLevel(bool);
virtual void setMaintainCurrentAltitude(bool);
virtual void clearBackupLocation();
virtual void cacheBackupLocation();
protected slots:
virtual void expansionStateChanged(bool, const QSize&, const QSize&);
virtual void collapseVisualMarkings();
virtual void expandVisualMarkings();
virtual void collapseAirbase();
virtual void expandAirbase();

DtPointObjectDefinitionDialogLogic gained the matching clearBackupLocation and cacheBackupLocation virtuals. The dialog also exposes new public widget members for the airbase section header (myAirbaseTitleWidget, myAirbaseTitleLayout, myAirbaseLabel, myAirbaseSeparator, myExpandCollapseAirbase) and a myCanvas container widget.

DtMunitionDetonationDefinitionDialog now overrides setLocation:

virtual void setLocation(const DtVector& pt, bool resetAltitude) override;

Missile target copy and paste

DtMissileTargetWidget gained public activation and protected copy and paste support:

virtual void activate();
protected:
virtual void updatePasteButton();
virtual void copyMissileTarget();
virtual void pasteMissileTarget();

Object list panel page expansion and header menu

DtVrfOrganizedObjectListPanelPage gained a header context menu with expand-all and collapse-all actions, plus an activation override:

virtual void activate() override;
virtual void createHeaderContextMenu();
virtual void expandChildren(QTreeWidgetItem* parentItem, bool);
protected slots:
virtual void showHeaderContextMenu(const QPoint&, int);
virtual void expandAll();
virtual void collapseAll();

The corresponding protected members myRightClickHeaderMenu, myExpandAll, and myCollapseAll were added. DtVrfOrganizedObjectListPageLogic gained createBullseyeObjectRootNode so that bullseye objects appear under their own root node.

Hierarchy page state view removal

DtVrfHierarchyPageLogic gained a notification for state view removal, matching the existing slot_onStateViewAdded:

virtual void slot_onStateViewDeleted(DtSimObjectReference);

Script editor metadata hints

DtScriptEditor can now be given scripted task metadata to write alongside the temporary script file that is handed to the external editor:

virtual void setTempMetaDataHint(const std::string& scriptId, const DtScriptedTaskMetaData& md);

vrfGuiCoreQt/scriptEditor.h now includes vrfutil/scriptedTaskMetaData.h for the parameter type.

Selection group fog of war

DtSelectionGroupWidget gained a protected virtual that is invoked when the fog of war filter changes, so that group membership can be re-evaluated:

virtual void slot_fogOfWarFilterChanged();

Summary of Header Changes

Header Breaking Additions
aggregateAsDialog.h addFilter signature; selectFilter removed filterItems
aggregateAsDialogInterface.h addFilter signature; selectFilter removed; new pure virtual filterItems
availableCheckpointsWidget.h Renamed to availableSnapshotsWidget.h None
clearAllWarningsMenuItem.h None DtClearAllWarningsMenuItem
createObjectPaletteFilters.h None DtUnitHasSystemNamed
createObjectPaletteInterface.h Include path of tagSelectorWidget.h None
entitySelectionDialog.h addFilter signature filterItems
joinSessionDialog.h None DtJoinSessionDialogCreator
loadScenarioCheckpointDialog.h None DtLoadScenarioCheckpointDialog, creator
loadScenarioDialog.h None DtLoadScenarioDialogCreator
loadScenarioMenuItem.h None DtLoadScenarioCheckpointMenuItem
localWeatherManagerWidget.h slot_removed parameter type None
missileTargetWidget.h itemClicked replaced by itemSelectionChanged activate, copy and paste
munitionDetonationDefinitionDialog.h None setLocation override
playScenarioMenuItem.h DtSetScenarioRunDurationMenuItem renamed None
pointObjectDefinitionDialog.h includeSpacer removed; altitude setter signatures Altitude mode, backup location, collapsible sections
pointObjectDefinitionDialogLogic.h None clearBackupLocation, cacheBackupLocation
qtVrfScriptedTaskManager.h addScriptedTaskMetaData return type None
scenarioCheckpointsWidget.h None DtScenarioCheckpointsWidget, toolbar, builder
scenarioEventManagerDialog.h myGrayscaleImage removed None
scenarioInformationWidget.h DisplayElement enumerators removed; setScenario const; updateTimeOfDay removed displayScenarioInformation(const DtScenario&), previewScenario(const DtScenario&)
scenarioModificationHandler.h RandomNumberSeed flag removed None
scenarioPreviewPage.h None previewScenario(const DtScenario&)
scriptEditor.h None setTempMetaDataHint
selectionGroupWidget.h None slot_fogOfWarFilterChanged
sensorControlDialog.h DtSensorTrackingMode replaced; checkJoystickAvailablity renamed None
setScenarioRunDurationDialog.h Renamed to setScenarioRunUntilDialog.h None
tagSelectorWidget.h Moved to vrfGuiCommonQt None
vrfContextMenuManager.h createTDLMessageContextMenu removed None
vrfEntityMenu.h Aggregate menu item overrides removed None
vrfHierarchyPageLogic.h setStaggerObjectDiscovery type; filterTDLItems removed slot_onStateViewDeleted
vrfOrganizedObjectListPanelPage.h TDL methods and members removed; mySpotReportsObserved type Header context menu, expand and collapse, bullseye root node
vrfScenarioManager.h None Checkpoint dialog entry points

Return to VR-Forces 5.3 API Migration Guide.

[Home]


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)