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

Table of Contents

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

The widgets in this library are the building blocks of task and plan dialogs, and toolkit developers reuse them directly when writing custom dialogs and scripted task parameter widgets.

The largest change in 5.3 is the redesign of DtVrfFilteredListView. The single filter combo box that selected one named filter at a time was replaced by a search field, a force selector, and a tag selector that filter the full item list together. Every API that named, selected, or executed "the current filter" was removed as a result, and the affected virtual functions on DtVrfFilteredListViewInterface and DtVrfFilteredListViewLogic changed with it.

Two smaller cross-cutting changes affect several widgets: the emitter modes requestor type moved out of vrfGuiCore into vrfcontrol, and the altitude setters gained a unit-conversion flag.

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

Breaking Changes

Filter selection API removed from DtVrfFilteredListViewInterface

The pure virtual functions that managed the filter combo box were removed from the interface. Any class that implements DtVrfFilteredListViewInterface must delete these overrides, and any caller that used them through the interface must be reworked.

Removed in 5.3 Replacement
virtual void addFilterToList(const DtVrfSelectionFilter*) = 0 None. addFilter now performs the whole operation.
virtual void removeFilterFromList(const QString&) = 0 None. removeFilter performs the whole operation.
virtual void selectFilter(int) = 0 filterItems(bool andSelectFirstItem = false)
virtual void selectFilter(const QString&) = 0 filterItems(bool andSelectFirstItem = false)
virtual QString currentFilter() const = 0 None. There is no single current filter; use selectedForces, selectedCategories, and the text filter.
virtual void executeCurrentFilter() = 0 executeTextFilter(), executeForceFilter(), or filterItems()

The following pure virtual functions were added and must be implemented by any class deriving from the interface:

virtual std::vector<int> selectedForces() const = 0;
virtual std::vector<std::string> selectedCategories() const = 0;
virtual void setFilterTags(const std::vector<std::string>&) = 0;
virtual void resetCategoriesBasedOnVisibleItems() = 0;
virtual void executeForceFilter() = 0;
virtual void executeTextFilter() = 0;

addFilter gained an executeFilters parameter

addFilter takes a third argument on the interface, on DtVrfFilteredListView, and on DtVrfFilteredListViewLogic:

// 5.2
virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*, bool andSelectFirstObject = false);
// 5.3
virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter*, bool andSelectFirstObject = false, bool executeFilters = true);

Existing calls compile unchanged because the new parameter is defaulted, but every override must be updated to the new signature or it will no longer override the base declaration. Pass false for executeFilters when adding a batch of filters, then call filterItems() once at the end.

removeItem and onRemoveObject return bool

The removal methods report whether an item was actually removed. Overrides must be updated to the new return type.

5.2 declaration 5.3 declaration
virtual void removeItem(DtSimObjectReference) virtual bool removeItem(DtSimObjectReference)
virtual void removeItem(QTreeWidgetItem*) virtual bool removeItem(QTreeWidgetItem*)
virtual void removeItem(makVrv::DtUniqueID) virtual bool removeItem(makVrv::DtUniqueID)
virtual void DtVrfFilteredListViewLogic::onRemoveObject(makVrv::DtUniqueID, bool) virtual bool DtVrfFilteredListViewLogic::onRemoveObject(makVrv::DtUniqueID, bool)

DtVrfFilteredListView filter combo box API removed

The methods that configured or queried the filter combo box were removed from DtVrfFilteredListView:

// All removed in 5.3
virtual void selectFilter(int iIndex) override;
virtual void selectFilter(const QString&) override;
virtual void selectFirstNonEmptyFilter();
virtual QString currentFilter() const override;
virtual void executeCurrentFilter() override;
virtual void addFilterToList(const DtVrfSelectionFilter*) override;
virtual void removeFilterFromList(const QString&) override;
virtual void onFilterChanged(const QString&);
virtual void hideFilterLabel(bool);
virtual void setFilterInsertPolicy(QComboBox::InsertPolicy p);
virtual void setFilterLabel(const QString&);
virtual QString filterLabel() const;

Code that called selectFilter or selectFirstNonEmptyFilter to refresh the list should call filterItems instead:

// 5.2
listView->addFilter(&myFilter);
listView->selectFilter(myFilter.name());
// 5.3
listView->addFilter(&myFilter, false, false);
listView->filterItems(true);

clearAll no longer removes filters; it only removes items. Call removeAllFilters separately if the filter set must also be discarded.

DtVrfFilteredListView::hideFilter is no longer virtual

