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

A widget class for encapsulating radio commands for tasks or sets. More...

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

Public Member Functions

 DtCommandAssignmentWidget (makVrv::DtDe &de, DtCommandDialogExtensionInterface *, QWidget *parent=0, Qt::WindowFlags flags=Qt::Dialog|Qt::CustomizeWindowHint|Qt::WindowTitleHint, int partOfPlan=false)
 CTOR.
virtual ~DtCommandAssignmentWidget ()
 DTOR.
virtual void run (const std::vector< makVrv::DtSimEntry * > &)
 Override to run the dialog.
virtual void setupUi (const std::vector< makVrv::DtSimEntry * > &, const DtSimStatement *stmt=NULL)
 Sets up the UI.
virtual void connectSignals (const std::vector< makVrv::DtSimEntry * > &)
 Call to remove dialog if an entity is destroyed that is part of the supplied list.
virtual void selectionChanged (const DtUUID &selection)
 Called when myEntitySelectionWidget selection has changed.
virtual bool insertMapFocusHandler (DtMapFocusHandler *, int index=-1)
 If a dialog has manages map focus handlers, inserts this map focus handler into the chain.
void setPartOfPlan (int b)
 0 - Not part of plan dialog 1 - Part of plan dialog 2 - Part of command widget
virtual void setBroadcastTitle (const QString &)
virtual
DtCommandDialogExtensionInterface
extension ()
- Public Member Functions inherited from makVrf::DtCommandAssignmentWidgetInterface
 DtCommandAssignmentWidgetInterface ()
virtual ~DtCommandAssignmentWidgetInterface ()
 DTOR.
void setParentMenu (DtVrfTaskSetMenu *p)
void setParentContainer (DtCommandAssignmentWidgetInterface *p)
DtCommandAssignmentWidgetInterfaceparentContainer ()
void setAllowExtensionChange (bool b)
bool allowExtensionChange () const
virtual const std::vector
< makVrv::DtSimEntry * > & 
connectedTo () const =0
- Public Member Functions inherited from makVrf::DtCommandDialogExtensionInterface
virtual ~DtCommandDialogExtensionInterface ()
virtual bool initiallyBroadcast () const
 Whether or not to initially set to broadcast. Default is false.
virtual bool allowBroadcasting () const
 Whether or not to allow broadcasting. Default is true.
virtual bool hasUserEntry () const
 Returns true if there is user entry. Default is to assume there is.
virtual QString entitySelectionGroupBoxTitle () const
 If defined, title for the group box for entity selection on command widget.
virtual void onCancel ()=0
virtual makVrv::DtUnicode broadcastTitle () const

Public Attributes

DtCommandDialogExtensionInterfacemyExtension
QSplitter * mySplitter
QWidget * myOriginalExtensionParent
QCheckBoxmyBroadcast
QGroupBox * myEntitySelectionGroupBox
DtVrfFilteredListViewmyEntitySelectionWidget
QHBoxLayout * myMasterLayout
QVBoxLayout * myWidgetLayout
QFrame * mySeparator
QWidget * myButtonFrame
QHBoxLayout * myButtonLayout
QSpacerItem * myButtonSpacer
QPushButtonmyOKButton
QPushButtonmyCancelButton
- Public Attributes inherited from makVrf::DtCommandAssignmentWidgetInterface
boost::signal< void(const
std::vector
< makVrv::DtSimEntry * > &)> 
signal_stopWatching
- Public Attributes inherited from makVrf::DtCommandDialogExtensionInterface
boost::signal< void()> signal_cancelled
boost::signal< void(bool)> signal_enableCommandModeSelection
 Signal sent when the task becomes valid (or invalid)
boost::signal< void(bool)> signal_validStateChanged
boost::signal< void(bool)> signal_disableCancel
boost::signal< void(std::vector
< DtUUID > names, const
DtSetDataRequest &)> 
signal_sendSetRequest
boost::signal< void(std::vector
< DtUUID > names, const
DtSimTask &)> 
signal_sendTaskRequest
boost::signal< void(const
DtSimCommandObjectWrapper &)> 
signal_sendCommandRequest
boost::signal< void(const
std::vector< DtUUID > &, const
DtSimTask &, DtVrfTaskSetMenu *)> 
signal_commandActivated
boost::signal< void(const
DtSimCommandObjectWrapper &)> 
signal_simCommandActivated
boost::signal< void(const
std::vector
< makVrv::DtSimEntry * > &)> 
signal_stopWatching

Protected Slots

