![]() |
VR-Forces 4.2 Class Documentation
|
Creates a menu based on context. More...

Public Slots | |
| virtual bool | createMenu () |
| Returns true if something was created. | |
Public Member Functions | |
| DtContextMenu (QWidget *parent) | |
| default constructor | |
| virtual | ~DtContextMenu () |
| destructor | |
| virtual void | setOwner (DtBaseWindow *) |
| virtual DtBaseWindow * | owner () const |
| virtual void | setMenuWidget (DtMenuWidget *menuWidget) |
| virtual void | addMenuActionGroup (DtMainMenuType iType, DtMenuItemType iActionGroup, bool addSeparator=false, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| Note, these add routine will not replace items if the menu type and group already exist in the list. | |
| virtual void | addMenu (QString menuName, DtMainMenuType iType, bool addSeparator=false, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| virtual void | addMenuItem (DtMenuItemType iType, bool addSeparator=false, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| virtual void | addMenuForGroup (QString menuName, DtMainMenuType iType, DtMenuItemType iGroup, bool addSeparator, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| virtual void | addSeparator (DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| Simply adds a separator at the current position. | |
| virtual void | removeOccurancesOf (DtMenuItemType iType, DtMenuItemType iActionGroup=DtNoMenuItem) |
| If action group is not -1, only removes a specific type/group match, else removes all occurnaces of that type. | |
| virtual void | removeItem (const QString &name) |
| Removes any item (menu, menu item) that matches the give name. | |
| virtual int | addMenuItem (QString itemName, QObject *slotObj, const char *slot, QString accel=QString::null, bool addSeparator=false, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| Allow for adding context items that are created as part of this menu. | |
| virtual void | cleanup () |
| Cleans up allocated memory. | |
Static Public Member Functions | |
| static DtContextMenu * | create (QWidget *parent) |
Protected Member Functions | |
| virtual void | addMenuItems () |
| Override to add menu items to this context menu. | |
| virtual bool | exists (const DtContextItems &item) |
| Returns true if the item exists. | |
| virtual void | addContextItem (DtContextItems &item, DtMenuItemType iBeforeType=DtNoMenuItem, DtMenuItemType iAfterType=DtNoMenuItem) |
| Adds this new context item before or after the specified types (if not -1) | |
| virtual void | insertBefore (DtContextItems &item, DtMenuItemType iType) |
| Inserts item before the specified type. | |
| virtual void | insertAfter (DtContextItems &item, DtMenuItemType iType) |
| Inserts after the specified type. | |
| virtual const char * | eventMenuContext () const |
| Override to give context for event signaller. | |
| virtual DtMenuItemType | uniqueId () const |
| virtual bool | matchesName (QString lhs, QString rhs) const |
| Returns true if the supplied name matches the menu name of this menu. Will take & into account. | |
| virtual void | addedMenuItem (QObject *, const DtContextItems &) |
| Called right after a menu item is added with the item and context. | |
Protected Attributes | |
| DtBaseWindow * | myOwner |
| QList< DtContextItems > | myContextItems |
| QList< QObject * > | myAllocatedItems |
| DtMenuWidget * | myMenuWidget |
| int | myInternalIdCount |
Creates a menu based on context.
| DtContextMenu::DtContextMenu | ( | QWidget * | parent | ) |
default constructor
|
virtual |
destructor
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Note, these add routine will not replace items if the menu type and group already exist in the list.
If before or after type are not -1, will add this item before or after the specified type
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Simply adds a separator at the current position.
|
virtual |
If action group is not -1, only removes a specific type/group match, else removes all occurnaces of that type.
|
virtual |
Removes any item (menu, menu item) that matches the give name.
|
virtual |
Allow for adding context items that are created as part of this menu.
The integer returned is an id that can be used to identify this menu item in the addedMenuItem method for the context passed in
|
virtual |
Cleans up allocated memory.
|
virtualslot |
Returns true if something was created.
|
protectedvirtual |
Override to add menu items to this context menu.
|
protectedvirtual |
Returns true if the item exists.
|
protectedvirtual |
Adds this new context item before or after the specified types (if not -1)
|
protectedvirtual |
Inserts item before the specified type.
|
protectedvirtual |
Inserts after the specified type.
|
inlineprotectedvirtual |
Override to give context for event signaller.
References DtContextMenuEvent.
|
protectedvirtual |
|
protectedvirtual |
Returns true if the supplied name matches the menu name of this menu. Will take & into account.
|
protectedvirtual |
Called right after a menu item is added with the item and context.
|
static |
|
protected |
|
protected |
|
protected |
|
protected |