hideFilter was a virtual function in 5.2. In 5.3 it is a non-virtual inline convenience wrapper:

// 5.2
virtual void hideFilter(bool);
// 5.3
void hideFilter(bool b) { setShowFilters(!b); }

A derived class that declared hideFilter with override will no longer compile. Override the new virtual setShowFilters(bool) instead.

DtVrfFilteredListView member variables replaced

The public member variables that exposed the filter combo box were removed or retyped. Derived classes and dialog code that laid out or styled these widgets directly must be updated.

5.2 member 5.3 member
QLabel* myFilterLabel Removed
QComboBox* myFilters QWidget* myFilters (container for the force and tag selectors)
QHBoxLayout* myFilterLayout QVBoxLayout* myFiltersLayout
— DtSearchWidget* mySearchWidget
— DtTagSelectorWidget* myTags
— DtForceSelectionEntryWidget* myForce
— QHBoxLayout* myNameLayout

The protected flags myFilterLabelIsHidden and myFilterHidden were removed; the new protected state is myShowFilters, myShowSearch, myTextFilter, myCollapsedSize, and myExpandedSize.

expansionStateChanged signal signature changed

The expansion signal now carries the collapsed and expanded sizes so that a hosting dialog can re-fit itself. The change affects DtVrfFilteredListView, DtLocationEntryWidget, and DtLocationReferenceEntryWidget:

// 5.2
void expansionStateChanged(bool expanded);
// 5.3
void expansionStateChanged(bool expanded, const QSize& collapsedSize, const QSize& expandedSize);

Every connect to this signal and every receiving slot must be updated to the three-argument form. On DtLocationReferenceEntryWidget the signal is declared as expansionStateChanged(bool, const QSize&, const QSize&).

DtVrfFilteredListViewLogic filter lookup API removed

The logic class lost the methods that mapped an item to the filter that contained it, along with the TDL report view support.

// All removed in 5.3
virtual void selectFilter(const QString&, bool andSelectFirstObject = false);
virtual void selectFilter(const DtVrfSelectionFilter*, bool andSelectFirstObject = false);
virtual bool selectFilterForItem(const QString&);
virtual bool selectFilterForItem(const DtUUID&);
virtual QString filterForItem(const QString& s) const;
virtual QString filterForItem(const DtUUID& uuid) const;
virtual bool passesTDLReportViewFilter(DtSimObjectReference s) const;
virtual void slot_tdlOptionsChanged();

Because items are no longer partitioned across filters, an item is visible when it passes every active filter and no lookup of a containing filter is required. Call filterItems to re-evaluate the list.

The protected member DtVrfTDLSettingsRecord myTDLSettingsRecord was removed, and vrfGuiCore/vrfTDLSettingsRecord.h is no longer included by this header. Code that relied on that transitive include must include it directly.

DtVrfFilteredListViewLogic::passesFilterTest moved and changed signature

passesFilterTest moved from the protected section to the public section, became const, and gained an output parameter that reports the index of the filter the object matched:

// 5.2 (protected)
virtual bool passesFilterTest(DtSimObjectReference s);
// 5.3 (public)
virtual bool passesFilterTest(DtSimObjectReference s, int* desiredIndex = nullptr) const;

connectIfShouldUpdate and passesAnyFilter gained the same output parameter:

// 5.3
virtual bool connectIfShouldUpdate(DtSimObjectReference s, int* desiredIndex = nullptr);
virtual bool passesAnyFilter(DtSimObjectReference s, int* desiredIndex = nullptr) const;

Overrides that kept the 5.2 signatures no longer override the base declarations. The new parameter may be ignored by passing nullptr.

DtAerodromeListView filter overrides replaced

DtAerodromeListView followed the filtered list view redesign:

// 5.2
virtual void selectFilter(int iIndex) override;
virtual void selectFirstNonEmptyFilter() override;
// 5.3
virtual void initializeFilters();
virtual void filterItems(bool andSelectFirstItem = false) override;
virtual DtVrfSelectionFilter* addFilter(const DtVrfSelectionFilter* filter,
bool andSelectFirstObject = false, bool executeFilters = true) override;

addFilter is overridden so that aerodromes loaded from DtVrfAerodromeLoader are re-added after the base class repopulates the list. A new protected member myFilteredItems tracks whether the initial filter pass has run.

DtFilteredSubordinatesListView::addFilterToList removed

The override was removed along with the base class declaration. Remove the corresponding override from any derived class.

Emitter modes requestor type moved to vrfcontrol

