VR-Forces 4.1 Class Documentation
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes
makVrf::DtVrfCreateMenu Class Reference
Inheritance diagram for makVrf::DtVrfCreateMenu:
Inheritance graph
[legend]

Public Types

typedef std::map< std::string,
QAction * > 
MappedActions

Public Member Functions

 DtVrfCreateMenu (makVrv::DtDe &, const QString &name, QWidget *parent=0, makVrf::DtMenu *baseCreateMenu=0)
virtual ~DtVrfCreateMenu ()
virtual void setupMenu (makVrf::DtMenu *, const makVrv::DtMenuConfiguration &initialCreateMenuConfiguration=makVrv::DtMenuConfiguration())
 Call to set up menu based upon the given menu structure.
virtual void setMenuBuilder (DtCreateMenu *)
 Manages connections on behalf of the specified create menu.
virtual bool signalCreation () const
virtual void slot_createObject (const DtEntityType &, std::string, int, const std::vector< DtVector > &, double, bool, bool)
virtual void slot_creationStopped ()
 Called when creation has stopped. Disconnect signals.
virtual DtEntityType nameToType (const QString &) const
 Given a name of a menu item (e.g. M1A2) return the entity type that represents that.
virtual bool triggerAction (const DtEntityMapperKey &key)
 Given an entity key, trigger that action to create it. Return true if action is found.
virtual const MappedActionsmappedActions () const

Public Attributes

boost::signal< void(const
DtEntityType &, std::string,
int, const std::vector
< DtVector > &, double, bool,
bool)> 
signal_createObject
 Signal sent when creation manager signals that an item has been created.

Protected Types

typedef std::pair
< DtCreateObjectAction
*, QAction * > 
ObjectActionData
typedef std::map< std::string,
ObjectActionData
TempObjectActions

Protected Slots

virtual void onCreateObjectFromMenu (const DtEntityMapperKey &, int, const std::string &)
virtual void enableMenu ()
 Enables/disables menu based on currently selected back-end status.

Protected Member Functions

virtual void setupConnections ()
virtual void buildCreationMenu (const DtList &list, DtConfigurableMenuAssembler &assemblers, DtSubMenuConfiguration &configurations, const makVrv::DtMenuPath &rootr)
virtual void addAdditionalItems (DtConfigurableMenuAssembler &assemblers, DtSubMenuConfiguration &configurations)
 Add additional items from the create menu.
virtual void clearMenu ()
virtual void enableActions (const QList< QAction * > &)
 Enables actions that are leaf actions (those that create items)
virtual void destroyActions (const QList< QAction * > &)
 Iterates over and destroys all the actions (clearing the menu)
virtual bool canCreate (QAction *) const
virtual void slot_createMenuLoaded (const DtScenarioExplorer &)
 Removes menu items added from previous menu then recreates based on new model set.
virtual void recreateMenu ()
 Recreate the menu from internal structures.
virtual void slot_backendUpdated (const DtVrfBackendState &, int)
virtual void mergeChangesFrom (const DtSubMenuConfiguration &, DtSubMenuConfiguration &)
 Merges the changes from the source into the configuration.
virtual std::string cleanEntry (const std::string &) const
 Cleans up menu entry to remove special menu characters.
virtual DtCreateObjectActioncreateObjectActionFor (const std::string &menuId, const QString &menuName, const DtEntityMapperKey &key, const std::string &keywords, const std::string &menuIcon, const std::string &toolTip) const
 Given the entity mapper key, create the object creation menu item. If no item registered, use default of DtCreateObjectAction.
virtual void addMappedActionsFrom (QMenu *)
virtual bool updateSubMenuVisibilityState (QMenu *)
 Hides all menus that have no visible children.

Protected Attributes

makVrv::DtDemyDe
QMenumyCreateMenu
DtConfigurableMenuAssembler myMenuAssembler
makVrv::DtSignalConnectionManager myConnectionManager
DtCreateMenumyBuilder
bool myCreating
MappedActions myMappedActions
bool myRemovePaletteItems
TempObjectActions myTempObjectActions
makVrf::DtMenumyBaseCreateMenu

Member Typedef Documentation

typedef std::map<std::string, QAction*> makVrf::DtVrfCreateMenu::MappedActions
typedef std::map<std::string, ObjectActionData> makVrf::DtVrfCreateMenu::TempObjectActions
protected

Constructor & Destructor Documentation

makVrf::DtVrfCreateMenu::DtVrfCreateMenu ( makVrv::DtDe ,
const QString &  name,
QWidget parent = 0,
makVrf::DtMenu baseCreateMenu = 0 
)
virtual makVrf::DtVrfCreateMenu::~DtVrfCreateMenu ( )
virtual

Member Function Documentation

virtual void makVrf::DtVrfCreateMenu::setupMenu ( makVrf::DtMenu ,
const makVrv::DtMenuConfiguration initialCreateMenuConfiguration = makVrv::DtMenuConfiguration() 
)
virtual

Call to set up menu based upon the given menu structure.

If initialCreateMenuConfiguration is specified, used as the default build menu. Good for ordering higher level groups (Aggregates, Ground, etc.)

virtual void makVrf::DtVrfCreateMenu::setMenuBuilder ( DtCreateMenu )
virtual

Manages connections on behalf of the specified create menu.

