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

This menu is added to the right click menu, the entites menu and the plan dialog in order to allow the tasking or setting of an embedded entity from the context of the host entity. More...

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

Public Member Functions

 DtEmbeddedEntitiesMenu (makVrv::DtDe &, const std::string &menuIdName=DtEmbeddedEntitiesMenuId)
 Connects DtEmbeddedEntitiesListRequestor::signal_InfoCacheUpdated to onAboutToShow().
virtual ~DtEmbeddedEntitiesMenu ()
 Destructor.
virtual QMenucreateMenu (makVrv::DtDe &, QWidget *parent)
 Creates a new QMenu and caches the pointer in myMenu.
virtual DtSubMenuConfigurationmenuConfiguration ()
 Returns theMenuConfiguration.
virtual
DtConfigurableMenuAssembler
menuAssembler ()
 Returns theMenuAssembler.
virtual void buildMenu ()
 Builds the submenus for each embedded entity and puts a DtEmbeddedEntityTaskMenu and DtEmbeddedEntitySetMenu under each one.
virtual void clearMenu ()
 Calls clear() on myMenu.
virtual void setPlanEntitySet (const makVrv::DtSelectionManager::IdSet &set)
 Called by DtEditEntityPlanWidget::setupMenuForPlanDialog to setup the source for the embedded entities.
virtual DtEmbeddedEntitiesMenunewInstance ()
 Creates a DtEmbeddedEntitiesMenu and returns the pointer.
virtual void slot_planTaskCreated (const DtSimTask &task)
 Connected to the signal_planTaskCreated of each of the DtEmbeddedEntityVrfSetMenu and DtEmbeddedEntityVrfTaskMenu instances.
partofPlanDialog

This integer is based on DtVrfTaskSetMenu::partOfPlanDialog and is used by buildMenu().

virtual void setPartOfPlanDialog (int partOfPlanDialog)
virtual int partOfPlanDialog ()
- Public Member Functions inherited from makVrf::DtConfigurableMenu
 DtConfigurableMenu (makVrv::DtDe &, const std::string &className)
 CTOR.
virtual ~DtConfigurableMenu ()
 DTOR.
virtual void registerMenu (makVrv::DtMenu *customMenu)
 Use to register your own complex menu object.
virtual void registerMenuItem (makVrv::DtMenuItem *customMenuItem)
 Use to register your own complex menu item object.
virtual void createSimpleMenu (std::string menuText, makVrv::DtMenuPath menuIdPath, int weight=-1)
virtual void createSimpleMenuAfter (std::string menuText, makVrv::DtMenuPath menuIdPath, makVrv::DtMenuPath afterIdPath)
virtual void createSimpleMenuBefore (std::string menuText, makVrv::DtMenuPath menuIdPath, makVrv::DtMenuPath beforeIdPath)
virtual void createSimpleMenuItem (std::string itemText, makVrv::DtMenuPath itemIdPath, DtSimpleMenuItemAction *action, void *usr=NULL, int weight=-1)
virtual void createSimpleMenuItemAfter (std::string itemText, makVrv::DtMenuPath itemIdPath, makVrv::DtMenuPath afterIdPath, DtSimpleMenuItemAction *action, void *usr=NULL)
virtual void createSimpleMenuItemBefore (std::string itemText, makVrv::DtMenuPath itemIdPath, makVrv::DtMenuPath beforeIdPath, DtSimpleMenuItemAction *action, void *usr=NULL)
virtual void mergeMenu (makVrv::DtQtMenuAssembler &assembler, makVrv::DtMenuConfiguration &configuration)
 Merges in the assembler and configuration into the supplied assembler and configuration.
virtual void mergeMenu (makVrv::DtQtMenuAssembler &assembler)
 Merges in the assembler into the supplied assembler.
virtual void mergeMenu (makVrv::DtMenuConfiguration &configuration)
 Merges in the configuration into the supplied configuration. This merges all the menu paths together.
- Public Member Functions inherited from makVrv::DtMenu
 DtMenu (DtDe &de, const std::string &menuIdName)
 CTOR.
virtual ~DtMenu ()
 DTOR.
virtual const std::string & menuIdName () const
 Get the menu id name, the menu id name is not the same thing as the visible menu text.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtEmbeddedEntitiesMenuinstance (makVrv::DtDe &)
 Finds the instance of DtEmbeddedEntitiesMenuId registered with the DtDe and allocates it if it isn't found.
