VR-Forces 4.0.4 Class Documentation
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrf::DtCreateMenu Class Reference
Inheritance diagram for makVrf::DtCreateMenu:
Inheritance graph
[legend]

List of all members.

Classes

struct  AdditionalItem

Public Types

typedef std::vector
< AdditionalItem
AdditionalItems
typedef
DtOrderedEntityTypeList
< DtCreateObjectActionCreator * > 
ObjectActionCreators

Public Member Functions

 DtCreateMenu (makVrv::DtDe &, const QString &createName=DtCreateMenuId)
 CTOR.
virtual ~DtCreateMenu ()
 DTOR.
virtual QMenucreateMenu (makVrv::DtDe &, QWidget *parent)
 Build a menu.
virtual DtCreateMenunewInstance ()
virtual DtCreateMenuclone () const
 Returns a duplicate of this menu.
virtual DtCreateMenuduplicate (QMenu *&, QWidget *parent)
void setTearOffsEnabled (bool b)
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.
bool tearOffsEnabled () const
virtual void setSignalCreation (bool)
 Set to true to signal creation rather than creating immediately. Will send boost signal_createObject signal if true.
bool signalCreation () const
const AdditionalItemsadditionalItems () const
 Returns items that are scheduled to be added to new create menus.
AdditionalItemsadditionalItems ()
virtual void setCreateObjectActionCreatorFor (const DtEntityType &, DtCreateObjectActionCreator *)
 Add/replace the object action creator for the specified entity mapper key.
virtual
DtCreateObjectActionCreator
createObjectActionCreatorFor (const DtEntityType &) const
 Return the object action creator for the specified type.
const
DtVrfCreateMenu::MappedActions
mappedActions () const
virtual DtSubMenuConfigurationmenuConfiguration ()
 Returns the configuration for the menu to be used in the master mode.
virtual
DtConfigurableMenuAssembler
menuAssembler ()
 Returns the configuration for the menu to be used in the master mode. May be effected directly.
virtual void addItemToCreate (const makVrv::DtMenuPath &path, const DtEntityMapperKey &key)
 Routines to add items to the menu to create.
virtual void removeItemToCreate (const makVrv::DtMenuPath &)
 Call to remove an additional item to create.
virtual void addItemToCreateBefore (const makVrv::DtMenuPath &path, const makVrv::DtMenuPath &before, const DtEntityMapperKey &key)
 Same as above, except adds before specified path.
virtual void addItemToCreateAfter (const makVrv::DtMenuPath &path, const makVrv::DtMenuPath &after, const DtEntityMapperKey &key)
 Same as above, except adds after specified path.

Static Public Member Functions

static DtCreateMenuinstance (makVrv::DtDe &)
static DtCreateMenumenuInstance (makVrv::DtDe &)
 Return a new copy, not the registered copy.

Public Attributes

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

Protected Member Functions

virtual void createMenuConfiguration (makVrv::DtDe &de)
 Called to initially create the menu configuration.
virtual void slot_onCreateObject (const DtEntityType &, std::string, int, const std::vector< DtVector > &)

Protected Attributes

bool myTearOffsEnabled
AdditionalItems myAdditionalItems
bool mySignalCreation
ObjectActionCreators myObjectActionCreators

Static Protected Attributes

static
DtConfigurableMenuAssembler
theMenuAssembler
 Variables used to store initial menu configuration.
static DtSubMenuConfigurationtheMenuConfiguration

Member Typedef Documentation


Constructor & Destructor Documentation

makVrf::DtCreateMenu::DtCreateMenu ( makVrv::DtDe ,
const QString &  createName = DtCreateMenuId 
)

CTOR.

virtual makVrf::DtCreateMenu::~DtCreateMenu ( ) [virtual]

DTOR.


Member Function Documentation

virtual QMenu* makVrf::DtCreateMenu::createMenu ( makVrv::DtDe ,
QWidget parent 
) [virtual]

Build a menu.

Implements makVrv::DtMenu.

Reimplemented in makVrf::DtRightClickCreateMenu.

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 DtCreateMenu* makVrf::DtCreateMenu::clone ( ) const [virtual]

Returns a duplicate of this menu.

If you are subclassing this menu, override the clone() method to return a new instance of your subclass

virtual DtCreateMenu* makVrf::DtCreateMenu::duplicate ( QMenu *&  ,
QWidget parent 
) [virtual]
virtual DtEntityType makVrf::DtCreateMenu::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::DtCreateMenu::triggerAction ( const DtEntityMapperKey key) [virtual]

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

virtual void makVrf::DtCreateMenu::setSignalCreation ( bool  ) [virtual]

Set to true to signal creation rather than creating immediately. Will send boost signal_createObject signal if true.

Returns items that are scheduled to be added to new create menus.

virtual void makVrf::DtCreateMenu::setCreateObjectActionCreatorFor ( const DtEntityType &  ,
DtCreateObjectActionCreator  
) [virtual]

Add/replace the object action creator for the specified entity mapper key.

virtual DtCreateObjectActionCreator* makVrf::DtCreateMenu::createObjectActionCreatorFor ( const DtEntityType &  ) const [virtual]

Return the object action creator for the specified type.

virtual void makVrf::DtCreateMenu::createMenuConfiguration ( makVrv::DtDe de) [protected, virtual]

Called to initially create the menu configuration.

Implements makVrf::DtConfigurableMenu.

Returns the configuration for the menu to be used in the master mode.

May be effected directly

When using theis configuration, it is used a bit differently than other configuration due to the nature of the create menu itself

When referencing the main menu, referece CreateMenu as the main menu (makVrv::DtMenuPath::mainMenu("CreateMenu")) Sub-menus and items are referenecd by their name as they appear in the entity.mst file (Friendly, Opposing, M1A2, etc).

Implements makVrf::DtConfigurableMenu.

Returns the configuration for the menu to be used in the master mode. May be effected directly.

Implements makVrf::DtConfigurableMenu.

virtual void makVrf::DtCreateMenu::addItemToCreate ( const makVrv::DtMenuPath path,
const DtEntityMapperKey key 
) [virtual]

Routines to add items to the menu to create.

Shortcut for adding a menu item creator of type DtCreateObjectAction and a menu item to the path

virtual void makVrf::DtCreateMenu::removeItemToCreate ( const makVrv::DtMenuPath ) [virtual]

Call to remove an additional item to create.

virtual void makVrf::DtCreateMenu::addItemToCreateBefore ( const makVrv::DtMenuPath path,
const makVrv::DtMenuPath before,
const DtEntityMapperKey key 
) [virtual]

Same as above, except adds before specified path.

virtual void makVrf::DtCreateMenu::addItemToCreateAfter ( const makVrv::DtMenuPath path,
const makVrv::DtMenuPath after,
const DtEntityMapperKey key 
) [virtual]

Same as above, except adds after specified path.

virtual void makVrf::DtCreateMenu::slot_onCreateObject ( const DtEntityType &  ,
std::string  ,
int  ,
const std::vector< DtVector > &   
) [protected, virtual]

Member Data Documentation

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

Variables used to store initial menu configuration.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)