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

Table of Contents

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

The library supplies the object information dialog, its pages, and the page item update functions that populate them. It is the primary extension point for applications that add custom information pages or custom information items, so most of the changes below affect derived classes rather than direct callers.

The changes fall into four groups: the removal of the Tactical Data Link message page, a rework of the IFF page widget structure, a shift from makVrv::DtUniqueID to DtUUID in the spot report items, and a set of signature and container changes in the aggregate and systems page logic classes. A number of new state page items were also added.

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

Breaking Changes

DtTDLMessageStatePage was removed

The header vrfGuiObjectInformationQt/tdlMessageStatePage.h was deleted along with the internal Tactical Data Link subsystem. It defined DtTDLMessageStatePage, a DtSpotReportStatePage subclass, and the DtTDLMessageStatePageCreator typedef.

Remove the include, any registration of DtTDLMessageStatePageCreator with the page factory, and any page configuration entries that reference the page class name. There is no replacement page. Code that derived from DtTDLMessageStatePage should derive from DtSpotReportStatePage directly if the spot report presentation is still required.

DtIffPage replaced its tab widget with a tab bar

The IFF page no longer hosts its pages in a QTabWidget. It now uses a QTabBar paired with a separate content widget, and the forward declaration at the top of the header changed from QTabWidget to QTabBar accordingly.

// 5.2
public:
QTabWidget* myTabWidget;
// 5.3
public:
QTabBar* myTabBar;
QWidget* myCanvas = nullptr;

Code that reached into myTabWidget to add, style, or query tab pages must be rewritten against the tab bar and the canvas widget. myTabBar carries the tab labels and the current index; myCanvas is the widget that holds the contents of the selected tab. Use addPage, removePage, numPages, and selectedIffStateComponent where possible instead of manipulating the widgets directly, since those methods now encapsulate the coordination between the two widgets.

DtIffPage::setPageId was removed

// 5.2
virtual void setPageId(int, makVrv::DtElementID);

The page-to-element association is established when a page is created, so the separate setter is no longer part of the interface. Overrides of setPageId in derived classes must be deleted, and callers must rely on addPage to establish the association. iffStateComponent(int page) remains available for retrieving the component bound to a given tab index.

DtSpotReportInformationItem takes DtUUID instead of makVrv::DtUniqueID

The spot report items are keyed by simulation object UUID rather than by the GUI element unique identifier. Two virtual methods on DtSpotReportInformationItem changed signature:

// 5.2
virtual std::string valueFor(const std::string& spotReportValue, makVrv::DtUniqueID id) const;
virtual const DtSpotReportStateComponentData& spotReportState(makVrv::DtUniqueID) const;
// 5.3
virtual std::string valueFor(const std::string& spotReportValue, const DtUUID& id) const;
virtual const DtSpotReportStateComponentData& spotReportState(const DtUUID&) const;

Any class deriving from DtSpotReportInformationItem that overrides either method must be updated, and callers must pass a DtUUID. Because the parameter is now passed by const reference rather than by value, an override that keeps the old signature will silently become a new overload rather than an override; the override specifier will catch this at compile time.

DtObservedBy::myCurrentValue changed type

The protected member that tracks the set of observers changed with the UUID conversion above:

// 5.2
mutable std::set<makVrv::DtUniqueID> myCurrentValue;
// 5.3
mutable std::set<DtUUID> myCurrentValue;

DtAggregateInformationPageLogic::stateProperties changed signature

The accessor for the cached state properties is now a virtual method that takes the simulation object reference whose properties are requested. The non-virtual, inline, argument-less form was removed.

// 5.2
const DtRwProperties& stateProperties() const
{
return myStateProperties;
}
// 5.3
virtual const DtRwProperties& stateProperties(DtSimObjectReference) const;

Every call site must supply the reference for the object being displayed. Derived classes that cache or transform state properties can now override the accessor instead of shadowing the member.

DtAggregateInformationPageLogic update hooks moved to the public section

updateStateProperties and parameterDataUpdated moved from the protected section to the public section:

// 5.3
virtual void updateStateProperties(DtSimObjectReference state);
virtual void parameterDataUpdated(DtSimObjectReference state);

Existing overrides continue to work, but a derived class that redeclares these methods in its own protected section narrows their accessibility relative to the base class. Move such declarations to the public section so that the access level matches.

DtSystemsInformationPageLogic::DtSystemItems changed value type

The systems page now tracks the hit zone associated with each system, so the item map no longer stores a bare tree widget item. A new protected nested struct holds the pair.

// 5.2
typedef std::map<std::string, QTreeWidgetItem*> DtSystemItems;
DtSystemItems mySystemItems;
// 5.3
struct SystemItem
{
SystemItem();
SystemItem(int hitZoneId, QTreeWidgetItem* qTreeItem);
int myHitZoneId;
QTreeWidgetItem* myQTreeItem;
};
typedef std::map<std::string, SystemItem> DtSystemItems;
typedef std::map<int, QTreeWidgetItem*> DtHitZonetems;
DtSystemItems mySystemItems;
DtHitZonetems myHitZoneItems;