static DtEmbeddedEntitiesMenumenuInstance (makVrv::DtDe &)
 Return a new copy, not the registered copy.

Public Attributes

boost::signal< void(std::vector
< std::string > names, const
DtSimTask &)> 
signal_planTaskCreated
 Connected to DtEditEntityPlanWidget::slot_addTaskRequest by DtEditEntityPlanWidget::setupMenuForPlanDialog to add the DtEmbeddedTaskForwardTask or DtEmbeddedSetForwardTask to the plan.
- Public Attributes inherited from makVrf::DtConfigurableMenu
boost::signal< void(QAction *)> signal_validateMenuItem

Protected Slots

virtual void onAboutToShow ()
 Checks that the object for which the menu is currently based on is the object currently in context.

Protected Member Functions

virtual void slot_onInfoCacheUpdated (const DtObjectType &updatedType)
 Disconnects itself from the requestor's signal and calls clearMenu() and buildMenu() if the updated type is the one in context.
virtual void resolveContext (DtObjectType &objType, std::string &objName, bool &isHomogeneous)
 Gets the currently selected object type and name, and (assuming a multiple-object context) whether or not all object types are homogeneous.
- Protected Member Functions inherited from makVrf::DtConfigurableMenu
virtual void initMenuItems (makVrv::DtDe &de)
DtConfigurableMenuAssemblerassembler ()
DtSubMenuConfigurationconfiguration ()
virtual void createMenuConfiguration (makVrv::DtDe &)
 Creates the menu configuration by creating the assembler and adding menu items.

Protected Attributes

DtObjectType myHostObjectType
 Name & type of the object that was in context when the menu is created, along with any other context data relevant from the last time the menu was built.
std::string myHostName
int myHostPlanPart
bool myHostContextIsHomogeneous
QMenumyMenu
int myPartOfPlanDialog
makVrv::DtSelectionManager::IdSet myPlanEntitySet
- Protected Attributes inherited from makVrf::DtConfigurableMenu
DtConfigurableMenuAssembler myAssembler
DtSubMenuConfiguration myConfiguration
bool myInitialized
- Protected Attributes inherited from makVrv::DtMenu
DtDemyDe
std::string myMenuIdName

Static Protected Attributes

static
DtConfigurableMenuAssembler
theMenuAssembler
static DtSubMenuConfigurationtheMenuConfiguration

Detailed Description

This menu is added to the right click menu, the entites menu and the plan dialog in order to allow the tasking or setting of an embedded entity from the context of the host entity.

Constructor & Destructor Documentation

makVrf::DtEmbeddedEntitiesMenu::DtEmbeddedEntitiesMenu ( makVrv::DtDe ,
const std::string &  menuIdName = DtEmbeddedEntitiesMenuId 
)
virtual makVrf::DtEmbeddedEntitiesMenu::~DtEmbeddedEntitiesMenu ( )
virtual

Destructor.

Member Function Documentation

virtual QMenu* makVrf::DtEmbeddedEntitiesMenu::createMenu ( makVrv::DtDe ,
QWidget parent 
)
virtual

Creates a new QMenu and caches the pointer in myMenu.

Connects the aboutToShow() signal from the QMenu to the aboutToShow() function in this class.

Returns
The menu that was created

Implements makVrv::DtMenu.

Reimplemented in makVrf::DtRightClickEmbeddedEntitiesMenu.

virtual DtSubMenuConfiguration& makVrf::DtEmbeddedEntitiesMenu::menuConfiguration ( )
virtual

Returns theMenuConfiguration.

If it is null when this is called a new DtSubMenuConfiguration is allocated and assigned to theMenuConfiguration.

Reimplemented from makVrf::DtConfigurableMenu.

virtual DtConfigurableMenuAssembler& makVrf::DtEmbeddedEntitiesMenu::menuAssembler ( )
virtual

Returns theMenuAssembler.

If it is null when this is called a new DtConfigurableMenuAssembler is allocated and assigned to theMenuAssembler.

Reimplemented from makVrf::DtConfigurableMenu.

virtual void makVrf::DtEmbeddedEntitiesMenu::buildMenu ( )
virtual

Builds the submenus for each embedded entity and puts a DtEmbeddedEntityTaskMenu and DtEmbeddedEntitySetMenu under each one.