Will call methods in the parent create menu as need be. Also sets member variable to the parent create menu builder

virtual bool makVrf::DtVrfCreateMenu::signalCreation ( ) const
virtual
virtual void makVrf::DtVrfCreateMenu::slot_createObject ( const DtEntityType &  ,
std::string  ,
int  ,
const std::vector< DtVector > &  ,
double  ,
bool  ,
bool   
)
virtual
virtual void makVrf::DtVrfCreateMenu::slot_creationStopped ( )
virtual

Called when creation has stopped. Disconnect signals.

virtual DtEntityType makVrf::DtVrfCreateMenu::nameToType ( const QString &  ) const
virtual

Given a name of a menu item (e.g. M1A2) return the entity type that represents that.

virtual bool makVrf::DtVrfCreateMenu::triggerAction ( const DtEntityMapperKey key)
virtual

Given an entity key, trigger that action to create it. Return true if action is found.

virtual const MappedActions& makVrf::DtVrfCreateMenu::mappedActions ( ) const
virtual
virtual void makVrf::DtVrfCreateMenu::setupConnections ( )
protectedvirtual
virtual void makVrf::DtVrfCreateMenu::buildCreationMenu ( const DtList &  list,
DtConfigurableMenuAssembler assemblers,
DtSubMenuConfiguration configurations,
const makVrv::DtMenuPath rootr 
)
protectedvirtual
virtual void makVrf::DtVrfCreateMenu::addAdditionalItems ( DtConfigurableMenuAssembler assemblers,
DtSubMenuConfiguration configurations 
)
protectedvirtual

Add additional items from the create menu.

virtual void makVrf::DtVrfCreateMenu::clearMenu ( )
protectedvirtual
virtual void makVrf::DtVrfCreateMenu::enableActions ( const QList< QAction * > &  )
protectedvirtual

Enables actions that are leaf actions (those that create items)

virtual void makVrf::DtVrfCreateMenu::destroyActions ( const QList< QAction * > &  )
protectedvirtual

Iterates over and destroys all the actions (clearing the menu)

virtual bool makVrf::DtVrfCreateMenu::canCreate ( QAction ) const
protectedvirtual
virtual void makVrf::DtVrfCreateMenu::slot_createMenuLoaded ( const DtScenarioExplorer )
protectedvirtual

Removes menu items added from previous menu then recreates based on new model set.

virtual void makVrf::DtVrfCreateMenu::recreateMenu ( )
protectedvirtual

Recreate the menu from internal structures.

virtual void makVrf::DtVrfCreateMenu::slot_backendUpdated ( const DtVrfBackendState ,
int   
)
protectedvirtual
virtual void makVrf::DtVrfCreateMenu::mergeChangesFrom ( const DtSubMenuConfiguration ,
DtSubMenuConfiguration  
)
protectedvirtual

Merges the changes from the source into the configuration.

Will need to expand paths to be what create menu is expecting.

virtual std::string makVrf::DtVrfCreateMenu::cleanEntry ( const std::string &  ) const
protectedvirtual

Cleans up menu entry to remove special menu characters.

virtual DtCreateObjectAction* makVrf::DtVrfCreateMenu::createObjectActionFor ( const std::string &  menuId,
const QString &  menuName,
const DtEntityMapperKey key,
const std::string &  keywords,
const std::string &  menuIcon,
const std::string &  toolTip 
) const
protectedvirtual

Given the entity mapper key, create the object creation menu item. If no item registered, use default of DtCreateObjectAction.

virtual void makVrf::DtVrfCreateMenu::addMappedActionsFrom ( QMenu )
protectedvirtual
virtual bool makVrf::DtVrfCreateMenu::updateSubMenuVisibilityState ( QMenu )
protectedvirtual

Hides all menus that have no visible children.

virtual void makVrf::DtVrfCreateMenu::onCreateObjectFromMenu ( const DtEntityMapperKey ,
int  ,
const std::string &   
)
protectedvirtualslot
virtual void makVrf::DtVrfCreateMenu::enableMenu ( )
protectedvirtualslot

Enables/disables menu based on currently selected back-end status.

Member Data Documentation

boost::signal<void (const DtEntityType&, std::string, int, const std::vector<DtVector>&,double, bool, bool )> makVrf::DtVrfCreateMenu::signal_createObject

Signal sent when creation manager signals that an item has been created.

Only emits this signal if this menu issued the create message

makVrv::DtDe& makVrf::DtVrfCreateMenu::myDe
protected
QMenu* makVrf::DtVrfCreateMenu::myCreateMenu
protected
DtConfigurableMenuAssembler makVrf::DtVrfCreateMenu::myMenuAssembler
protected
makVrv::DtSignalConnectionManager makVrf::DtVrfCreateMenu::myConnectionManager
protected
DtCreateMenu* makVrf::DtVrfCreateMenu::myBuilder
protected
bool makVrf::DtVrfCreateMenu::myCreating
protected
MappedActions makVrf::DtVrfCreateMenu::myMappedActions
protected
bool makVrf::DtVrfCreateMenu::myRemovePaletteItems
protected
TempObjectActions makVrf::DtVrfCreateMenu::myTempObjectActions
protected
makVrf::DtMenu* makVrf::DtVrfCreateMenu::myBaseCreateMenu
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)