![]() |
VR-Forces Developer's Guide
|
Widget that allows users to select weapons for the given entity.

Public Member Functions | |
| DtWeaponSelectionWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode) | |
| virtual | ~DtWeaponSelectionWidget () |
| virtual void | setWeaponFilterType (DtWeaponSystemType type) |
| virtual DtWeaponSystemType | weaponFilterType () const |
| virtual void | setFireTaskType (DtSimTaskMessageType fireTaskType) |
| virtual void | setFireTaskTypes (const std::vector< DtSimTaskMessageType > &fireTaskTypes) |
| virtual const std::vector < DtSimTaskMessageType > & | fireTaskTypes () const |
| virtual void | setRange (double bottom, double top) |
| virtual void | setDefaultValue (const std::string &) |
| virtual void | setVariableData (const QString &) |
| virtual void | setupFrom (const std::vector< makVrv::DtSimEntry * > &data) |
| virtual DtReaderWriter * | createBoundVariable (const std::string &variableName) |
| virtual void | setupFromBoundVariable (const DtReaderWriter *variableName) |
| virtual void | requestWeaponsFor (const std::vector< makVrv::DtSimEntry * > &data) |
| virtual void | slot_receivedWeaponList (const DtUUID &entity) |
| virtual void | setAllowMultipleSelection (bool) |
| virtual bool | allowMultipleSelection () const |
| virtual QStringList | selectedWeaponsNames () const |
| virtual QStringList | selectedWeaponsIds () const |
| virtual std::list< DtString > | selectedWeaponResources () const |
| virtual std::list< DtString > | selectedResources () const |
| virtual void | selectWeapons (const QStringList &) |
| virtual void | selectWeaponsById (const QStringList &) |
| virtual void | updateWeapons () |
| virtual void | selectResource (const DtString &) |
| virtual void | updateResources () |
| virtual bool | includeResources () const |
| virtual void | setIncludeResources (const bool doInclude) |
| virtual bool | displayWeapons () const |
| virtual void | setDisplayWeapons (const bool doDisplay) |
| virtual bool | displayResources () const |
| virtual void | setDisplayResources (const bool doDisplay) |
Public Member Functions inherited from makVrf::DtTaskSetVariableWidget | |
| DtTaskSetVariableWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode) | |
| virtual | ~DtTaskSetVariableWidget () |
| virtual void | setToolTip (const QString &) |
| virtual void | setLabel (const std::string &) |
| virtual void | setLabel (const QString &) |
| virtual void | setVariableData (const std::string &) |
| virtual QString | variableData () const |
| virtual QString | label () const |
| virtual void | setIsInternal (bool) |
| virtual bool | isInternal () const |
| virtual void | setTopLineVisible (bool) |
| virtual bool | topLineVisible () const |
| virtual void | createTopLine () |
| virtual void | setIndent (int) |
| virtual int | indent () const |
| virtual bool | isValid () const |
| virtual void | setTopLabelChecked (bool) |
| virtual bool | topLabelChecked () const |
| virtual void | setRange (const DtRange &) |
| virtual void | setRangeTop (double) |
| virtual void | setRangeTop (int) |
| virtual double | rangeTop () const |
| virtual void | setRangeBottom (double) |
| virtual void | setRangeBottom (int) |
| virtual double | rangeBottom () const |
| virtual const DtRange & | getRange () const |
| virtual void | setTopLabelIsCheckable (bool) |
| virtual bool | topLabelIsCheckable () const |
| virtual void | getDefaultSpecificTitles (QString &defaultTitle, QString &specificTitle) const |
| virtual void | setDefaultSpecificTitles (const QString &defaultTitle, const QString &specificTitle) |
| virtual void | setupDefaultSpecificFromVariableData (const DtString &var) |
| virtual std::string | scriptedTaskVariableName () const |
| virtual void | setSelection (const std::set< makVrv::DtUniqueID > &selection) |
| virtual void | setSelection (const std::vector< makVrv::DtSimEntry * > &data) |
| virtual const std::set < makVrv::DtUniqueID > & | selection () const override |
| virtual void | setDefaultValueFromStateProperty (const DtPropertyInterface &) |
Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface | |
| DtTaskSetVariableWidgetInterface () | |
| virtual | ~DtTaskSetVariableWidgetInterface () |
| virtual void | widgetInitializedForDialog (DtScriptedTaskDialog *, const std::vector< makVrv::DtSimEntry * > &data) |
| virtual bool | guiElementOnly () const |
Static Public Member Functions | |
| static makVrv::DtUnicode | codeVariableType () |
| static std::string | designerGroup () |
| static std::string | headerFile () |
| static std::string | variableName () |
Static Public Member Functions inherited from makVrf::DtTaskSetVariableWidget | |
| static bool | includeInQtDesigner () |
Static Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface | |
| static bool | canBeUsedAsWidget () |
| static void | initializeForQtDesignerExtension (makVrv::DtDe &de, QDesignerFormEditorInterface *core) |
| static bool | includeInQtDesigner () |
Public Attributes | |
| boost::signals2::signal< void()> | signal_receivedWeaponsList |
| boost::signals2::signal< void()> | signal_weaponSelectionChanged |
| boost::signals2::signal< void()> | signal_resourceSelectionChanged |
| QLabel * | myWeaponLabel |
| QComboBox * | myWeaponSystemsCombo |
| QHBoxLayout * | myWeaponContentLayout |
| QLabel * | myResourcesLabel |
| QComboBox * | myResourcesCombo |
| QHBoxLayout * | myResourcesContentLayout |
| QString | myDefaultValue |
Public Attributes inherited from makVrf::DtTaskSetVariableWidget | |
| boost::signals2::signal< void(bool)> | signal_topLevelCheckStateChanged |
| int | myIndent |
| QVBoxLayout * | myVariableWidgetLayout |
| QHBoxLayout * | mySpacedLayout |
| QVBoxLayout * | myVariableContentLayout |
| QWidget * | myTopLine |
| QLabel * | myTopLabel |
| QWidget * | myChoiceCanvas |
| QRadioButton * | myUseDefault |
| QRadioButton * | myUseSpecific |
| QSpacerItem * | myTopSeparator |
| QHBoxLayout * | myTopLineLayout |
| QSpacerItem * | mySpacerItem |
Protected Slots | |
| virtual void | weaponSelectionChanged () |
| virtual void | resourceSelectionChanged () |
Protected Slots inherited from makVrf::DtTaskSetVariableWidget | |
| virtual void | topLabelCheckStateChanged () |
Protected Member Functions | |
| virtual std::string | variableDataFromUiDesigner (const QDomElement &element, const DtScriptedTaskVariableLayoutConverter &converter) const |
| virtual void | addWeapon (const WeaponSystem &) |
| virtual void | weaponUpdated (const WeaponSystem &) |
| virtual void | weaponChanged () |
| virtual void | weaponCheckingDisabled () |
| virtual void | weaponCheckComplete () |
| virtual void | nextRequest () |
| virtual void | setupForComboBox () |
| virtual DtString | getWeapon () |
| virtual DtString | getAmmo () |
| virtual std::vector< DtString > | parseBoundVariable () |
| virtual QString | weaponId (const QString &qweaponName) const |
| virtual QString | weaponName (const QString &weaponId) const |
| virtual std::list< DtString > | weaponResources (QString &qweaponName) const |
| virtual DtTaskSetVariableWidgetExtensionInterface * | parameterContents (QWidget *parent, const Qt::WindowFlags &flags=0) const override |
Protected Member Functions inherited from makVrf::DtTaskSetVariableWidget | |
| virtual void | selectionChanged (const std::set< makVrv::DtUniqueID > &oldSelection) |
Protected Attributes | |
| std::set< DtUUID > | myToRequest |
| std::set< DtUUID > | myAwaitingWeaponSystemResponse |
| std::set< DtUUID > | myDidRequest |
| std::vector< DtUUID > | myCurrSelected |
| DtString | myResourceToSelect |
| bool | myIncludeResources |
| bool | myDisplayWeapons |
| bool | myDisplayResources |
| DtWeaponSystemType | myWeaponFilterType |
| std::vector< DtSimTaskMessageType > | myFireTaskTypes |
Protected Attributes inherited from makVrf::DtTaskSetVariableWidget | |
| makVrv::DtDe & | myDe |
| makVrv::DtSignalConnectionManager | myConnections |
| bool | myTopLabelIsCheckable |
| DtRange | myRange |
| bool | myIsInternal |
| CreationFlags | myCreationFlags |
| QString | myVariableData |
| std::set< makVrv::DtUniqueID > | mySelection |
Properties | |
| bool | allowMultipleSelecion |
Properties inherited from makVrf::DtTaskSetVariableWidget | |
| QString | label |
| bool | isInternal |
| int | indent |
| QString | variableData |
Additional Inherited Members | |
Public Types inherited from makVrf::DtTaskSetVariableWidgetInterface | |
| enum | CreationFlags { NormalMode = 0x00000000, QtDesignerMode = 0x00000001 } |
Signals inherited from makVrf::DtTaskSetVariableWidget | |
| void | validityUpdated () |
| makVrf::DtWeaponSelectionWidget::DtWeaponSelectionWidget | ( | makVrv::DtDe & | de, |
| QWidget * | parent, | ||
| const Qt::WindowFlags & | flags = 0, |
||
| const CreationFlags & | cflags = NormalMode |
||
| ) |
|
virtual |
|
virtual |
Used for pre VRF-5.1 scenarios - should be deprecated. Optionally allow user to filter type of weapon to display.
|
virtual |
|
virtual |
Set the task type for which the widget (the containing dialog) is displayed. Filters the weapon systems on their capability to execute tasks.
|
virtual |
|
virtual |
Validation range. Not applicable.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
virtual |
Default value to set in control. Will contain initial weapon to select.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
virtual |
Variable data. Sets the fire task type. used to filter the weapons for this task type.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
virtual |
Sets up widget with currently selected item. Requests data.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
virtual |
Creates the reader/writer variable that will be used as part of the task statement.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
virtual |
Sets up the widget from the given reader/writer variables.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
virtual |
Add all the entities (vector of sim entries) to myAwaitingWeaponSystemResponse list, and then call the DtWeaponListRequestor instance's updateWeaponSystem() on the first entity in the list. If the list is empty, call updateWeapons().
|
virtual |
|
virtual |
Set/get whether resources are requested along with weapon names when making a weapon list request from the back end. Used in requestWeaponsFor().
|
virtual |
Set/get whether resources are requested along with weapon names when making a weapon list request from the back end. Used in requestWeaponsFor().
|
virtual |
Set/get whether the weapons list combo-box will be displayed.
|
virtual |
Set/get whether the weapons list combo-box will be displayed.
|
virtual |
Set/get whether the resources list combo-box will be displayed.
|
virtual |
Set/get whether the resources list combo-box will be displayed.
|
virtual |
Used for pre VRF-5.1 scripts - should be deprecated. The variableDataFromUiDesigner() function should be removed. It checks for the multiple selection boolean flag, which has been removed. The widget allow only a single weapon/resource selection through combo box. If there is a checkbox in the widget UI designer - it should be removed. Call before setup – allows multiple selection of weapons.
|
virtual |
|
virtual |
Used for pre VRF-5.1 scenarios - should be deprecated. List of currently selected weapons names.
|
virtual |
List of currently selected weapons IDs.
|
virtual |
List of resources for the currently selected weapon.
|
virtual |
List of currently selected resources.
|
virtual |
Selects weapons in the list. If combo box will only look at first one.
|
virtual |
|
virtual |
Populate the UI weapons list.
|
virtual |
Select the ammo resource.
|
virtual |
Populate the UI resources list.
|
inlinestatic |
References makVrv::DtUnicode::tr().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
protectedvirtual |
Used for pre VRF-5.1 scripts - should be deprecated. The variableDataFromUiDesigner() function should be removed. It checks for the multiple selection boolean flag, which has been removed. The widget allow only a single weapon/resource selection through combo box. If there is a checkbox in the widget UI designer - it should be removed. Call before setup – allows multiple selection of weapons.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
protectedvirtual |
Reimplemented in makVrf::DtIndirectFireWeaponSelectionWidget, and makVrf::DtDirectFireWeaponSelectionWidget.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Works for both 5.1 and 5.0 Correctly parses bound variable in myDefaultValue to get ammo type and weapon. Will return 2 item vector. Both items will be empty strings in the event that the default value was an empty string.
|
protectedvirtual |
Lookup the weapon ID for the selected weapon.
|
protectedvirtual |
|
protectedvirtual |
Lookup the weapon resources for the selected weapon.
|
overrideprotectedvirtual |
If there are any, returns contents for this variable for variable extension. Default is no extension.
Reimplemented from makVrf::DtTaskSetVariableWidgetInterface.
|
protectedvirtualslot |
|
protectedvirtualslot |
| boost::signals2::signal<void ()> makVrf::DtWeaponSelectionWidget::signal_receivedWeaponsList |
| boost::signals2::signal<void ()> makVrf::DtWeaponSelectionWidget::signal_weaponSelectionChanged |
| boost::signals2::signal<void()> makVrf::DtWeaponSelectionWidget::signal_resourceSelectionChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
If no resources yet when selectResource is called, hold on until the resources come in from the back-end.
|
protected |
Indicates whether the back end will be asked to include resources with the weapon names it returns; also whether they will be included in the display list.
|
protected |
Specifies if the weapons list combo-box will be displayed - so the user to select a weapon. The weapons list might be kept hidden for weapons which have just a single resource - e.g. cruise missile In the case of a hidden list with multiple weapons - the resource list should display a union of resources for all weapons.
|
protected |
Specifies if the resources list combo-box will be displayed - so the user to select a resource for a selected weapon. The weapons list might be kept hidden for weapons like Grenade, when the user selects just the ammunition, or if there is just a single weapon In the case of a hidden list with multiple weapons - the resource list should display a union of resources for all weapons.
|
protected |
Used for pre VRF-5.1 scenarios - should be deprecated. Option to allow user to filter by a particular category of weapon.
|
protected |
Filters the weapon systems on their capability to execute tasks.
| QLabel* makVrf::DtWeaponSelectionWidget::myWeaponLabel |
| QComboBox* makVrf::DtWeaponSelectionWidget::myWeaponSystemsCombo |
| QHBoxLayout* makVrf::DtWeaponSelectionWidget::myWeaponContentLayout |
| QLabel* makVrf::DtWeaponSelectionWidget::myResourcesLabel |
| QComboBox* makVrf::DtWeaponSelectionWidget::myResourcesCombo |
| QHBoxLayout* makVrf::DtWeaponSelectionWidget::myResourcesContentLayout |
| QString makVrf::DtWeaponSelectionWidget::myDefaultValue |
|
readwrite |
Used for pre VRF-5.1 scripts - should be deprecated. The variableDataFromUiDesigner() function should be removed. It checks for the multiple selection boolean flag, which has been removed. The widget allow only a single weapon/resource selection through combo box. If there is a checkbox in the widget UI designer - it should be removed. Call before setup – allows multiple selection of weapons.