virtual void onBroadcastChanged ()
 Calls down to logic to let it know the broadcast value has changed.
virtual void onCancel ()
 Emits cancel signal and closes dialog.
virtual void onPickOK ()
 Only used in pick mode.
const std::vector
< makVrv::DtSimEntry * > & 
connectedTo () const

Protected Member Functions

QWidget * widget ()
 Returns the widget.
virtual void setAllowBroadcast (bool)
virtual bool broadcasting () const
virtual void setBroadcasting (bool)
virtual void enableEntitySelectionWidget (bool)
virtual std::vector< std::string > commandDialogFiltersFor (const std::vector< makVrv::DtSimEntry * > &data, const DtSimStatement *stmt, int &initialSelection) const
 If part of a command dialog the filters to use for the command dialog selection.
virtual void addFilter (const DtVrfSelectionFilter *filter)
virtual void setSelectedName (const DtUUID &)
virtual DtUUID selectedName () const
virtual void selectFilter (int)
virtual void selectFirstNonEmptyFilter ()
virtual void setOKEnabled (bool)
 Sets whether or not the OK button is enabled.
virtual void setCancelEnabled (bool)
 Sets whether or not the Cancel button is enabled.
virtual bool extensionValid () const
virtual void initializeFromAction (DtVrfTaskSetAction *)
 Called to initialize from the given action.
virtual void commandActivated (const DtSimTask &, const std::vector< DtUUID > &, bool immediate)
 If immediate is true, puts command assignment widget into pick mode before finishing command activated code.
virtual void commandActivated (const DtSimCommandObjectWrapper &, bool immediate)
virtual void slot_objectAboutToBeRemoved (makVrv::DtSimObjectEntry &)
virtual void attachExtension (const std::vector< makVrv::DtSimEntry * > &data, DtCommandDialogExtensionInterface *, const DtSimStatement *stmt=NULL)
virtual void detachExtension ()
virtual void setPickMode (bool)
virtual bool editStatement (const std::vector< makVrv::DtSimEntry * > &, const DtSimStatement *)
 Edits the current statement. Return true if the statement can be edited.
virtual std::vector
< DtVrfObjectListViewItem::DtVrfObjectState
selectedObjects () const
virtual void setAllowObjectSelection (bool b)
 If false will hide broadcast and object selection.
virtual bool canSelectObjects () const
virtual bool wantsSelectionOfObjectInCommandMode () const
 Override to return false if, when this task is used as part of a simulation command, it does not want to allow to choose an object to apply the command to.
virtual bool valid () const
 Override to return whether or not extension is valid.
virtual void setupFrom (const std::vector< makVrv::DtSimEntry * > &)
 Sets up the extension for the given entries.
virtual void unknownObjectSelected (const DtUUID &)
 Sets up from an empty set.
virtual void noObjectsSelected ()
 Called when no objects are selected.
virtual void onOK ()
virtual void hideButtons (bool)
 If OK and Cancel buttons are present, hide them (or not)

Protected Attributes

makVrv::DtDemyDe
DtCommandAssignmentWidgetLogicmyLogic
int myPartOfPlan
std::vector< makVrv::DtSimEntry * > myConnectedTo
DtSimTaskmyImmediateTask
std::vector< DtUUIDmyImmediateNames
DtSimCommandObjectWrappermyCommandObjectWrapper
DtCommandDialogExtensionInterfacemyInitialExtension
QString myBroadcastTitle
makVrv::DtSignalConnectionManager myConnections
- Protected Attributes inherited from makVrf::DtCommandAssignmentWidgetInterface
DtVrfTaskSetMenumyTaskSetMenu
DtCommandAssignmentWidgetInterfacemyParentContainer
bool myAllowExtensionChange

Detailed Description

A widget class for encapsulating radio commands for tasks or sets.

Constructor & Destructor Documentation

makVrf::DtCommandAssignmentWidget::DtCommandAssignmentWidget ( makVrv::DtDe de,
DtCommandDialogExtensionInterface ,
QWidget *  parent = 0,
Qt::WindowFlags  flags = Qt::Dialog|Qt::CustomizeWindowHint|Qt::WindowTitleHint,
int  partOfPlan = false 
)

CTOR.

virtual makVrf::DtCommandAssignmentWidget::~DtCommandAssignmentWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrf::DtCommandAssignmentWidget::run ( const std::vector< makVrv::DtSimEntry * > &  )
virtual

Override to run the dialog.

Supplies data of entities that are selected for this dialog

Implements makVrf::DtCommandDialogExtensionInterface.

