![]() |
VR-Forces 4.0.4 Class Documentation
|

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 QMenu * | createMenu (makVrv::DtDe &, QWidget *parent) |
| Build a menu. | |
| virtual DtCreateMenu * | newInstance () |
| virtual DtCreateMenu * | clone () const |
| Returns a duplicate of this menu. | |
| virtual DtCreateMenu * | duplicate (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 AdditionalItems & | additionalItems () const |
| Returns items that are scheduled to be added to new create menus. | |
| AdditionalItems & | additionalItems () |
| 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 DtSubMenuConfiguration & | menuConfiguration () |
| 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 DtCreateMenu & | instance (makVrv::DtDe &) |
| static DtCreateMenu * | menuInstance (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 DtSubMenuConfiguration * | theMenuConfiguration |
| typedef std::vector<AdditionalItem> makVrf::DtCreateMenu::AdditionalItems |
| typedef DtOrderedEntityTypeList<DtCreateObjectActionCreator*> makVrf::DtCreateMenu::ObjectActionCreators |
| makVrf::DtCreateMenu::DtCreateMenu | ( | makVrv::DtDe & | , |
| const QString & | createName = DtCreateMenuId |
||
| ) |
CTOR.
| virtual makVrf::DtCreateMenu::~DtCreateMenu | ( | ) | [virtual] |
DTOR.
| virtual QMenu* makVrf::DtCreateMenu::createMenu | ( | makVrv::DtDe & | , |
| QWidget * | parent | ||
| ) | [virtual] |
| static DtCreateMenu& makVrf::DtCreateMenu::instance | ( | makVrv::DtDe & | ) | [static] |
| static DtCreateMenu* makVrf::DtCreateMenu::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 DtCreateMenu* makVrf::DtCreateMenu::newInstance | ( | ) | [virtual] |
| 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] |
| void makVrf::DtCreateMenu::setTearOffsEnabled | ( | bool | b | ) | [inline] |
| 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.
| bool makVrf::DtCreateMenu::tearOffsEnabled | ( | ) | const [inline] |
| 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.
| bool makVrf::DtCreateMenu::signalCreation | ( | ) | const [inline] |
| const AdditionalItems& makVrf::DtCreateMenu::additionalItems | ( | ) | const [inline] |
Returns items that are scheduled to be added to new create menus.
| AdditionalItems& makVrf::DtCreateMenu::additionalItems | ( | ) | [inline] |
| 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.
| const DtVrfCreateMenu::MappedActions& makVrf::DtCreateMenu::mappedActions | ( | ) | const |
| virtual void makVrf::DtCreateMenu::createMenuConfiguration | ( | makVrv::DtDe & | de | ) | [protected, virtual] |
Called to initially create the menu configuration.
Implements makVrf::DtConfigurableMenu.
| virtual DtSubMenuConfiguration& makVrf::DtCreateMenu::menuConfiguration | ( | ) | [virtual] |
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.
| virtual DtConfigurableMenuAssembler& makVrf::DtCreateMenu::menuAssembler | ( | ) | [virtual] |
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] |
| boost::signal<void (const DtEntityType&, std::string, int, const std::vector<DtVector>&)> makVrf::DtCreateMenu::signal_createObject |
bool makVrf::DtCreateMenu::myTearOffsEnabled [protected] |
bool makVrf::DtCreateMenu::mySignalCreation [protected] |
DtConfigurableMenuAssembler* makVrf::DtCreateMenu::theMenuAssembler [static, protected] |
Variables used to store initial menu configuration.
DtSubMenuConfiguration* makVrf::DtCreateMenu::theMenuConfiguration [static, protected] |