The DtEmbeddedEntitiesListRequestor is used to look up the embedded entities. If partOfPlanDialog() returns 1, myPlanEntitySet is used as the source and otherwise the currently selected entity is the source. When the submenus are created, their signal_planTaskCreated is connected to slot_planTaskCreated. Note that regardless of whether a task or set is selected, they both generate a task - either a DtEmbeddedTaskForwardTask or an DtEmbeddedSetForwardTask.

virtual void makVrf::DtEmbeddedEntitiesMenu::clearMenu ( )
virtual

Calls clear() on myMenu.

Goes through the DtSubMenuConfiguration and finds each path DtConfigurableMenuAssembler and deletes each menu. Finally, calls setDeleteReferences(true) and cleanup() on the assembler.

virtual void makVrf::DtEmbeddedEntitiesMenu::setPartOfPlanDialog ( int  partOfPlanDialog)
virtual
virtual int makVrf::DtEmbeddedEntitiesMenu::partOfPlanDialog ( )
virtual
virtual void makVrf::DtEmbeddedEntitiesMenu::setPlanEntitySet ( const makVrv::DtSelectionManager::IdSet set)
virtual

Called by DtEditEntityPlanWidget::setupMenuForPlanDialog to setup the source for the embedded entities.

static DtEmbeddedEntitiesMenu& makVrf::DtEmbeddedEntitiesMenu::instance ( makVrv::DtDe )
static

Finds the instance of DtEmbeddedEntitiesMenuId registered with the DtDe and allocates it if it isn't found.

static DtEmbeddedEntitiesMenu* makVrf::DtEmbeddedEntitiesMenu::menuInstance ( makVrv::DtDe )
static

Return a new copy, not the registered copy.

It will do this by calling the newInstance method on the currently registered version. newInstance needs to be overridden by subclasses to return their own new instance

virtual DtEmbeddedEntitiesMenu* makVrf::DtEmbeddedEntitiesMenu::newInstance ( )
virtual

Creates a DtEmbeddedEntitiesMenu and returns the pointer.

virtual void makVrf::DtEmbeddedEntitiesMenu::slot_planTaskCreated ( const DtSimTask task)
virtual

Connected to the signal_planTaskCreated of each of the DtEmbeddedEntityVrfSetMenu and DtEmbeddedEntityVrfTaskMenu instances.

virtual void makVrf::DtEmbeddedEntitiesMenu::slot_onInfoCacheUpdated ( const DtObjectType &  updatedType)
protectedvirtual

Disconnects itself from the requestor's signal and calls clearMenu() and buildMenu() if the updated type is the one in context.

virtual void makVrf::DtEmbeddedEntitiesMenu::resolveContext ( DtObjectType &  objType,
std::string &  objName,
bool isHomogeneous 
)
protectedvirtual

Gets the currently selected object type and name, and (assuming a multiple-object context) whether or not all object types are homogeneous.

virtual void makVrf::DtEmbeddedEntitiesMenu::onAboutToShow ( )
protectedvirtualslot

Checks that the object for which the menu is currently based on is the object currently in context.

If not, rebuilds the menu.

Member Data Documentation

boost::signal<void (std::vector<std::string> names, const DtSimTask&)> makVrf::DtEmbeddedEntitiesMenu::signal_planTaskCreated
DtConfigurableMenuAssembler* makVrf::DtEmbeddedEntitiesMenu::theMenuAssembler
staticprotected
DtSubMenuConfiguration* makVrf::DtEmbeddedEntitiesMenu::theMenuConfiguration
staticprotected
DtObjectType makVrf::DtEmbeddedEntitiesMenu::myHostObjectType
protected

Name & type of the object that was in context when the menu is created, along with any other context data relevant from the last time the menu was built.

std::string makVrf::DtEmbeddedEntitiesMenu::myHostName
protected
int makVrf::DtEmbeddedEntitiesMenu::myHostPlanPart
protected
bool makVrf::DtEmbeddedEntitiesMenu::myHostContextIsHomogeneous
protected
QMenu* makVrf::DtEmbeddedEntitiesMenu::myMenu
protected
int makVrf::DtEmbeddedEntitiesMenu::myPartOfPlanDialog
protected
makVrv::DtSelectionManager::IdSet makVrf::DtEmbeddedEntitiesMenu::myPlanEntitySet
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)