virtual void makVrf::DtCommandAssignmentWidget::setupUi ( const std::vector< makVrv::DtSimEntry * > &  ,
const DtSimStatement stmt = NULL 
)
virtual
virtual void makVrf::DtCommandAssignmentWidget::connectSignals ( const std::vector< makVrv::DtSimEntry * > &  )
virtual

Call to remove dialog if an entity is destroyed that is part of the supplied list.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::selectionChanged ( const DtUUID selection)
virtual

Called when myEntitySelectionWidget selection has changed.

Checks if there is an extension dialog associated with this widget and if so calls down to it's selectionChanged. This allows the command widget to share selection changes with its extension when needed.

Implements makVrf::DtCommandDialogExtensionInterface.

virtual bool makVrf::DtCommandAssignmentWidget::insertMapFocusHandler ( DtMapFocusHandler ,
int  index = -1 
)
virtual

If a dialog has manages map focus handlers, inserts this map focus handler into the chain.

Will call the initial extension to do the work. Will return true if inserted into focus chain

Implements makVrf::DtCommandDialogExtensionInterface.

Reimplemented in makVrf::DtEmbeddedEntityCommandAssignmentWidget.

void makVrf::DtCommandAssignmentWidget::setPartOfPlan ( int  b)
inlinevirtual

0 - Not part of plan dialog 1 - Part of plan dialog 2 - Part of command widget

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::setBroadcastTitle ( const QString &  )
virtual
virtual DtCommandDialogExtensionInterface* makVrf::DtCommandAssignmentWidget::extension ( )
virtual
QWidget* makVrf::DtCommandAssignmentWidget::widget ( )
inlineprotectedvirtual

Returns the widget.

Implements makVrf::DtCommandDialogExtensionInterface.

virtual void makVrf::DtCommandAssignmentWidget::setAllowBroadcast ( bool  )
protectedvirtual
virtual bool makVrf::DtCommandAssignmentWidget::broadcasting ( ) const
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::setBroadcasting ( bool  )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::enableEntitySelectionWidget ( bool  )
protectedvirtual
virtual std::vector<std::string> makVrf::DtCommandAssignmentWidget::commandDialogFiltersFor ( const std::vector< makVrv::DtSimEntry * > &  data,
const DtSimStatement stmt,
int initialSelection 
) const
protectedvirtual

If part of a command dialog the filters to use for the command dialog selection.

Implements makVrf::DtCommandDialogExtensionInterface.

Reimplemented in makVrf::DtEmbeddedEntityCommandAssignmentWidget.

virtual void makVrf::DtCommandAssignmentWidget::addFilter ( const DtVrfSelectionFilter filter)
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::setSelectedName ( const DtUUID )
protectedvirtual
virtual DtUUID makVrf::DtCommandAssignmentWidget::selectedName ( ) const
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::selectFilter ( int  )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::selectFirstNonEmptyFilter ( )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::setOKEnabled ( bool  )
protectedvirtual

Sets whether or not the OK button is enabled.

Implements makVrf::DtCommandDialogExtensionInterface.

virtual void makVrf::DtCommandAssignmentWidget::setCancelEnabled ( bool  )
protectedvirtual

Sets whether or not the Cancel button is enabled.

Implements makVrf::DtCommandDialogExtensionInterface.

virtual bool makVrf::DtCommandAssignmentWidget::extensionValid ( ) const
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::initializeFromAction ( DtVrfTaskSetAction )
protectedvirtual

Called to initialize from the given action.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::commandActivated ( const DtSimTask ,
const std::vector< DtUUID > &  ,
bool  immediate 
)
protectedvirtual

If immediate is true, puts command assignment widget into pick mode before finishing command activated code.

Pick mode will create ok and cancel buttons. The ok and cancel buttons of this class will be NULL unless in pick mode

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::commandActivated ( const DtSimCommandObjectWrapper ,
bool  immediate 
)
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::slot_objectAboutToBeRemoved ( makVrv::DtSimObjectEntry )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::attachExtension ( const std::vector< makVrv::DtSimEntry * > &  data,
DtCommandDialogExtensionInterface ,
const DtSimStatement stmt = NULL 
)
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::detachExtension ( )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::setPickMode ( bool  )
protectedvirtual
virtual bool makVrf::DtCommandAssignmentWidget::editStatement ( const std::vector< makVrv::DtSimEntry * > &  ,
const DtSimStatement  
)
protectedvirtual

