![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfGuiCommonQt library between VR-Forces 5.2 and VR-Forces 5.3.
vrfGuiCommonQt supplies the Qt widgets, dialogs, and dialog logic classes that are shared by the VR-Forces front-end applications and by customer-written GUI plug-ins.
The dominant theme of the release is the reworking of checkpointing into a general scenario snapshot and save mechanism. Nearly every symbol that used the word "Checkpoint" in a snapshot context was renamed to use "Scenario" or "Snapshot", and the delete-checkpoints dialog was replaced by a delete-scenarios dialog. Other significant changes are the migration of DtSessionStatusBox into its own header, the move of DtTagSelectorWidget from vrfGuiCoreQt into this library, the rework of the back-end remapping dialog onto DtBackEndSelectionCombo, and a new symbol identifier (SIDC) rendering path in DtVrfGuiSymbolMapper.
Changes that are internal to an implementation or limited to comments are not listed.
deleteCheckpointsDialog.h, deleteCheckpointsDialogInterface.h, and deleteCheckpointsDialogLogic.h were removed. They were renamed to deleteScenariosDialog.h, deleteScenariosDialogInterface.h, and deleteScenariosDialogLogic.h, and the classes they define were renamed to match. The design (a dialog class, an abstract interface, and a logic class) is unchanged, so most code needs only a mechanical substitution.
| 5.2 declaration | 5.3 declaration |
|---|---|
DtDeleteCheckpointsDialog | DtDeleteScenariosDialog |
DtDeleteCheckpointsDialogInterface | DtDeleteScenariosDialogInterface |
DtDeleteCheckpointsDialogLogic | DtDeleteScenariosDialogLogic |
DtDeleteCheckpointsDialogInterface::clearCheckpointsList() | DtDeleteScenariosDialogInterface::clearScenariosList() |
DtDeleteCheckpointsDialogLogic::checkpointSaved(double) | DtDeleteScenariosDialogLogic::scenarioSaved(double) |
Ui_DtDeleteCheckPointsDlg myUiImpl | Ui_DtDeleteScenariosDlg myUiImpl |
The generated UI header included by the dialog also changed from deleteCheckPointsDlgUi.hpp to deleteScenariosDlgUi.hpp.
The signal_checkpointsDeleted signal moved. In 5.2 it was a member of the concrete DtDeleteCheckpointsDialog; in 5.3 the equivalent signal_scenariosDeleted is declared on the abstract DtDeleteScenariosDialogInterface, alongside the existing signal_removeDeletedFiles. Code that connected to the signal through a concrete dialog pointer still compiles; code that declared its own implementation of the interface must account for the additional inherited signal.
The save-related API of DtVrfCheckpointManager in vrfCheckpointManager.h was renamed from checkpoint terminology to scenario terminology. The replacements are direct substitutions with identical signatures.
| 5.2 declaration | 5.3 declaration |
|---|---|
bool saveCheckpoints(const std::set<double>&) | bool saveScenarios(const std::set<double>&) |
bool saveCheckpoint(double) | bool saveScenario(double) |
bool saveCheckpoints() | bool saveScenarios() |
bool isSavingCheckpoints() const | bool isSavingScenarios() const |
void updateCheckpointsSavedStatus() | void updateSnapshotsSavedStatus() |
signal_savedScenarioCheckpoint | signal_savedScenario |
signal_savedCheckpointsCleared | signal_savedScenariosCleared |
signal_savingCheckpoints kept its name, so do not perform a global rename of every symbol containing "Checkpoint" in this header. Review each reference individually.
Two parameters were added so that periodic on-disk checkpointing can be scheduled independently of periodic in-memory snapshotting. There is no default for either new parameter, so every call site must be updated.
To preserve the 5.2 behavior, pass false and 0.0 for the new arguments.
The following protected virtuals were removed. Derived classes that override them will no longer be called, and the override will fail to compile if it is marked override.
Dialog creation is now performed through DtDeleteScenariosDialogCreator; register a subclass of that creator to substitute a custom dialog. Periodic save scheduling is driven by the back-end settings delivered to slot_settingReceived and exposed through currentSettings(), so the frequency and settings-change hooks are no longer needed. The protected member myPeriodicCheckpointFrequency was removed along with them.
scenarioSnapshotsWidgetInterface.h declares the abstract interface implemented by DtScenarioSnapshotsWidget. Any class deriving from the interface must rename its overrides, and any code connecting to the signals must use the new names.
| 5.2 declaration | 5.3 declaration |
|---|---|
virtual void setSavedCheckpoint(double, bool) = 0 | virtual void setSavedScenario(double, bool) = 0 |
signal_saveCheckpoints | signal_saveScenarios |
signal_enablePeriodicCheckpoints | signal_enablePeriodicSnapshots |
The signal signatures are unchanged: signal_saveScenarios still carries a const std::set<double>& and signal_enablePeriodicSnapshots still carries a bool. DtScenarioSnapshotsWidget in scenarioSnapshotsWidget.h was updated correspondingly, so its setSavedCheckpoint override is now setSavedScenario.
The matching logic class slots were renamed. All signatures are unchanged.
| 5.2 declaration | 5.3 declaration |
|---|---|
slot_saveCheckpoints(const std::set<double>&) | slot_saveScenarios(const std::set<double>&) |
slot_savedScenarioCheckpoint(double) | slot_savedScenario(double) |
slot_savedCheckpointsCleared(const std::set<double>&) | slot_savedScenariosCleared(const std::set<double>&) |
slot_savingCheckpoints(const std::set<double>&) | slot_savingScenarios(const std::set<double>&) |
slot_enablePeriodicCheckpoints(bool) | slot_enablePeriodicSnapshots(bool) |
slot_startingScenarioCheckpointTimeChanged(double, double) | slot_startingScenarioSnapshotTimeChanged(double, double) |
DtSessionStatusBox was defined at the bottom of commonScenarioManager.h in 5.2. It now lives in the new header vrfGuiCommonQt/sessionStatusBox.h. Code that used the class by including commonScenarioManager.h must add the new include.
The class itself changed in two ways that affect derived classes. A LoadingPlugins enumerator was added to DtSessionStatusBox::Status, and the protected member that displayed the per-back-end operation was replaced:
DtSessionStatusBox also gained a showEvent override. Subclasses that override showEvent must chain to the base implementation.
A trailing parameter was added to both methods so that the manager can suppress work that would be undone by a checkpoint load immediately following the close.
closeScenario defaults the new parameter, so existing call sites continue to compile and behave as before. Overrides of either method, and all call sites of postSaveClose, must be updated.
There is no replacement. Spot report data is delivered without an explicit front-end request.
A LoadingPlugins value was added and AllStatusDialogs was redefined to include it:
Code that stored AllStatusDialogs as a persisted value, or that assumed the set of bits it covers, must be reviewed. The same enumerator was added to DtSessionStatusBox::Status.
The remapping dialog was rebuilt around a tree of DtBackEndSelectionCombo widgets instead of a grid of QComboBox widgets. The abstract interface in remappingDialogInterface.h changed accordingly, so any class implementing it must be updated.
addMapTo lost its row parameter because ordering is now handled by the tree widget, and its return type changed. readdMapTo was removed; call addMapTo instead, which appends the entry. The new pure virtual mapAllTo returns the combo that drives the "map all" behavior and must be implemented.
The concrete dialog's public members reflect the new layout. Code that reached into the dialog to adjust its widgets must be reworked.
| 5.2 member | 5.3 replacement |
|---|---|
QLabel* myMissingBackendLabel | removed |
QLabel* myRemapToLabel | removed |
QFrame* mySeparator | removed |
QLabel* myMapAllLabel | removed |
QGridLayout* myEntryLayout | removed |
QComboBox* myMapAllComboBox | DtBackEndSelectionCombo* myMapAllComboBox |
| — | QTreeWidget* myBackends (new) |
The nested DtRemappingDialog::MapToEntry structure changed both of its members:
DtRemappingDialogLogic::myMapTo changed type from std::map<std::string, QComboBox*> to std::map<std::string, DtBackEndSelectionCombo*>.
DtTreeWidget now derives from makVrv::DtStyledQTreeWidget rather than directly from QTreeWidget:
DtStyledQTreeWidget is itself a QTreeWidget, so pointer conversions and most usage are unaffected. Derived classes that explicitly name QTreeWidget when chaining to a base implementation must name makVrv::DtStyledQTreeWidget instead. treeWidget.h now includes vrvCoreQt/DtStyledQTreeWidget.h.
DtTreeWidget also gained an eventFilter override; subclasses that override eventFilter must chain to the base implementation so that header context-menu handling continues to work.
addBackend and removeBackend moved from the protected section to the public section of both classes. This is source compatible for callers and for existing overrides, but code that relied on the members being inaccessible from outside the class hierarchy will now compile differently.
There is no replacement. The protected member myIsDestroyed was removed at the same time; derived classes must use the existing damage state accessors instead of reading the flag directly.
Code that switches exhaustively over ShowHideFlags, or that treats the enumeration as a closed set when persisting hidden state, must handle the new values.
Both getIcon overloads, and the protected milStdRender, changed the default value of the milStdOutlineColor parameter from Qt::black to a default-constructed, invalid QColor:
An invalid color now means "use the color determined by the current symbology settings", while Qt::black continues to mean "force a black outline". Callers that relied on the default producing a black outline must pass Qt::black explicitly.
The elevational wind configuration handlers were renamed and are now overrides of base class virtuals rather than plain virtuals. Derived classes must rename their overrides.
The override was removed; the base class implementation is used. Derived classes that called through to this class's implementation should call the base class directly.
Callers are unaffected because the new parameter is defaulted, but overrides must be updated. slot_utcDateTimeChanged(time_t) moved from the protected section to the public section of the same class, and the protected member mySetTimeBasedOnCreation was renamed to mySetKeepTimeLocalContanstant.
This protected virtual was removed. updateForUtcTime remains, and the widget now drives local-time display through the time zone manager included from vrfGuiCore/timeZoneManager.h. The class also gained a setEnabled(bool) override that propagates the enabled state to the contained entry widgets; subclasses overriding setEnabled must chain to it.
The widget now overrides several base class virtuals that a subclass may also have been overriding: initDepthOffsetWidgets, initWaveFetchWidgets, on_addElevationalConfigurationButtonClicked, on_multiElevationWindCellClicked, and on_elevationalConfigurationChanged. Subclasses that override any of these must chain to the DtVrfEnvironmentConditionsWeatherWidget implementation rather than to the base class implementation, or the global weather and elevational wind controls will not behave correctly.
The VrfWidgetGroupId enumeration gained VrfWidgetGroupIdCreateGlobalWeatherWidgets immediately before VrfWidgetGroupId_ExtraWidgets. Because VrfWidgetGroupId_ExtraWidgets is documented as the starting point for application-defined identifiers, its numeric value shifted by one. Any persisted or hard-coded numeric widget group identifier must be recomputed.
The protected member QFrame* mySeparatorLine was removed from the graph container class. Derived classes that referenced it must be updated; there is no replacement.
| 5.2 path | 5.3 path |
|---|---|
vrfGuiCommonQt/deleteCheckpointsDialog.h | vrfGuiCommonQt/deleteScenariosDialog.h |
vrfGuiCommonQt/deleteCheckpointsDialogInterface.h | vrfGuiCommonQt/deleteScenariosDialogInterface.h |
vrfGuiCommonQt/deleteCheckpointsDialogLogic.h | vrfGuiCommonQt/deleteScenariosDialogLogic.h |
vrfGuiCoreQt/tagSelectorWidget.h | vrfGuiCommonQt/tagSelectorWidget.h |
vrfGuiCommonQt/commonScenarioManager.h (for DtSessionStatusBox) | vrfGuiCommonQt/sessionStatusBox.h |
DtTagSelectorWidget, DtStickyButton, DtOutlineButton, and DtTagSelectorWidgetCreator moved from vrfGuiCoreQt to vrfGuiCommonQt. The class names and the declarations are otherwise unchanged, but the export macro changed from DT_DLL_VRFGUICOREQT to DT_DLL_VRFGUICOMMONQT. Update the include path, and make sure the project links vrfGuiCommonQt rather than relying on vrfGuiCoreQt to supply these symbols.
Besides relocating DtSessionStatusBox, the new header introduces a creator class so that applications can substitute their own status box:
Register a subclass at startup to have VR-Forces construct a derived status box.
deleteScenariosDialog.h adds a creator for the delete-scenarios dialog, replacing the protected DtVrfCheckpointManager::createDeleteCheckpointsDialog factory method:
A new overload saves a named scenario checkpoint and reports the file it produced:
Periodic snapshot and checkpoint settings received from the back-ends are now exposed directly:
signal_settingsReceived fires when a back-end reports its periodic snapshot configuration, and signal_checkpointSaved fires with the path of each checkpoint file written to disk. The protected virtual doPendingWaitWork was added so derived classes can participate in the wait for those files to appear.
Loading a scenario checkpoint can now be posted as a Qt event, matching the existing pattern for posting a scenario load:
Use postLoadScenarioCheckpointEvent from a context where the load cannot be performed immediately; loadScenarioCheckpoint performs the load directly.
DtCommonScenarioManager can now defer a scenario load until every discovered simulation engine has reported its plug-in set, which prevents a load from failing because a required back-end plug-in has not been announced yet:
slot_pluginsAdded retries a deferred load when new plug-in data arrives, and clearPendingPluginsLoadInformation abandons the deferred load. The LoadingPlugins status value described above is displayed while the manager is waiting.
searchWidget.h adds a line edit that paints placeholder text when it is empty:
The header now includes vrfGuiCommonQt/qtLineEdit.h instead of forward declaring QLineEdit. DtSearchWidget itself is unchanged.
DtTreeWidget can now report right clicks on its header view:
col is the logical column index under the cursor. The default is off, so existing behavior is preserved.
The back-end combo gained several methods that the reworked remapping dialog relies on, and that are useful when embedding the combo in a custom dialog:
setAsComboOnly turns off the automatic back-end tracking logic so that the widget behaves as a plain, ordered list of back-end names.
setItemSpacing controls the vertical padding applied to the item, and clearHiddenFilters clears every ShowHideFlags bit at once instead of calling setHidden(false, ...) per flag.
DtObjectListViewItemDelegate gained two size hint methods that return a hint appropriate for the view rather than for a menu or tooltip:
The symbol mapper can now render a symbol directly from a symbol identification code, selecting between the MIL-STD-2525D and APP-6D symbol sets:
If sidc is empty, the code is taken from the current model set entry for the key. If symbolSet is Undefined, the system default is used. The existing getIcon methods dispatch to this path automatically when the user has selected a SIDC-based symbology, so most code does not need to call getSidcIcon directly.
Related additions notify the mapper of symbology changes and let clients react to cache invalidation:
clear now delegates to the new clearCache and then emits signal_cleared. Connect to signal_cleared to repaint any widget holding pixmaps obtained from the mapper.
DtVrfEnvironmentConditionsWeatherLogic can suppress weather condition updates while the user is editing a preset:
setBlockWeatherConditionUpdates returns the previous value, so it can be saved and restored around a block of edits.
DtVrfEnvironmentConditionsWeatherWidget gained a setter so the widget can reach its logic object:
DtVrfEnvironmentConditionsDateAndTimeWidget::updateTimeDisplay forces the displayed time to be recomputed from the current UTC time and format settings.
The session startup dialog gained a browse button for the terrain, mirroring the existing simulation model set browse button:
The widget now has a toolbar button that re-pings the back-ends on demand. The protected members myButtonBarLayout and myRefreshButton were added to support it.
In addition to moving into this library, the tag selector gained the following public API:
setAlwaysShowTagsAtLevel makes the widget display every tag at a category level, disabling those that are not present in the current tag set instead of hiding them. approximateSize is useful when sizing a container around the widget before it is populated.
| Header | Breaking | Additions |
|---|---|---|
backEndSelectionList.h | addBackend and removeBackend moved to public on DtBackEndSelectionList and DtBackEndSelectionCombo | setAsComboOnly; addBackend taking DtSimulationAddress; selectBackend; backends() |
commonScenarioManager.h | DtSessionStatusBox moved out; closeScenario and postSaveClose signature changes; requestSpotReports removed; StatusDialogs gained LoadingPlugins | LoadScenarioCheckpointEvent and checkpoint load methods; plug-in wait methods |
deleteCheckpointsDialog*.h | Removed; renamed to deleteScenarios* | — |
deleteScenariosDialog*.h | — | Renamed dialog, interface, and logic classes; DtDeleteScenariosDialogCreator; signal_scenariosDeleted |
objectListViewItem.h | isTDLItem removed; myIsDestroyed removed; ShowHideFlags gained values | setItemSpacing; itemSpacing; clearHiddenFilters; ...SizeHintForView delegate methods |
performanceMonitorGraph.h | mySeparatorLine removed | — |
performanceMonitorWidget.h | None | refresh slot |
remappingDialog*.h | addMapTo signature and return type changed; readdMapTo removed; mapAllTo added as pure virtual; dialog members and MapToEntry changed; myMapTo type changed | — |
scenarioSnapshotsWidget*.h | setSavedCheckpoint renamed; signals and slots renamed | — |
searchWidget.h | None | DtEmptyTextLineEdit |
sessionStartupDialog.h | None | onSelectTerrain; mySelectTerrain |
sessionStatusBox.h | New location for DtSessionStatusBox; myOperation replaced by myOperationsList; showEvent override | DtSessionStatusBoxCreator; LoadingPlugins status |
tagSelectorWidget.h | Moved from vrfGuiCoreQt; export macro changed | approximateSize; supportedCategoryCount; setShowIndividualCategories; setAlwaysShowTagsAtLevel; setTopLevelCategoryVisible |
treeWidget.h | Base class changed to makVrv::DtStyledQTreeWidget; eventFilter override added | setSignalContextMenuRequestedForHeader; headerContextMenu signal |
vrfCheckpointManager.h | Save methods and signals renamed; schedulePeriodicSnapshoting signature changed; four protected virtuals and myPeriodicCheckpointFrequency removed | saveScenario with run identifier; periodic settings accessors and signals |
vrfEnvironmentConditionsDateAndTimeLogic.h | onUpdateTimeRequested override removed | — |
vrfEnvironmentConditionsDateAndTimeWidget.h | setDateAndTimeOfDay signature changed; slot_utcDateTimeChanged moved to public; mySetTimeBasedOnCreation renamed | updateTimeDisplay |
vrfEnvironmentConditionsWeatherLogic.h | onAddElevationalWind and onRemoveElevationalWind renamed to ...ElevationalConfiguration and made overrides | setBlockWeatherConditionUpdates; blockWeatherConditionUpdates |
vrfEnvironmentConditionsWeatherWidget.h | New overrides of base virtuals; VrfWidgetGroupId_ExtraWidgets value shifted | setLogic; global weather widgets and slots |
vrfEnvironmentalDateTimeEntryWidget.h | updateForLocalTime removed | setEnabled override |
vrfGuiSymbolMapper.h | getIcon and milStdRender outline color default changed to an invalid QColor | getSidcIcon overloads; clearCache; notifyStandardChanged; notifyColorByForceChanged; signal_cleared |
Return to VR-Forces 5.3 API Migration Guide.
[Home]