Derived classes that iterate mySystemItems must access the tree item through myQTreeItem rather than dereferencing the mapped value directly. Note also that the DtSystemItems typedef moved from the trailing protected block to a protected block declared ahead of the public section, so it is declared before the methods that use it.

DtAggregateStateNumberOfAggregates and DtAggregateStateNumberOfEntities lost their cached counts

Both items dropped the protected member that cached the last displayed count:

// 5.2, removed in 5.3
mutable int myNumberOfAggregates = -1; // DtAggregateStateNumberOfAggregates
mutable int myNumberOfEntities = -1; // DtAggregateStateNumberOfEntities

The values are read from the aggregate state component on each update, so there is no cached value to consult. Derived classes that read these members for change detection must compare against the value returned by value(DtSimObjectReference) instead.

Additions

New entity state page items

Four maritime lighting items and a symbol identification code item were added to entityInformationPageItems.h. Each follows the established DtEntityStatePageItem pattern, with the two standard constructors, a static creatorName, and a matching DtItemUpdateFunctionCreator typedef.

Class Creator typedef
DtStateSidc DtStateSidcCreator
DtEntityStateAgroundLightsOn DtEntityStateAgroundLightsOnCreator
DtEntityStateConstrainedByDraftLightsOn DtEntityStateConstrainedByDraftLightsOnCreator
DtEntityStateMobOperationLightsOn DtEntityStateMobOperationLightsOnCreator
DtEntityStateSignalLightsOn DtEntityStateSignalLightsOnCreator

DtStateSidc overrides needsPageLogicForWidgetRepresentation. The four lighting items override shouldBeHidden so that they are displayed only for platforms whose state carries the corresponding light. Register the creators with the item factory to make the items available to page configurations.

DtAisShipClassPageItem

aisDataPageItems.h gained DtAisShipClassPageItem, a DtAisDataPageItem subclass that reports the AIS ship class. It provides the display-name constructor and the page logic constructor used by the other AIS items and overrides stateValue. Unlike the entity state items above, it does not declare a creator typedef.

DtInformationDialogPage::supportsRightClickCopy

DtInformationDialogPage gained a new virtual method:

virtual bool supportsRightClickCopy() const;

It reports whether the page offers a right-click copy action for its contents. The base implementation supplies a default, so existing pages compile unchanged; override it in a custom page to opt in or out. DtTaskStatePage overrides it in 5.3. Because this method was inserted into the virtual table of a class that plug-ins derive from, plug-in binaries must be recompiled against the 5.3 headers.

Aggregate page item lifecycle and timed updates

DtAggregateStatePageItem now declares virtual void deactivate() override, and DtAggregateStateHealth and DtAggregateStatePrimaryEquipment add protected deactivate overrides. Derived items that hold connections or widgets should release them from an override of deactivate and call the base implementation.

DtAggregateStateOrderedPosture adds virtual void timerUpdate() const together with the protected members myTimerUpdate, a scoped signal connection, and myDisplayText, which caches the rendered posture transition text between timed updates.

DtSensorInformationPageLogic::uuidForSensor

virtual const DtUUID& uuidForSensor(const std::string&);

Returns the UUID assigned to a named sensor, allocating and caching one on first use. This supports the per-sensor simulation object references created by createSensorContactReference.

Hit zone support in DtSystemsInformationPageLogic

The systems page now displays hit zones in addition to component systems. The following public methods were added:

virtual void addHitZones();
virtual void updateSystemsDamagedState();
virtual void updateHitZonesDamagedState();

addHitZones populates the list with hit zones that are not associated with any system. updateSystemsDamagedState appends the damaged state to the enabled state as a comma separated string, and updateHitZonesDamagedState performs the equivalent update for the hit zone entries.

The following protected helpers support them:

virtual std::set<int> entityHitZoneIDs() const;
virtual std::set<int> systemsHitZoneIDs() const;
virtual std::set<int> damagedHitZoneIDs() const;
virtual QString hitZoneName(const DtHitZoneId& zoneId) const;
virtual void slot_onStatePropertiesUpdated();

DtObjectConsoleInformationWidgetLogic notify level tracking

The object console logic now listens for notify level messages and detects stale state. Three protected virtual methods were added:

virtual void stateModified();
virtual void slot_notifyLevelMessageReceived(const DtVrfObjectMessage*);
virtual bool isStale(DtSimObjectReference state) const;

The header now includes vrfmsgs/vrfObjectMessage.h for the message type, and the class holds an additional myStateUpdateConnection member for the state update subscription.

DtAggregateSuppliesPageLogic::updateData

DtAggregateSuppliesPageLogic adds a protected virtual void updateData() override, which refreshes the ammunition and supplies tabs from the current state properties.

Removed Headers

Header Replacement
vrfGuiObjectInformationQt/tdlMessageStatePage.h None. The Tactical Data Link message page was removed with the internal Tactical Data Link subsystem. Derive from DtSpotReportStatePage if the spot report presentation is still needed.

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)