Edits the current statement. Return true if the statement can be edited.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual std::vector<DtVrfObjectListViewItem::DtVrfObjectState> makVrf::DtCommandAssignmentWidget::selectedObjects ( ) const
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::setAllowObjectSelection ( bool  b)
protectedvirtual

If false will hide broadcast and object selection.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual bool makVrf::DtCommandAssignmentWidget::canSelectObjects ( ) const
protectedvirtual
virtual bool makVrf::DtCommandAssignmentWidget::wantsSelectionOfObjectInCommandMode ( ) const
protectedvirtual

Override to return false if, when this task is used as part of a simulation command, it does not want to allow to choose an object to apply the command to.

Calls down to logic with method of same name

Implements makVrf::DtCommandDialogExtensionInterface.

virtual bool makVrf::DtCommandAssignmentWidget::valid ( ) const
protectedvirtual

Override to return whether or not extension is valid.

Implements makVrf::DtCommandDialogExtensionInterface.

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

Sets up the extension for the given entries.

Implements makVrf::DtCommandDialogExtensionInterface.

virtual void makVrf::DtCommandAssignmentWidget::unknownObjectSelected ( const DtUUID )
protectedvirtual

Sets up from an empty set.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::noObjectsSelected ( )
protectedvirtual

Called when no objects are selected.

Implements makVrf::DtCommandAssignmentWidgetInterface.

virtual void makVrf::DtCommandAssignmentWidget::onOK ( )
protectedvirtual
virtual void makVrf::DtCommandAssignmentWidget::hideButtons ( bool  )
inlineprotectedvirtual

If OK and Cancel buttons are present, hide them (or not)

Implements makVrf::DtCommandDialogExtensionInterface.

virtual void makVrf::DtCommandAssignmentWidget::onBroadcastChanged ( )
protectedvirtualslot

Calls down to logic to let it know the broadcast value has changed.

virtual void makVrf::DtCommandAssignmentWidget::onCancel ( )
protectedvirtualslot

Emits cancel signal and closes dialog.

virtual void makVrf::DtCommandAssignmentWidget::onPickOK ( )
protectedvirtualslot

Only used in pick mode.

const std::vector<makVrv::DtSimEntry*>& makVrf::DtCommandAssignmentWidget::connectedTo ( ) const
inlineprotectedslot

Member Data Documentation

makVrv::DtDe& makVrf::DtCommandAssignmentWidget::myDe
protected
DtCommandAssignmentWidgetLogic* makVrf::DtCommandAssignmentWidget::myLogic
protected
int makVrf::DtCommandAssignmentWidget::myPartOfPlan
protected
std::vector<makVrv::DtSimEntry*> makVrf::DtCommandAssignmentWidget::myConnectedTo
protected
DtSimTask* makVrf::DtCommandAssignmentWidget::myImmediateTask
protected
std::vector<DtUUID> makVrf::DtCommandAssignmentWidget::myImmediateNames
protected
DtSimCommandObjectWrapper* makVrf::DtCommandAssignmentWidget::myCommandObjectWrapper
protected
DtCommandDialogExtensionInterface* makVrf::DtCommandAssignmentWidget::myInitialExtension
protected
QString makVrf::DtCommandAssignmentWidget::myBroadcastTitle
protected
makVrv::DtSignalConnectionManager makVrf::DtCommandAssignmentWidget::myConnections
protected
DtCommandDialogExtensionInterface* makVrf::DtCommandAssignmentWidget::myExtension
QSplitter* makVrf::DtCommandAssignmentWidget::mySplitter
QWidget* makVrf::DtCommandAssignmentWidget::myOriginalExtensionParent
QCheckBox* makVrf::DtCommandAssignmentWidget::myBroadcast
QGroupBox* makVrf::DtCommandAssignmentWidget::myEntitySelectionGroupBox
DtVrfFilteredListView* makVrf::DtCommandAssignmentWidget::myEntitySelectionWidget
QHBoxLayout* makVrf::DtCommandAssignmentWidget::myMasterLayout
QVBoxLayout* makVrf::DtCommandAssignmentWidget::myWidgetLayout
QFrame* makVrf::DtCommandAssignmentWidget::mySeparator
QWidget* makVrf::DtCommandAssignmentWidget::myButtonFrame
QHBoxLayout* makVrf::DtCommandAssignmentWidget::myButtonLayout
QSpacerItem* makVrf::DtCommandAssignmentWidget::myButtonSpacer
QPushButton* makVrf::DtCommandAssignmentWidget::myOKButton
QPushButton* makVrf::DtCommandAssignmentWidget::myCancelButton

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)