The requestor that supplies emitter and mode data changed from makVrf::DtEmitterModesRequestor (declared in vrfGuiCore/emitterModesRequestor.h) to the global-scope DtRemoteControlEmitterModesRequestor (declared in vrfcontrol/remoteControlEmitterModesRequestor.h). The virtual accessor emitterModesRequestor is protected in every emitter-related widget, so this affects derived classes:

// 5.2
virtual DtEmitterModesRequestor& emitterModesRequestor() override;
// 5.3
virtual DtRemoteControlEmitterModesRequestor& emitterModesRequestor() override;

The nested type used for the mode collection changed at the same time, from DtEmitterModesRequestor::EmitterModes to DtRemoteControlEmitterModesRequestor::EmitterModes. This is the type of the protected member myEmitterModes on DtEmitterModesSelectionEntryWidget.

The following classes are affected:

Class Header
DtEmitterModesSelectionEntryWidget emitterModesSelectionEntryWidget.h (pure virtual declaration)
DtEmitterSelectionEntryWidget emitterSelectionEntryWidget.h (pure virtual declaration)
DtActiveSonarModeSelectionEntryWidget activeSonarModeSelectionEntryWidget.h
DtJammerSelectionEntryWidget jammerSelectionEntryWidget.h
DtJammingModeSelectionEntryWidget jammingModeSelectionEntryWidget.h
DtRadarModeSelectionEntryWidget radarModeSelectionEntryWidget.h
DtRadarSelectionEntryWidget radarSelectionEntryWidget.h

Forward declarations must also move out of the makVrf namespace, because DtRemoteControlEmitterModesRequestor is declared at global scope.

Altitude setters gained a convertToDisplay parameter

The double overloads of the altitude setters take an additional flag that controls whether the supplied value is converted into the current display units before being shown. The default is false, which preserves 5.2 behavior for callers, but every override must be updated.

// 5.2
virtual void setAltitudeAboveSeaLevel(double) = 0;
virtual void setAltitudeAboveGroundLevel(double) = 0;
// 5.3
virtual void setAltitudeAboveSeaLevel(double, bool convertToDisplay = false) = 0;
virtual void setAltitudeAboveGroundLevel(double, bool convertToDisplay = false) = 0;
Class Header
DtAltitudeSelectionWidgetInterface altitudeSelectionWidgetInterface.h
DtAltitudeSelectionWidget altitudeSelectionWidget.h
DtLocationEntryWidgetInterface locationEntryWidgetInterface.h (setAltitudeAboveSeaLevel only)
DtLocationEntryWidget locationEntryWidget.h

The QString overloads are unchanged.

allowMultipleForceSelection is now virtual

The accessor changed from an inline non-virtual member returning the flag to a virtual function:

// 5.2
bool allowMultipleForceSelection() const { return myAllowMultipleForceSelection; }
// 5.3
virtual bool allowMultipleForceSelection() const;

The return value is now computed rather than read directly from myAllowMultipleForceSelection, so a derived class that reads the member instead of calling the accessor may observe a different result.

DtResourceSelectionEntryWidget::myBin removed

The protected member int myBin was removed. Bin selection is now driven by the new bins control; see setShowBins under Additions. Derived classes that read or wrote myBin must be reworked.

DtNametagEntryWidget::myAppearance removed

The protected member std::string myAppearance was removed. Derived classes that referenced it must be updated.

DtTaskSetVariableWidget::designerIcon default path changed

The default implementation returns a different icon path:

// 5.2
return "../data/images/icons/Simulate_FrontEnd_Icon.ico";
// 5.3
return "../data/Icons/Products/VRFFrontend.ico";

This affects only widgets that do not override designerIcon. Custom widgets that hard-coded the 5.2 path in their own override should move to the new location.

Additions

sidcPickWidget.h

The new header vrfGuiDataEntryWidgets/sidcPickWidget.h defines a data entry widget for building a MIL-STD-2525D / APP-6D symbol identification code, plus the combo box it uses.

DtSidcPickWidget derives from DtTaskSetVariableWidget, so it can be used as a scripted task parameter widget and registered through DtSidcPickWidgetCreator. It presents one combo box per SIDC field, identified by the nested ComboType enum:

enum ComboType
{
Context = 0, StandardIdentity = 1, SymbolSet = 2, Status = 3, HQTFDummy = 4,
Echelon = 5, MainIcon = 6, Modifier1 = 7, Modifier2 = 8, Search = 9
};

The principal API is:

