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

Public Slots | |
| virtual void | validateMenuItems () |
| slots | |
Signals | |
| void | validate () |
| signals | |
| void | menuRecreated (DtMainMenuType) |
| Emitted when a menu is recreated via the recreateMenu method. | |
Public Member Functions | |
| DtMenuWidget (QWidget *parent=NULL) | |
| virtual | ~DtMenuWidget () |
| virtual bool | init (DtFeatureActionManager *) |
| virtual bool | createMenuSystem () |
| virtual DtMenuItemType | typeFromAction (QAction *action) |
| Asks all the menus to see if this QAction is part of their popup system, and, if so, returns the type assocated with it. | |
| virtual DtPopupMenu * | menuFromAction (QAction *) |
| Returns the menu that has the particular action. | |
| virtual QAction * | menuItemForType (DtMenuItemType iType) |
| Asks all the menus if they have a menu item of this type, and, if so, return it. | |
| virtual DtPopupMenu * | menuForType (DtMainMenuType iType) |
| Returns the menu that is of the particular type. | |
| virtual DtPopupMenu * | menuThatHasMenuType (DtMenuItemType iType) |
| Returns the menu that contains the particular menu item. | |
| virtual DtPopupMenu * | menuThatHasActionGroupType (DtMenuItemType iType) |
| Returns the menu that contains the particular action group for the menu item supplied. | |
| virtual DtPopupMenu * | createMenuOfType (DtMainMenuType iType, QWidget *owner) |
| Creates and returns a menu of the specific type without adding it to internal structures. | |
| virtual DtPopupMenu * | initializeMenuOfType (DtMainMenuType iType, QWidget *owner) |
| Creates a new menu object and initializes it with menu items. | |
| virtual bool | createMenu (DtPopupMenu *newMenu) |
| Applies any global removes of menu items and creates the menu items for the menu. | |
| virtual void | updateMenuItems () |
| Cycles through all popup menus, telling them to update as need be. | |
| virtual DtPopupMenu * | menuWithName (const QString &) |
| Returns a menu that has the given menu name. | |
| virtual DtMenuItemType | uniqueId () const |
| Returns a unique id amongst all menus. | |
| virtual DtMainMenuType | uniqueMenuId () const |
| Returns an id (max + 1) for a menu. | |
| virtual DtMainMenuType | insertItem (DtPopupMenu *menu, int index=-1) |
| Inserts the precreated menu (assigning it a new unique id) into internal structures. | |
| virtual QAction * | addMenuItem (const QString &featureName, const QString &item, const QString &addToMenu, DtMenuItemType &retId, bool toggle=false, QObject *actionReceiver=NULL, const char *action=NULL, QObject *validationReceiver=NULL, const char *validation=NULL, const QString &tooltip=QString::null, const QString &accelerator=QString::null, bool addSep=false) |
| Adds a new menu item given the menu item, path to add, action and validator. | |
| virtual void | appendMenuValidator (const QString &menuName, const QString &itemName, QObject *validatorReceiver, char *validator) |
| Adds the specified validator to a list of validators that can be called for the menu item. | |
| virtual bool | removeMenuItem (const QString &item) |
| Removes the menu item specified by the menu path (i.e. | |
| virtual bool | removeMenuGroup (const QString &group) |
| Removes all menu items from the specified group and the group itself specified by the menu path (i.e. | |
| virtual void | recreateMenu (DtMainMenuType menu, bool useBaseMenuIfExists=true) |
| Deletes current and creates a new menu of the specified type in the same spot that the menu was defined to be in. | |
| DtFeatureActionManager * | featureActionManager () const |
| Accessors for featureActionManager. | |
| void | setFeatureActionManager (DtFeatureActionManager *) |
| virtual DtPopupMenu * | menuAt (int iPos) |
| Returns the menu at the specified position. | |
| virtual QString | menuTextForAction (QAction *) |
| Returns text for the menu (or sub-menu) that contains the action. | |
| virtual int | insertPopupMenu (DtMainMenuType iType, DtPopupMenuCreatorFcn fcn, DtMainMenuType iPos=DtNoMenu) |
| Use this function add popup menus that will be created during the "create" call. | |
| virtual int | replacePopupMenu (DtMainMenuType iType, DtPopupMenuCreatorFcn with) |
| Replaces either the menu scheduled for creation or removes the current menu at given position and replaces it with the supplied menu. | |
| virtual bool | removePopupMenu (DtMainMenuType iType, bool permenant=true) |
| Removes a popup menu from either the internal create list (if the menu has not been created yet) or from the current menu bar (if it has been created). | |
| virtual DtPopupMenu * | restoreMenu (DtMainMenuType type) |
| Creates the popup menu (if it does not currently exist) and inserts it at the position that it exists in the ordered creator list. | |
| virtual void | removeMenuAtPosition (int iPos, bool freeMemory=false) |
| Removes the menu item at the specified poitions. | |
| virtual QHash< DtMainMenuType, DtPopupMenu * > & | popupMenus () |
| Returns the popup menu objects list. | |
| virtual void | swapMenus (DtMainMenuType iA, DtMainMenuType iB) |
| Swaps menu A with menu B (positionally). If created also swaps live. | |
Static Public Member Functions | |
| static void | globalInsertPopupMenu (DtMainMenuType iType, DtPopupMenuCreatorFcn fcn, DtMainMenuType iAfterType=DtNoMenu) |
| Use these function to effect all menus created in the system. | |
| static void | globalReplacePopupMenu (DtMainMenuType iType, DtPopupMenuCreatorFcn with) |
| Replaces the menu with the supplied creator with the new menu creator. | |
| static void | globalRemovePopupMenu (DtMainMenuType iType) |
| Do not create the menu at this slot when creating menus. | |
| static void | globalSwapMenuPositions (DtMainMenuType iA, DtMainMenuType iB) |
| Will swap the positions of menu item A with B. | |
| static void | globalCreateOnlyItemsForMenu (DtMainMenuType iType, QList< DtMenuItemType > menuItems) |
| Use this call to schedule to only create the specified menu items for the particular menu. | |
| static DtMenuWidget * | create (QWidget *parent=NULL) |
| Creates a new instance of this object. | |
Protected Member Functions | |
| virtual void | modifyLocalMenuWithGlobalChanges () |
| Called from the create routine, takes the local init of this menu and applies any changes added at the global level. | |
| virtual DtPopupMenu * | createMenu (DtPopupMenuCreatorFcn fcn, DtMainMenuType iType, int iPos=-1, bool initializeOnly=false, DtPopupMenu *menuBase=NULL) |
| Creates a new menu item and puts it at position. If position is -1, it is appened. | |
| virtual int | positionOfCreator (DtPopupMenuCreatorFcn fcn) |
| Returns the position of the creator function in internal lists. | |
| virtual int | positionOfCreator (DtMainMenuType iType) |
| virtual DtMainMenuType | typeForCreator (DtPopupMenuCreatorFcn fcn) |
| Returns the type of the menu for the specified creator. | |
| virtual void | removeOrderedCreator (int iPos) |
| Removes a creator from the ordered list. | |
| virtual void | insertOrderedCreator (DtPopupMenuCreatorFcn, int iPos) |
| Inserts a creator into the ordered list at the specified position (-1 appends) | |
Protected Attributes | |
| QList< DtPopupMenuCreatorFcn > | myOrderedCreators |
| QHash< DtMainMenuType, DtPopupCreator > | myPopupMenuCreators |
| QHash< DtMainMenuType, DtPopupMenu * > | myPopupMenus |
| bool | myCreated |
| QWidget * | myOwner |
| bool | myGloballyModified |
| DtFeatureActionManager * | myFeatureActionManager |
Static Protected Attributes | |
| static QList< DtGlobalChange > | myGlobalPopups |
| DtMenuWidget::DtMenuWidget | ( | QWidget * | parent = NULL | ) |
|
virtual |
|
virtual |
Reimplemented in DtTMMenuWidget.
|
virtual |
|
virtual |
Asks all the menus to see if this QAction is part of their popup system, and, if so, returns the type assocated with it.
|
virtual |
Returns the menu that has the particular action.
|
virtual |
Asks all the menus if they have a menu item of this type, and, if so, return it.
|
virtual |
Returns the menu that is of the particular type.
|
virtual |
Returns the menu that contains the particular menu item.
|
virtual |
Returns the menu that contains the particular action group for the menu item supplied.
|
virtual |
Creates and returns a menu of the specific type without adding it to internal structures.
|
virtual |
Creates a new menu object and initializes it with menu items.
Must call createMenu() on the menu to finalize the process. Calling this first gives an opportunity to modify the menu before final creation
|
virtual |
Applies any global removes of menu items and creates the menu items for the menu.
|
virtual |
Cycles through all popup menus, telling them to update as need be.
|
virtual |
Returns a menu that has the given menu name.
Only valid after the menu system has been created
|
virtual |
Returns a unique id amongst all menus.
|
virtual |
Returns an id (max + 1) for a menu.
|
virtual |
Inserts the precreated menu (assigning it a new unique id) into internal structures.
| index | Optional position on the menu for the new item. If -1 (the default) it will be added to the end of the menu. |
|
virtual |
Adds a new menu item given the menu item, path to add, action and validator.
If menu has been created, returns the new QAction, else returns null
|
virtual |
Adds the specified validator to a list of validators that can be called for the menu item.
|
virtual |
Removes the menu item specified by the menu path (i.e.
Set/Heading...). Calls down to removeMenuItem(const QString&) of the found menu.
|
virtual |
Removes all menu items from the specified group and the group itself specified by the menu path (i.e.
File/Open). Calls down to removeMenuGroup(const QString&) of the found menu
|
virtual |
Deletes current and creates a new menu of the specified type in the same spot that the menu was defined to be in.
|
inline |
Accessors for featureActionManager.
References myFeatureActionManager.
|
inline |
References myFeatureActionManager.
|
virtual |
Returns the menu at the specified position.
|
virtual |
Returns text for the menu (or sub-menu) that contains the action.
Firsts find the popup menu that contains the action, then asks the popup menu for the menu text that contains the action
|
virtual |
Use this function add popup menus that will be created during the "create" call.
If the menu has already been created, these routines will immediately add the popup menus to the menu bar. If iPos is -1 the new menu will be appended to the end. The type is the type of menu item this represents (as defined in menuItems.h)
|
virtual |
Replaces either the menu scheduled for creation or removes the current menu at given position and replaces it with the supplied menu.
|
virtual |
Removes a popup menu from either the internal create list (if the menu has not been created yet) or from the current menu bar (if it has been created).
If permenant is true, then removes the creator from the system as well
|
virtual |
Creates the popup menu (if it does not currently exist) and inserts it at the position that it exists in the ordered creator list.
If the menu is already created it returns that menu. If the menu widget has not been intialized, it returns NULL
|
virtual |
Removes the menu item at the specified poitions.
|
virtual |
Returns the popup menu objects list.
|
virtual |
Swaps menu A with menu B (positionally). If created also swaps live.
|
static |
Use these function to effect all menus created in the system.
Insert this menu at the specific position when menu is created. If iType is -1, the menu item will be appended, else it will be appened after the specified menu
|
static |
Replaces the menu with the supplied creator with the new menu creator.
|
static |
Do not create the menu at this slot when creating menus.
|
static |
Will swap the positions of menu item A with B.
|
static |
Use this call to schedule to only create the specified menu items for the particular menu.
What will basically happen is after the menu has the menu items created, it will be told to only keep the menu items listed in the value list (i.e. remove all other menu items)
|
static |
Creates a new instance of this object.
Reimplemented in DtTMMenuWidget.
|
protectedvirtual |
Called from the create routine, takes the local init of this menu and applies any changes added at the global level.
|
protectedvirtual |
Creates a new menu item and puts it at position. If position is -1, it is appened.
|
protectedvirtual |
Returns the position of the creator function in internal lists.
|
protectedvirtual |
|
protectedvirtual |
Returns the type of the menu for the specified creator.
|
protectedvirtual |
Removes a creator from the ordered list.
|
protectedvirtual |
Inserts a creator into the ordered list at the specified position (-1 appends)
|
signal |
signals
|
signal |
Emitted when a menu is recreated via the recreateMenu method.
Use this signal to restore any connections made to a menu that has been previously removed
|
virtualslot |
slots
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by featureActionManager(), and setFeatureActionManager().
|
staticprotected |