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

Signals | |
| void | resourcesSetUp () |
| void | selectedResourceChanged () |
Signals inherited from makVrf::DtTaskSetVariableWidget | |
| void | validityUpdated () |
Public Member Functions | |
| DtResourceSelectionEntryWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode) | |
| virtual | ~DtResourceSelectionEntryWidget () override |
| virtual void | setLabel (const QString &) override |
| virtual QString | label () const override |
| virtual void | setRange (double bottom, double top) override |
| virtual void | setResource (const DtEntityType &) |
| virtual const DtSimResource * | resource () const |
| virtual DtSimResource * | resource () |
| virtual DtEntityType | resourceType () const |
| virtual void | setDefaultValue (const std::string &) override |
| virtual void | setVariableData (const QString &) override |
| virtual void | setupFrom (const std::set< makVrv::DtUniqueID > &data) override |
| virtual DtReaderWriter * | createBoundVariable (const std::string &variableName) override |
| virtual void | setupFromBoundVariable (const DtReaderWriter *variableName) override |
| virtual void | setBin (int) |
| int | bin () const |
| virtual void | setAllowAmountEntry (bool) |
| virtual void | setRealResource (const DtSimResource &) |
| virtual void | setIntegerResource (const DtSimResource &) |
| virtual void | enable () |
| virtual void | disable (const QString &) |
| virtual double | currentAmount () const |
| virtual void | setCurrentAmount (double) |
Public Member Functions inherited from makVrf::DtTaskSetVariableWidget | |
| DtTaskSetVariableWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode) | |
| virtual | ~DtTaskSetVariableWidget () override |
| virtual void | setToolTip (const QString &) override |
| virtual void | setLabel (const std::string &) override |
| virtual void | setVariableData (const std::string &) override |
| virtual QString | variableData () const |
| virtual void | setIsInternal (bool) |
| virtual bool | isInternal () const |
| virtual void | setTopLineVisible (bool) override |
| virtual bool | topLineVisible () const override |
| virtual void | createTopLine () |
| virtual void | setIndent (int) override |
| virtual int | indent () const |
| virtual bool | isValid () const override |
| 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 | variableDataFromUiDesigner (const QDomElement &, const DtScriptedTaskVariableLayoutConverter &) const override |
| virtual std::string | scriptedTaskVariableName () const override |
| virtual void | setSelection (const std::set< makVrv::DtUniqueID > &selection) override |
| virtual const std::set < makVrv::DtUniqueID > & | selection () const override |
| virtual void | setDefaultValueFromStateProperty (const DtPropertyInterface &) override |
Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface | |
| DtTaskSetVariableWidgetInterface () | |
| virtual | ~DtTaskSetVariableWidgetInterface () |
| virtual void | widgetInitializedForDialog (DtScriptedTaskDialog *, const std::set< makVrv::DtUniqueID > &data) |
| virtual bool | guiElementOnly () const |
Public Member Functions inherited from makVrf::DtVrfResourceRequestor | |
| DtVrfResourceRequestor (makVrv::DtDe &) | |
| virtual | ~DtVrfResourceRequestor () |
| virtual void | requestResourcesFor (const std::set< makVrv::DtUniqueID > &data, bool entitiesOnly=true) |
| virtual void | startMonitoring (const DtUUID &, int rate=-1) |
| virtual void | stopMonitoring (const DtUUID &) |
| virtual void | setUpdateRate (const DtUUID &entity, int) |
| bool | canSetResources () const |
Static Public Member Functions | |
| static makVrv::DtUnicode | codeVariableType () |
| static std::string | designerGroup () |
| static std::string | headerFile () |
| static std::string | variableName () |
| static void | initializeForQtDesignerExtension (makVrv::DtDe &, QDesignerFormEditorInterface *) |
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 | |
| QLabel * | myLocationLabel |
| QComboBox * | myLocationsCombo |
| QLabel * | myResourceLabel |
| QComboBox * | myResourcesCombo |
| QGridLayout * | myContentLayout |
| QLabel * | myFullLabel |
| QLabel * | myFullAmount |
| QLabel * | myValueLabel |
| QLineEdit * | myValueAmount |
| QDoubleValidator * | myDoubleValidator |
| QIntValidator * | myIntValidator |
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 Types | |
| typedef std::vector < std::unique_ptr < DtSimResource > > | Resources |
Protected Types inherited from makVrf::DtVrfResourceRequestor | |
| typedef std::pair < DtEntityType, int > | Key |
Protected Slots | |
| virtual void | locationChanged () |
| virtual void | resourceChanged () |
| virtual void | resourceAmountChanged () |
Protected Slots inherited from makVrf::DtTaskSetVariableWidget | |
| virtual void | topLabelCheckStateChanged () |
Protected Member Functions | |
| virtual bool | shouldAddResource (const DtSimResource &) const |
| virtual bool | isEntityType (const DtSimResource &, const std::string &validEntityTypes) const |
| virtual void | addResource (const DtSimResource &) override |
| virtual void | resourceUpdated (const DtSimResource &) override |
| virtual void | resourcesChanged () override |
| virtual void | resourceCheckingDisabled () override |
| virtual void | resourceCheckComplete () override |
| virtual DtTaskSetVariableWidgetExtensionInterface * | parameterContents (QWidget *parent, const Qt::WindowFlags &flags) const override |
Protected Member Functions inherited from makVrf::DtTaskSetVariableWidget | |
| virtual void | selectionChanged (const std::set< makVrv::DtUniqueID > &oldSelection) |
Protected Member Functions inherited from makVrf::DtVrfResourceRequestor | |
| virtual void | slot_resourceResponse (const makVrfEvents::DtResourceResponseEvent &) |
Protected Attributes | |
| QString | myDefaultValue |
| makVrv::DtDe & | myDe |
| int | myBin = 0 |
| bool | myAllowAmountEntry = false |
| Resources | myResources |
| DtSimResource * | myRestoredResource = nullptr |
| makVrv::DtSignalConnectionManager | myConnections |
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 |
Protected Attributes inherited from makVrf::DtVrfResourceRequestor | |
| makVrv::DtDe & | myDe |
| std::set< DtUUID > | myResourceRequests |
| bool | myCanSetResources |
| std::map< Key, DtSimResource > | myResources |
| makVrv::DtSignalConnectionManager | myConnectionManager |
Additional Inherited Members | |
Public Types inherited from makVrf::DtTaskSetVariableWidgetInterface | |
| enum | CreationFlags { NormalMode = 0x00000000, QtDesignerMode = 0x00000001 } |
Properties inherited from makVrf::DtTaskSetVariableWidget | |
| QString | label |
| bool | isInternal |
| int | indent |
| QString | variableData |
|
protected |
| makVrf::DtResourceSelectionEntryWidget::DtResourceSelectionEntryWidget | ( | makVrv::DtDe & | de, |
| QWidget * | parent, | ||
| const Qt::WindowFlags & | flags = 0, |
||
| const CreationFlags & | cflags = NormalMode |
||
| ) |
|
overridevirtual |
|
overridevirtual |
Display label.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
overridevirtual |
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
overridevirtual |
Validation range. Not applicable.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
overridevirtual |
Default value to set in control. Will contain initial resource to select.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
overridevirtual |
Variable data. Used to determine allowable variable types.
Reimplemented from makVrf::DtTaskSetVariableWidget.
Reimplemented in makVrf::DtNavalMineResourceSelectionEntryWidget, makVrf::DtBombResourceSelectionEntryWidget, and makVrf::DtMunitionResourceSelectionEntryWidget.
|
overridevirtual |
Sets up widget with currently selected item. Requests data.
Reimplemented from makVrf::DtTaskSetVariableWidget.
|
overridevirtual |
Creates the reader/writer variable that will be used as part of the task statement.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
overridevirtual |
Sets up the widget from the given reader/writer variables.
Implements makVrf::DtTaskSetVariableWidgetInterface.
|
inlinestatic |
References makVrv::DtUnicode::tr().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Add custom menu item to task menu to be able to edit the entity type created by this object.
|
virtual |
Use -1 to show all bins available.
| int makVrf::DtResourceSelectionEntryWidget::bin | ( | ) | const |
|
virtual |
Default is false. If show shows full amount and allows for entry of current amount.
|
virtual |
Values are passed in as native units.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Value returned/set in native amount.
|
virtual |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
signal |
|
signal |
|
protectedvirtual |
Looks at variable data for: "resourcetypes=<resourcetype>;<...>" "entitytypes=<entitytype>;<...>" Can only be resourcetypes OR entity types. Not both.
|
protectedvirtual |
|
overrideprotectedvirtual |
Called to add a new resource.
Implements makVrf::DtVrfResourceRequestor.
|
overrideprotectedvirtual |
Called when a particular resource has been updated.
Implements makVrf::DtVrfResourceRequestor.
|
overrideprotectedvirtual |
Virtual overrides to complete class.
Called when resources received has changed
Implements makVrf::DtVrfResourceRequestor.
|
overrideprotectedvirtual |
Called when this item can not longer set resources. This will happen when multiple requests are made through this class and there are no common resources.
Implements makVrf::DtVrfResourceRequestor.
|
overrideprotectedvirtual |
Called when resource checking is complete.
Implements makVrf::DtVrfResourceRequestor.
|
overrideprotectedvirtual |
If there are any, returns contents for this variable for variable extension. Default is no extension.
Reimplemented from makVrf::DtTaskSetVariableWidgetInterface.
| QLabel* makVrf::DtResourceSelectionEntryWidget::myLocationLabel |
| QComboBox* makVrf::DtResourceSelectionEntryWidget::myLocationsCombo |
| QLabel* makVrf::DtResourceSelectionEntryWidget::myResourceLabel |
| QComboBox* makVrf::DtResourceSelectionEntryWidget::myResourcesCombo |
| QGridLayout* makVrf::DtResourceSelectionEntryWidget::myContentLayout |
| QLabel* makVrf::DtResourceSelectionEntryWidget::myFullLabel |
| QLabel* makVrf::DtResourceSelectionEntryWidget::myFullAmount |
| QLabel* makVrf::DtResourceSelectionEntryWidget::myValueLabel |
| QLineEdit* makVrf::DtResourceSelectionEntryWidget::myValueAmount |
| QDoubleValidator* makVrf::DtResourceSelectionEntryWidget::myDoubleValidator |
| QIntValidator* makVrf::DtResourceSelectionEntryWidget::myIntValidator |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |