VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | Properties
makVrf::DtWeaponSelectionWidget Class Reference

Widget that allows users to select weapons for the given entity. More...

Inheritance diagram for makVrf::DtWeaponSelectionWidget:
Inheritance graph
[legend]

Public Member Functions

 DtWeaponSelectionWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode)
 
virtual ~DtWeaponSelectionWidget ()
 
virtual void setLabel (const QString &)
 Display label. More...
 
virtual QString label () const
 
virtual void setRange (double bottom, double top)
 Validation range. Not applicable. More...
 
virtual void setDefaultValue (const std::string &)
 Default value to set in control. Will contain initial weapon to select. More...
 
virtual void setVariableData (const QString &)
 Variable data. Unused in this widget. More...
 
virtual void setupFrom (const std::vector< makVrv::DtSimEntry * > &data)
 Sets up widget with currently selected item. Requests data. More...
 
virtual DtReaderWritercreateBoundVariable (const std::string &variableName)
 Creates the reader/writer variable that will be used as part of the task statement. More...
 
virtual void setupFromBoundVariable (const DtReaderWriter *variableName)
 Sets up the widget from the given reader/writer variables. More...
 
virtual void requestWeaponsFor (const std::vector< makVrv::DtSimEntry * > &data)
 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. More...
 
virtual void slot_receivedWeaponList (const DtUUID &entity)
 
virtual void setAllowMultipleSelection (bool)
 Call before setup – allows multiple selection of weapons. More...
 
virtual bool allowMultipleSelection () const
 
virtual QStringList selectedWeapons () const
 List of currently selected weapons. More...
 
virtual void selectWeapons (const QStringList &)
 Selects weapons in the list. If combo box will only look at first one. More...
 
virtual bool includeResources () const
 Set/get whether resources are requested along with weapon names when making a weapon list request from the back end. More...
 
virtual void setIncludeResources (const bool doInclude)
 
- 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 &)
 Sets the tool tip. More...
 
virtual void setLabel (const std::string &)
 Display label. More...
 
virtual void setVariableData (const std::string &)
 Calls QString version. More...
 
virtual QString variableData () const
 
virtual void setIsInternal (bool)
 Whether or not value is internal. Internal values will not be shown to the user on the scripted task dialog. More...
 
virtual bool isInternal () const
 
virtual void setTopLineVisible (bool)
 Hides top line. More...
 
virtual bool topLineVisible () const
 
virtual void createTopLine ()
 Creates top line. More...
 
virtual void setIndent (int)
 Sets the indent level for the contents of this widget, except for the title line. More...
 
virtual int indent () const
 
virtual bool isValid () const
 Indicates the current selection is valid. More...
 
virtual void setTopLabelChecked (bool)
 Sets the top label to be checked/unchecked and calls topLabelChecked if the check box is visible. More...
 
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 DtRangegetRange () const
 
virtual void setTopLabelIsCheckable (bool)
 Sets whether or not the top label is checkable. More...
 
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)
 Format is allowdefault=[defaultTitle],[specificTitle]. More...
 
virtual std::string scriptedTaskVariableName () const
 In most cases this is the objectName of the object, however, in some cases (as in radio button) this could be a name that is shared amongst like objects, so, that is returned instead. More...
 
- Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface
 DtTaskSetVariableWidgetInterface ()
 
virtual ~DtTaskSetVariableWidgetInterface ()
 
virtual void widgetInitializedForDialog (DtScriptedTaskDialog *, const std::vector< makVrv::DtSimEntry * > &data)
 Called when the widget is initialized from a scripted task dialog. Default implementation is to do nothing. More...
 
virtual
DtTaskSetVariableWidgetExtensionInterface
parameterContents (QWidget *parent, const Qt::WindowFlags &flags=0) const
 If there are any, returns contents for this variable for variable extension. Default is no extension. More...
 
virtual bool guiElementOnly () const
 Returns true if this is a GUI element only. Default is false. More...
 

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 ()
 Whether or not this shows up as a usable variable widget. More...
 
static void initializeForQtDesignerExtension (makVrv::DtDe &de, QDesignerFormEditorInterface *core)
 Implement at class level to perform Qt Designer custom widget initialization. Please refer to Qt documentation for designer modifications. More...
 
static bool includeInQtDesigner ()
 

Public Attributes

boost::signals2::signal< void()> signal_receivedWeaponsList
 
boost::signals2::signal< void()> signal_weaponSelectionChanged
 
QLabelmyWeaponLabel
 
QComboBoxmyWeaponSystemsCombo
 
QListWidget * myWeaponSystemsList
 
QBoxLayout * myContentLayout
 
QString myDefaultValue
 
- Public Attributes inherited from makVrf::DtTaskSetVariableWidget
boost::signals2::signal< void(bool)> signal_topLevelCheckStateChanged
 
int myIndent
 
QVBoxLayout * myVariableWidgetLayout
 
QHBoxLayout * mySpacedLayout
 
QVBoxLayout * myVariableContentLayout
 When creating subclasses of this item, use the variable content layout to add your content. More...
 
QWidget * myTopLine
 
QLabelmyTopLabel
 
QWidget * myChoiceCanvas
 
QRadioButton * myUseDefault
 
QRadioButton * myUseSpecific
 
QSpacerItem * myTopSeparator
 
QHBoxLayout * myTopLineLayout
 
QSpacerItem * mySpacerItem
 

Protected Slots

virtual void weaponSelectionChanged ()
 
- Protected Slots inherited from makVrf::DtTaskSetVariableWidget
virtual void topLabelCheckStateChanged ()
 

Protected Member Functions

virtual std::string variableDataFromUiDesigner (const QDomElement &element, const DtScriptedTaskVariableLayoutConverter &converter) const
 Given the Ui designer properties create a string that will represent the variable data for those properties. More...
 
virtual void addWeapon (const WeaponSystem &)
 
virtual void weaponUpdated (const WeaponSystem &)
 
virtual void weaponChanged ()
 
virtual void weaponCheckingDisabled ()
 
virtual void weaponCheckComplete ()
 
virtual void updateWeapons ()
 
virtual void nextRequest ()
 
virtual void setupForComboBox ()
 
virtual void setupForListBox ()
 

Protected Attributes

std::set< DtUUIDmyToRequest
 
std::set< DtUUIDmyAwaitingWeaponSystemResponse
 
std::set< DtUUIDmyDidRequest
 
std::vector< DtUUIDmyCurrSelected
 
bool myIncludeResources
 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. More...
 
bool myMultipleSelection
 
QString myTitle
 
- Protected Attributes inherited from makVrf::DtTaskSetVariableWidget
makVrv::DtDemyDe
 
makVrv::DtSignalConnectionManager myConnections
 
bool myTopLabelIsCheckable
 
DtRange myRange
 
bool myIsInternal
 
CreationFlags myCreationFlags
 
QString myVariableData
 

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 ()
 Signal which can be emitted to indicate the validity of the current widget selection has changed. More...
 

Detailed Description

Widget that allows users to select weapons for the given entity.

Constructor & Destructor Documentation

makVrf::DtWeaponSelectionWidget::DtWeaponSelectionWidget ( makVrv::DtDe de,
QWidget *  parent,
const Qt::WindowFlags &  flags = 0,
const CreationFlags cflags = NormalMode 
)
virtual makVrf::DtWeaponSelectionWidget::~DtWeaponSelectionWidget ( )
virtual

Member Function Documentation

virtual void makVrf::DtWeaponSelectionWidget::setLabel ( const QString &  )
virtual

Display label.

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual QString makVrf::DtWeaponSelectionWidget::label ( ) const
virtual

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual void makVrf::DtWeaponSelectionWidget::setRange ( double  bottom,
double  top 
)
virtual

Validation range. Not applicable.

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual void makVrf::DtWeaponSelectionWidget::setDefaultValue ( const std::string &  )
virtual

Default value to set in control. Will contain initial weapon to select.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtWeaponSelectionWidget::setVariableData ( const QString &  )
virtual

Variable data. Unused in this widget.

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual void makVrf::DtWeaponSelectionWidget::setupFrom ( const std::vector< makVrv::DtSimEntry * > &  data)
virtual

Sets up widget with currently selected item. Requests data.

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual DtReaderWriter* makVrf::DtWeaponSelectionWidget::createBoundVariable ( const std::string &  variableName)
virtual

Creates the reader/writer variable that will be used as part of the task statement.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtWeaponSelectionWidget::setupFromBoundVariable ( const DtReaderWriter variableName)
virtual

Sets up the widget from the given reader/writer variables.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtWeaponSelectionWidget::requestWeaponsFor ( const std::vector< makVrv::DtSimEntry * > &  data)
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 void makVrf::DtWeaponSelectionWidget::slot_receivedWeaponList ( const DtUUID entity)
virtual
virtual bool makVrf::DtWeaponSelectionWidget::includeResources ( ) const
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 void makVrf::DtWeaponSelectionWidget::setIncludeResources ( const bool  doInclude)
virtual
virtual void makVrf::DtWeaponSelectionWidget::setAllowMultipleSelection ( bool  )
virtual

Call before setup – allows multiple selection of weapons.

virtual bool makVrf::DtWeaponSelectionWidget::allowMultipleSelection ( ) const
virtual
virtual QStringList makVrf::DtWeaponSelectionWidget::selectedWeapons ( ) const
virtual

List of currently selected weapons.

virtual void makVrf::DtWeaponSelectionWidget::selectWeapons ( const QStringList &  )
virtual

Selects weapons in the list. If combo box will only look at first one.

static makVrv::DtUnicode makVrf::DtWeaponSelectionWidget::codeVariableType ( )
inlinestatic
static std::string makVrf::DtWeaponSelectionWidget::designerGroup ( )
inlinestatic
static std::string makVrf::DtWeaponSelectionWidget::headerFile ( )
inlinestatic
static std::string makVrf::DtWeaponSelectionWidget::variableName ( )
inlinestatic
virtual std::string makVrf::DtWeaponSelectionWidget::variableDataFromUiDesigner ( const QDomElement &  ,
const DtScriptedTaskVariableLayoutConverter  
) const
protectedvirtual

Given the Ui designer properties create a string that will represent the variable data for those properties.

Reimplemented from makVrf::DtTaskSetVariableWidget.

virtual void makVrf::DtWeaponSelectionWidget::addWeapon ( const WeaponSystem )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::weaponUpdated ( const WeaponSystem )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::weaponChanged ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::weaponCheckingDisabled ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::weaponCheckComplete ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::updateWeapons ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::nextRequest ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::setupForComboBox ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::setupForListBox ( )
protectedvirtual
virtual void makVrf::DtWeaponSelectionWidget::weaponSelectionChanged ( )
protectedvirtualslot

Member Data Documentation

boost::signals2::signal<void ()> makVrf::DtWeaponSelectionWidget::signal_receivedWeaponsList
boost::signals2::signal<void ()> makVrf::DtWeaponSelectionWidget::signal_weaponSelectionChanged
std::set<DtUUID> makVrf::DtWeaponSelectionWidget::myToRequest
protected
std::set<DtUUID> makVrf::DtWeaponSelectionWidget::myAwaitingWeaponSystemResponse
protected
std::set<DtUUID> makVrf::DtWeaponSelectionWidget::myDidRequest
protected
std::vector<DtUUID> makVrf::DtWeaponSelectionWidget::myCurrSelected
protected
bool makVrf::DtWeaponSelectionWidget::myIncludeResources
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.

QLabel* makVrf::DtWeaponSelectionWidget::myWeaponLabel
QComboBox* makVrf::DtWeaponSelectionWidget::myWeaponSystemsCombo
QListWidget* makVrf::DtWeaponSelectionWidget::myWeaponSystemsList
QBoxLayout* makVrf::DtWeaponSelectionWidget::myContentLayout
QString makVrf::DtWeaponSelectionWidget::myDefaultValue
bool makVrf::DtWeaponSelectionWidget::myMultipleSelection
protected
QString makVrf::DtWeaponSelectionWidget::myTitle
protected

Property Documentation

bool makVrf::DtWeaponSelectionWidget::allowMultipleSelecion
readwrite

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)