DtSidcPickWidget(makVrv::DtDe& de, QWidget* parent,
const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
virtual void setSidc(const DtString&);
virtual DtString sidc() const;
virtual void setValue(const DtEntityType&, int force);
virtual void setBasedOn(const DtEntityMapperKey&);
const DtEntityMapperKey& basedOn() const;
virtual void selectComboItem(int type, const std::string& sidc);
boost::signals2::signal<void (DtString)> signal_sidcChanged;

The nested SIDCField struct pairs a DtSidcComboBox with its QLabel, and the populated fields are available through the public myCombos map keyed by ComboType.

DtSidcComboBox is a QComboBox subclass that paints the symbol icon for each entry. It exposes enableSearch(bool), setShowScheduled(bool), inMouseEvent(), shouldShowPopup(), the showPopupFromFocus and hidePopupFromCompletion slots, and a popupShown(bool) signal.

DtVrfFilteredListView search, force, and tag filtering

The methods that replace the filter combo box are:

virtual void filterItems(bool andSelectFirstItem = false);
virtual void setTextFilter(const QString&);
virtual void executeTextFilter();
virtual void executeForceFilter();
virtual bool passesForceFilter(DtSimObjectReference) const;
virtual std::vector<int> selectedForces() const override;
virtual std::vector<std::string> selectedCategories() const;
virtual void setFilterTags(const std::vector<std::string>&);
virtual void resetCategoriesBasedOnVisibleItems() override;
virtual void showSearchBars(bool);
virtual void hideSearch(bool b);
virtual void setShowFilters(bool b);

setCheckFogOfWarFilters(bool) was added to both DtVrfFilteredListView and DtVrfFilteredListViewLogic. It defaults to true, preserving 5.2 behavior. It does not refilter immediately; call filterItems() afterwards.

DtVrfFilteredListView also gained virtual QSize minimumSizeHint() const override, the protected slots completeCollapse, completeExpand, and textChanged, the protected slot slot_onTagsChanged(const std::vector<std::string>&), and the protected forceTypeChanged method.

DtVrfFilteredListViewLogic additions

virtual void filterItems(bool andSelectFirstObject = false);
virtual bool addObject(DtSimObjectReference);
virtual void setCheckFogOfWarFilters(bool);
virtual void slot_selectionAboutToBePopped();
virtual void slot_selectionPopped();

addObject is the counterpart to the now-bool onRemoveObject and reports whether the object was added to the list.

DtTaskSetVariableWidget::signal_contentsSizeChanged

A new boost signal notifies a hosting dialog that the widget's preferred size changed, so the dialog can re-fit and reclaim freed space:

boost::signals2::signal<void ()> signal_contentsSizeChanged;

DtWeaponSelectionWidget::setControlsVisible

A new public slot shows or hides all selection controls at once, honoring the current displayWeapons() and displayResources() settings when re-showing. When hidden, the widget collapses to zero height and emits signal_contentsSizeChanged:

public slots:
virtual void setControlsVisible(bool visible);

DtResourceSelectionEntryWidget bins control and signal

virtual void setShowBins(bool);
signals:
void resourcesReceived();

The existing resourcesSetUp signal is unchanged; it fires when the dialog is populated with new entries, while resourcesReceived fires once the full resource set has arrived. The bins check box is available through the new public member QCheckBox* myShowBins.

DtForceSelectionEntryWidget::setHideWhenOnlyOneForce

virtual void setHideWhenOnlyOneForce(bool b);
bool hideWhenOnlyOneForce() const;

The default is false, which preserves 5.2 behavior.

DtChatMessageChannel::selectedForceTitles

virtual std::string selectedForceTitles() const;

Returns the display titles of the currently selected forces, which is useful when multiple force selection is enabled.

DtLocationReferenceEntryWidget additions

virtual void setupFrom(const std::set<makVrv::DtUniqueID>& data) override;
signals:
void locationTabSelected(bool);

locationTabSelected reports when the user switches to or away from the location tab.

DtAltitudeSelectionWidget::useAltitudeAboveTerrain

virtual bool useAltitudeAboveTerrain() const;

Reports whether the widget is currently entering altitude above ground level rather than above sea level.

DtLocationEntryWidget expansion slots

DtLocationEntryWidget gained the protected slots completeExpand and completeCollapse, which complete the animated size change and emit the new three-argument expansionStateChanged signal.

DtDiGuyGestureSelectionEntryWidget::gestureDuration

virtual double gestureDuration() const;

Returns the duration, in seconds, of the currently selected DI-Guy gesture.

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)