![]() |
VR-Forces Developer's Guide
|
The vrfGuiSettingsWidgets library supplies the preference pages shown in the VR-Forces GUI Settings dialog, together with the widget, interface, and logic classes that back them.
Toolkit users extend this library when they add their own preference pages, and they derive from the existing Dt*WidgetInterface classes when they supply an alternative presentation for a stock page.
Between 5.2 and 5.3 the library changed in four areas:
DtCheckpointSettingsWidgetInterface.DtGuiOptionsWidgetInterface.Every other header in the library changed only in version control metadata and is unaffected at the source level. vrfGuiSettingsWidgets.h in particular is unchanged; the DT_DLL_VRFGUISETTINGSWIDGETS export macro and the conditions under which it is defined are the same as in 5.2.
The Tactical Data Link preference page was removed together with the rest of the internal TDL subsystem. Four public headers and the classes they declare no longer exist:
| Removed class | Header |
|---|---|
makVrf::DtTDLOptionsPage | vrfGuiSettingsWidgets/tdlOptionsPage.h |
makVrf::DtTDLOptionsWidget | vrfGuiSettingsWidgets/tdlOptionsWidget.h |
makVrf::DtTDLOptionsWidgetInterface | vrfGuiSettingsWidgets/tdlOptionsWidgetInterface.h |
makVrf::DtTDLOptionsWidgetLogic | vrfGuiSettingsWidgets/tdlOptionsWidgetLogic.h |
The DtTDLOptionsPageCreator typedef declared in tdlOptionsPage.h was removed with it. Remove any #include of these headers, any registration of DtTDLOptionsPageCreator with the page factory, and any class that derived from DtTDLOptionsWidgetInterface or connected to its signal_tdlForceOptionChanged, signal_processTDLMessagesChanged, or related boost::signals2 members. There is no replacement.
Checkpointing is no longer configured as a periodic write to a directory chosen in the page. Instead the page configures a checkpoint interval in the same style as the existing snapshot interval, plus a flag that controls whether checkpoints are written when the scenario is checkpointed. Because these are pure virtual methods, any class deriving from DtCheckpointSettingsWidgetInterface fails to compile until it is updated.
| Removed in 5.3 | Replacement |
|---|---|
virtual bool checkpointsEnabled() const = 0 | None; use enableSaveScenarioCheckpoints |
virtual void setCheckpointsEnabled(bool) = 0 | None; use setEnableSaveScenarioCheckpoints |
virtual void setEnablePeriodicCheckpointing(bool) = 0 | virtual void setEnableSaveScenarioCheckpoints(bool) = 0 |
virtual bool enablePeriodicCheckpointing() const = 0 | virtual bool enableSaveScenarioCheckpoints() const = 0 |
virtual void setPeriodicCheckpointingFrequency(int) = 0 | virtual void setScenarioCheckpointsTime(double) = 0 |
virtual int periodicCheckpointingFrequency() const = 0 | virtual double scenarioCheckpointsTime() const = 0 |
virtual void setPeriodicCheckpointingDirectory(const std::string&) = 0 | None |
virtual std::string periodicCheckpointingDirectory() const = 0 | None |
Note the change of unit and type on the interval accessor. The 5.2 frequency was an int; the 5.3 interval is a double expressed in seconds, matching scenarioSnapshotsTime.
There is no replacement for the checkpoint directory accessors. The destination is no longer chosen from this page, so remove any implementation that stored or validated a directory path.
Three boost::signals2 members were removed from the public section of the interface:
signal_sendPeriodicSnapshoSettingsToBackEnds is retained and unchanged. Code that connected to any of the removed signals must be deleted; there is no equivalent signal for the new checkpoint interval, which is delivered to the back ends through the existing snapshot settings path.
The concrete widget was updated to match the new interface. Beyond the overrides listed in the table above, the following Qt slots were removed:
The class has no public slots section in 5.3. Any QObject::connect call or derived class that named one of these slots must be updated. The class also gained an override of QObject::eventFilter:
A derived class that previously installed its own event filter behavior must call the base class implementation so that the page's own filtering continues to run.
The logic class now receives a typed settings object rather than a name and a generic back end state:
DtPeriodicSnapshotSettings is forward declared in checkpointSettingsWidgetLogic.h at global scope. A derived class that overrode the 5.2 form will silently stop overriding unless it is updated, because the new signature does not match; mark the override with override to catch this at compile time.
Three protected slots were removed and one was added:
| Removed in 5.3 | Replacement |
|---|---|
virtual void slot_checkpointsDirectoryChanged(const std::string&) | None |
virtual void slot_enableSaveCheckpointsChanged(bool) | virtual void slot_enableSaveScenarioFragmentsChanged(bool) |
virtual void slot_periodicCheckpointFrequencyChanged(int) | None |
shouldBeEnabled is unchanged.
Automatic frame rate limiting for the 2D and 3D views is now configured from the GUI options page. Three pure virtual methods were added to DtGuiOptionsWidgetInterface:
Any class that implements DtGuiOptionsWidgetInterface must supply all three before it can be instantiated. setFPSLimits takes the 2D limit first and the 3D limit second. An implementation that does not expose the control can provide stubs, returning true from enableAutoFPSLimiting to match the stock default.
DtGuiOptionsWidget implements the new methods, so classes deriving from the concrete widget rather than from the interface need no change.
The sounding point data option was removed from the ocean settings page:
The public member QCheckBox* myUseSoundingPointData was removed at the same time. Code that read or set the option, or that reached into the widget to manipulate the check box, must be deleted. There is no replacement setting. The seaFloor accessors and the remaining members of the class are unchanged.
The public method
was removed from DtVrfAggregateSettingsWidget. The widget builds its own layout in setupGui, and there is no supported hook for injecting the general controls into an externally supplied layout. Derived classes that overrode this method to reorder or supplement the controls should override setupGui instead and adjust myMainLayout after calling the base implementation.
mySeparator and mySeparatorLabel were public members of DtVrfAggregateSettingsPage in 5.2. They are now public members of DtVrfAggregateSettingsWidget:
The member types, QFrame* and QLabel*, are unchanged. DtVrfAggregateSettingsPage still exposes myVrfAggregateSettings, so the separator remains reachable from the page.
Besides the interface methods described above, DtGuiOptionsWidget declares the matching public methods and a new public member for the control:
The default is enabled.
Two slots that were non-virtual in 5.2 are now virtual, so derived classes can change their behavior:
This is source compatible with 5.2 code.
DtCheckpointSettingsWidget declares public members for the new controls that replace the removed directory and frequency controls:
myEnablePeriodicSnapshotsSeparator, mySaveCheckpointsFrequencyLabel, mySaveCheckpointsFrequency, myEnableSaveCheckpointsCheckBox, myEnableSaveCheckpointsSeparator, mySaveCheckpointsDirectoryLabel, mySaveCheckpointsDirectory, myClearSaveCheckpointsDirectory, mySelectSaveCheckpointsDirectory, and myCheckpointsDirectoryLayout were removed.
| Header | Replacement |
|---|---|
vrfGuiSettingsWidgets/tdlOptionsPage.h | None |
vrfGuiSettingsWidgets/tdlOptionsWidget.h | None |
vrfGuiSettingsWidgets/tdlOptionsWidgetInterface.h | None |
vrfGuiSettingsWidgets/tdlOptionsWidgetLogic.h | None |
No headers were added to the library, and no header was renamed or relocated.
| Header | Breaking | Additions |
|---|---|---|
checkpointSettingsWidget.h | Periodic checkpointing overrides and slots removed; public slots section removed; eventFilter override added | Scenario checkpoint interval controls |
checkpointSettingsWidgetInterface.h | Periodic checkpointing pure virtuals and three signals removed | setEnableSaveScenarioCheckpoints, enableSaveScenarioCheckpoints, scenarioCheckpointsTime, setScenarioCheckpointsTime |
checkpointSettingsWidgetLogic.h | slot_settingReceived signature changed; three protected slots removed | slot_enableSaveScenarioFragmentsChanged |
guiOptionsWidget.h | None | Automatic FPS limiting accessors; two slots made virtual |
guiOptionsWidgetInterface.h | Three pure virtuals added | Automatic FPS limiting contract |
oceanSettingsPage.h | setUseSoundingPointData, useSoundingPointData, and myUseSoundingPointData removed | None |
tdlOptionsPage.h, tdlOptionsWidget.h, tdlOptionsWidgetInterface.h, tdlOptionsWidgetLogic.h | Headers removed | None |
vrfAggregateSettingsPage.h | addGeneralWidgetsToLayout removed; separator members moved to DtVrfAggregateSettingsWidget | None |
Return to VR-Forces 5.3 API Migration Guide.
[Home]