![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfGuiTaskSetQt library between VR-Forces 5.2 and 5.3.
The library provides the task, conditional, and simulation command dialogs that make up the front-end task set editor, along with the base classes a toolkit developer derives from when adding a custom task, conditional, or simulation command to the user interface.
Roughly 230 public headers in this library carry a difference between the two releases, but the overwhelming majority of those differences are version-control property updates or comment revisions. The sections below cover only the headers whose public or protected interface actually changed.
Changes that are internal to an implementation or limited to comments are not listed.
Most of the conditional dialog headers are unchanged at the source level between 5.2 and 5.3. The breaking changes are concentrated in three places: the filtered-list-view filtering contract, the sizing contract on the base task/set dialog, and a new fog-of-war query on the conditional expression and command assignment interfaces.
In 5.2, each call to addFilter() immediately re-ran filtering, and callers selected a filter afterwards through selectFilter() or selectFirstNonEmptyFilter(). In 5.3 filters are accumulated and applied in a single pass. DtBaseFilteredListViewTaskSetDialog::addFilter() gained an executeFilter parameter that defaults to false, and a new filterItems() method performs the filtering once all filters have been added.
Before (5.2):
After (5.3):
Existing calls to addFilter() still compile, but a dialog that adds filters and then expects the list to be populated must now call filterItems() once at the end. Subclasses that override addFilter() must update their signature to match the new parameter, otherwise the override silently becomes an unrelated overload and the base implementation is used instead.
The corresponding selection entry points were removed from the command assignment widget contract. DtCommandAssignmentWidgetInterface is a pure-virtual interface, so this is a compile break for any toolkit class deriving from it.
Before (5.2):
After (5.3):
Affected classes:
| Class | Header | Change |
|---|---|---|
DtBaseFilteredListViewTaskSetDialog | baseFilteredListViewTaskSetDialog.h | addFilter() gained bool executeFilter = false; filterItems() added |
DtCommandAssignmentWidgetInterface | commandAssignmentWidgetInterface.h | Pure virtuals selectFilter(int) and selectFirstNonEmptyFilter() removed; pure virtual filterItems() added |
DtCommandAssignmentWidget | commandAssignmentWidget.h | Overrides of selectFilter(int) and selectFirstNonEmptyFilter() removed; filterItems() override added |
DtCommandAssignmentWidgetLogic | commandAssignmentWidgetLogic.h | selectFilter(int) and selectFirstNonEmptyFilter() removed |
Remove any override of selectFilter() or selectFirstNonEmptyFilter() from your subclasses and implement filterItems() instead.
Dialog sizing is now driven by Qt's resize event rather than by direct calls, and the two sizing entry points moved from non-slot / protected-slot declarations into the public slots section so that they can be connected as slots.
Before (5.2):
After (5.3):
finishSizing() is no longer a plain public method and resizeToContents() is no longer protected. Subclasses that overrode resizeToContents() from a protected slots: block should move the override to public slots:. Code that relied on the old non-slot finishSizing() continues to compile, but layout work that a subclass previously performed by calling these methods directly should be reviewed against the new resizeEvent() hook, which the base class now implements.
Two dialogs also became size-aware by overriding the standard Qt size hints. If your subclass already implemented these, verify it calls the new base implementation rather than QDialog's.
| Class | Header | Added overrides |
|---|---|---|
DtBaseFilteredListViewTaskSetDialog | baseFilteredListViewTaskSetDialog.h | sizeHint(), minimumSizeHint() |
DtBaseLocationReferenceDialog | baseLocationReferenceDialog.h | sizeHint(), minimumSizeHint() |
5.3 adds a checkFogOfWarConditions() query that lets a conditional or a command assignment decide whether the entities it offers should be restricted by fog of war. The base implementation returns true, so existing subclasses keep the previous behavior without source changes.
| Class | Header | Change |
|---|---|---|
DtConditionalExpressionInterface | conditionalExpressionInterface.h | Virtual checkFogOfWarConditions() const added, returning true |
DtScenarioEventConditional | scenarioEventConditional.h | Overrides checkFogOfWarConditions() const |
DtCommandAssignmentWidgetLogic | commandAssignmentWidgetLogic.h | Virtual checkFogOfWarConditions() const added |
Override this method in a custom conditional whose selection list should ignore fog-of-war restrictions.
The remaining framework, conditional, and shared widget headers in this library carry no source-level API changes between 5.2 and 5.3. This includes all of the individual conditional dialogs (andConditional.h, breachedConditional.h, the ent*Conditional.h family, randomConditional.h, resourceConditional.h, simTimeConditional.h, simDateTimeConditional.h, trueConditional.h, falseConditional.h, and the rest), the conditional dialog wrappers (ifConditionalDialog.h, whenConditionalDialog.h, whileConditionalDialog.h, waitUntilConditionalDialog.h, registerTriggerDialog.h), taskSetMenuItems.h, taskSetVectorFormatter.h, vrfTaskSetDialogManager.h, and the airbase, airport, and runway lighting widgets. No headers in this group were removed or relocated.
DtVrfTaskSetDialogOrganizer gained a default placement control for task dialogs. The organizer applies this position the first time each dialog is shown.
DtBaseFilteredListViewTaskSetDialog::filterItems() and the checkFogOfWarConditions() hooks described above are the other additions in this group.
Most set*Dialog.h headers are unchanged between 5.2 and 5.3. The dialogs listed below are the only ones whose public or protected contract changed, plus four newly added dialogs. Constructor signatures for the existing set dialogs are unchanged — all of them still take (makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0).
Several set dialogs used to expose a QSlider paired with a QLineEdit, a QDoubleValidator, and min/max QLabels, together with the two protected slots that kept the pair synchronized. In 5.3 these are replaced by the shared makVrv::DtSliderDoubleSpinboxWidget (and makVrv::DtSliderSpinboxWidget for integral values). Code that reached into those public members or connected to the synchronization slots must be rewritten against the composite widget.
DtSetZoomSensorDialog is the dialog affected by this pattern in 5.2:
setZoomSensorDialog.h also no longer includes <QRadioButton>, and it forward-declares makVrv::DtSliderDoubleSpinboxWidget instead of QSlider, QLineEdit, and QDoubleValidator. Translation units that relied on those transitive includes must include them directly.
| Class | Removed members and slots | Replacement |
|---|---|---|
DtSetZoomSensorDialog | updateSliderFromLineEdit(), updateLineEditFromSlider(), mySliderLayout, myZoomLabel, myZoomEdit, myZoomValidator, myMinLabel, myMaxLabel, myZoomSlider | myZoomWidget (makVrv::DtSliderDoubleSpinboxWidget*) |
Dialogs that aim a subsystem at another object now let the operator specify an offset from that object's origin. The offset is exposed as a public DtOffsetLocationEntryWidget* member named myAimAtObjectRelativeOffset, and the owning header forward-declares makVrf::DtOffsetLocationEntryWidget.
| Class | Header | Added member |
|---|---|---|
DtSetAimSensorDialog | setAimSensorDialog.h | DtOffsetLocationEntryWidget* myAimAtObjectRelativeOffset |
DtSetAimLaserLightDialog | setAimLaserLightDialog.h (new) | DtOffsetLocationEntryWidget* myAimAtObjectRelativeOffset |
DtSetAimSearchLightDialog | setAimSearchLightDialog.h (new) | DtOffsetLocationEntryWidget* myAimAtObjectRelativeOffset |
Subclasses of DtSetAimSensorDialog that override contents() or setupGui() should account for the additional widget when laying out or populating the dialog.
This dialog was restructured around the rule that only one navigation light configuration can be active at a time. A new unscoped enumeration, makVrf::DtNavigationLights, replaces the individual boolean accessors for the mutually exclusive navigation-rule lights:
The following accessor pairs were removed and must be replaced by navigationLightsOn() / setNavigationLightsOn():
| Removed in 5.2 | Replacement in 5.3 |
|---|---|
anchorLightsOn() / setAnchorLightsOn(bool) | navigationLightsOn() / setNavigationLightsOn(DtNavigationLights) with DtAnchorLights |
runningLightsOn() / setRunningLightsOn(bool) | setNavigationLightsOn(DtRunningLights) |
notUnderCommandLightsOn() / setNotUnderCommandLightsOn(bool) | setNavigationLightsOn(DtNotUnderCommandLights) |
ramLightsOn() / setRAMLightsOn(bool) | setNavigationLightsOn(DtRAMLights) |
spotLightsOn() / setSpotLightsOn(bool) | No direct replacement; the spot light control was removed from this dialog |
Two new boolean accessor pairs were added:
Two protected virtuals were added for subclasses that customize how the dialog maps between the enumeration and the wire request:
The protected widget members changed accordingly: myAnchorLightsOnLabel / myAnchorLightsOn, myNotUnderCommandLightsOnLabel / myNotUnderCommandLightsOn, myRAMLightsOnLabel / myRAMLightsOn, myRunningLightsOnLabel / myRunningLightsOn, and mySpotLightsOnLabel / mySpotLightsOn were removed. myNavigationLightsOnLabel / myNavigationLightsOn, myMobOperationLightsOnLabel / myMobOperationLightsOn, mySignalLightsOnLabel / mySignalLightsOn, and the group headings myNavigationRuleGroupLabel, mySpecialPurposeGroupLabel, and myOtherGroupLabel were added.
Finally, setSurfaceVesselLightingDialog.h now includes <vrftasks/setSurfaceVesselLightingRequest.h>, so the request type is visible to anything that includes this header.
Individual properties can now be enabled or disabled with a check box, which adds new virtual entry points and extends the nested PropertyItem structure.
Added to the protected slots section:
Added to the protected section:
Because checkBoxChanged() and checkBoxChanged(QCheckBox*) are an overload set, a subclass that overrides only one of them hides the other. Override both, or bring the base name into scope with a using declaration.
PropertyItem gained two members, QCheckBox* checkBox and bool initiallyChecked, and both its default constructor and its copy constructor were updated to initialize them (initiallyChecked defaults to true, checkBox to nullptr). Aggregate-style initialization of PropertyItem or code that assumed the previous member layout must be revisited.
Note that the base class now implements showEvent(). Subclasses that also override showEvent() must call the base implementation or the check-box collapse behavior will not run.
The roll-up manager used by the inline implementation in this header was renamed. setStatePropertyDialog.h now includes <vrfGuiCore/guiAggregateRollUpManager.h> instead of <vrfGuiCore/aggregateRollUpManager.h>, and every use of DtAggregateRollUpManager in the header template body is now DtGuiAggregateRollUpManager.
Any toolkit code that picked up DtAggregateRollUpManager transitively through this header must switch to DtGuiAggregateRollUpManager and include the renamed header explicitly.
The dialog now offers altitude-placement choices when relocating an object. A new protected slot and four new public members were added:
Subclasses that override contents() or setupStatement() must keep these controls consistent with the statement being edited.
The offset and embark-type sections are no longer QGroupBox containers with their own layouts. The member types changed and the layout members were removed:
This is a source-breaking change for any code that called QGroupBox members such as setTitle() or setCheckable() on myOffsetGroupBox or myEmbarkType, or that added widgets through myOffsetLayout / myEmbarkLayout. The header also forward-declares QLabel instead of QGroupBox.
The protected slot resourceChanged() was removed:
Subclasses that override resourceChanged() will no longer be called, and any explicit connect() to that slot fails to compile.
Four action classes were added, each deriving from DtVrfTaskSetMenuItem and following the established pattern of a makVrv::DtDe& constructor plus an overridden createAction():
| Class | Menu item |
|---|---|
DtVrfSetAimLaserLightAction | Set Aim Laser Light |
DtVrfSetAimSearchLightAction | Set Aim Search Light |
DtVrfSetHitZoneStatusAction | Set Hit Zone Status |
DtVrfSetSignalFlagsAction | Set Signal Flags |
No action classes were removed. Applications that build the set-action menu from an explicit list rather than from the library's registration must add these entries to expose the new dialogs.
Three includes were added:
No includes were removed. setSignalFlagsDialog.h is deliberately not part of setDialogs.h; include it directly when you need DtSetSignalFlagsDialog or DtSetSignalFlagsDialogCreator.
Each new dialog ships with the usual DtVrfSetDialogCreator subclass that overrides create() and supportsType().
Derives from DtBaseFilteredListViewTaskSetDialog. Aims a laser light at a point, an object with an optional relative offset, or an azimuth/elevation pair, and controls power, spread, wavelength, and signal.
Public widget members: myLaserLightLabel, myLaserLights, myPowerOnLabel, myPowerOnButton, myAimAtPointButton, myAimingPoint, myAimAtObjectButton, myAimAtAngleButton, myAimingAzimuth, myAimingElevation, mySpreadLabel, mySpread (makVrv::DtSliderDoubleSpinboxWidget*), myWavelengthLabel, myWavelength, mySignalLabel, mySignal, myAimAtObjectRelativeOffset.
Companion creator: DtSetAimLaserLightDialogCreator.
Derives from DtBaseFilteredListViewTaskSetDialog. Mirrors the laser light dialog but exposes intensity and cone angle instead of spread, wavelength, and signal.
Public widget members: mySearchLightLabel, mySearchLights, myPowerOnLabel, myPowerOnButton, myAimAtPointButton, myAimingPoint, myAimAtObjectButton, myAimAtAngleButton, myAimingAzimuth, myAimingElevation, myIntensityLabel, myIntensity (makVrv::DtSliderSpinboxWidget*), myConeAngleLabel, myConeAngle (makVrv::DtSliderDoubleSpinboxWidget*), myAimAtObjectRelativeOffset.
Companion creator: DtSetAimSearchLightDialogCreator.
Derives from DtBaseYesNoTaskSetDialog. Selects a hit zone on an entity and sets whether it is damaged. The dialog queries the entity's system list asynchronously, so it overrides initializeItems() and setupFrom() and tracks outstanding responses.
Protected members include myConnections (makVrv::DtSignalConnectionManager), myEntityTypes, myAwaitingSystemResponse, myZoneIdCombo, and myZoneIdLabel.
Companion creator: DtSetHitZoneStatusDialogCreator.
Derives from DtBaseTaskSetDialogInterface. Presents one row per halyard, each opening a flag picker sub-dialog, and sends a DtSetSignalFlagsRequest on accept. The header includes <vrfutil/rwNavigationSignalFlagVector.h> for DtHalyardPositionCount.
The halyard manipulation helpers (openFlagPicker(), addHalyard(), removeHalyard(), clearAllHalyards(), and related methods) are private and non-virtual, so this dialog is not designed for subclass customization of its row behavior. Protected members are myCanvas, myCanvasLayout, myTable, myAddHalyardButton, myHalyardVisible, and myHalyardFlags.
Companion creator: DtSetSignalFlagsDialogCreator.
The four dialogs that task an entity to fire a weapon at a target now let the operator choose a specific hit zone on the target. The same mechanical change was applied to each of them: a pair of virtual accessors for the selected hit zone function, a virtual helper that returns the formatted list of hit zone functions, a handler invoked when the target location input switches between a position and an object, and a boost::signals2::scoped_connection member that holds the subscription to that location-type change.
Because hitZoneFunctions() and slot_onPositionInputChanged() are virtual, a derived dialog that previously declared members with those names now silently overrides the base implementations. Rename any such members in your subclasses.
| Class | Access of the new members | New public widget members |
|---|---|---|
DtTaskFireBallisticGunDialog | protected | myHitZoneLayout, myHitZoneFunctionLabel, myHitZoneFunctionCombo |
DtTaskFireMissileLauncherDialog | protected | myHitZoneLayout, myHitZoneFunctionLabel, myHitZoneFunctionCombo |
DtTaskFireCruiseMissileDialog | hitZoneFunction() / setHitZoneFunction() are public; the rest are protected | myHitZoneLayout, myHitZoneFunctionLabel, myHitZoneFunctionCombo |
DtTaskFFTDialog | hitZoneFunction() / setHitZoneFunction() are public; the rest are protected | myHitZoneFunctionLabel, myHitZoneFunctionCombo |
Each of the four classes also gains a protected member:
Subclasses that construct these dialogs in a fixed layout order should account for the new hit zone row, which is inserted ahead of the existing weapon selection controls.
In addition to the hit zone members described above, the dialog declares a new protected slot:
slot_onNameChanged(const DtUUID&) remains an override with an unchanged signature; only its position within the protected section moved.
Beyond the hit zone members, the fire-for-effect dialog gains an explicit toggle controlling whether the height above terrain value is applied to the target location:
Previously the height above terrain value was always applied; in 5.3 it is gated by the new flag, which is surfaced through the new public QCheckBox* myApplyHeight member. The rounds radio buttons are now managed by a new public QButtonGroup* myRoundsGroup.
Three member functions changed from ordinary protected members to Qt slots. They keep their signatures, but they are now part of the moc-generated metaobject and can be connected to by name:
A second protected slot, onApplyHeightAboveTerrainChanged(), accompanies the existing onRoundTypeChanged().
The protected virtual that reported the duration of a named gesture was removed:
Subclasses that overrode or called gestureDuration() will no longer compile. Gesture duration is now resolved internally; the myGestureDuration member remains available to subclasses. No other members of the class changed access or signature.
A new virtual completes the resize behaviour of resizeToContents():
resizeToContents() only lowers the canvas minimum size, which permits but does not force the dialog to shrink. refitToContents() recomputes the fit and then applies the resize, so space freed by a child widget is reclaimed. Subclasses that previously worked around the non-shrinking behaviour with their own resize logic should call refitToContents() instead.
The dialog now overrides the Qt size hint:
Subclasses that override minimumSizeHint() should chain to the base implementation rather than to QDialog.
simulationCommandDialogs.h is unchanged; no simulation command dialogs were added or removed. taskDialogs.h gains one include:
flyIntoTaskDialog.h is not aggregated by taskDialogs.h. Code that uses DtFlyIntoTaskDialog must include that header directly.
Two new task dialogs and their creators were added, along with the menu actions that register them.
Declared in vrfGuiTaskSetQt/flyIntoTaskDialog.h. Tasks an entity to fly into a location or object. It derives from DtBaseLocationReferenceDialog and follows the standard dialog contract.
The companion DtFlyIntoTaskDialogCreator derives from DtVrfTaskDialogCreator and implements create() and supportsType().
Declared in vrfGuiTaskSetQt/taskPlaySoundDialog.h. Lets the operator pick a sound from the list of sounds available on the selected entities. It derives from DtBaseTaskSetDialogInterface and queries each selected entity for its sound list asynchronously, mirroring the weapon-list pattern used by the fire task dialogs.
Public members:
| Member | Type |
|---|---|
myCanvas | QWidget* |
myCanvasLayout | QBoxLayout* |
mySoundSelectionComboBox | QComboBox* |
mySoundSelectionLayout | QGridLayout* |
Protected virtuals of interest to subclasses: contents(), editStatement(), setupStatement(), slot_receivedSoundList(const DtUUID&), sendRequest(), setupGui(), setupFrom(), initializeItems(), resetDialog(), updateComboBoxes(), updateApplyButtonVisibility(), and updateButtonText().
The companion DtTaskPlaySoundDialogCreator derives from DtVrfTaskDialogCreator and implements create() and supportsType().
taskActions.h declares two new actions, both deriving from DtVrfTaskSetMenuItem with the usual constructor taking a makVrv::DtDe& and an overridden createAction():
| Class | Dialog it launches |
|---|---|
DtVrfTaskFlyIntoAction | DtFlyIntoTaskDialog |
DtVrfTaskPlaySoundAction | DtTaskPlaySoundDialog |
Return to VR-Forces 5.3 API Migration Guide.
[Home]