#include <ContextMenuAction.h>
Public Types | |
| enum | BuddyTypeEnum { BEFORE, AFTER, REMOVE } |
| typedef EnumWrapper < BuddyTypeEnum > | BuddyType |
Public Member Functions | |
| ContextMenuAction (QAction *pAction, const std::string &id) | |
| ContextMenuAction & | operator= (const ContextMenuAction &menuAction) |
| bool | operator== (const ContextMenuAction &menuAction) const |
Public Attributes | |
| QAction * | mpAction |
| std::string | mId |
| BuddyType | mBuddyType |
| std::string | mBuddyId |
Definition at line 24 of file ContextMenuAction.h.
| typedef EnumWrapper<BuddyTypeEnum> ContextMenuAction::BuddyType |
The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.
Please see How To Use EnumWrapper for more information. The wrapped enum values are BuddyTypeEnum.
Definition at line 40 of file ContextMenuAction.h.
Defines how the associated buddy action is used when adding this action to the context menu.
| BEFORE |
This action should appear above the buddy action.
|
| AFTER |
This action should appear below the buddy action.
|
| REMOVE |
The buddy action should be removed from the context menu.
|
Definition at line 30 of file ContextMenuAction.h.
| ContextMenuAction::ContextMenuAction | ( | QAction * | pAction, | |
| const std::string & | id | |||
| ) |
Creates the context menu action.
| pAction | The Qt action to add to the context menu. If NULL is passed in, this action can only be used to remove an action from the menu. | |
| id | The unique identifier for this action. If an empty string is passed in, this action can only be used to remove an action from the menu. |
Definition at line 54 of file ContextMenuAction.h.
| ContextMenuAction& ContextMenuAction::operator= | ( | const ContextMenuAction & | menuAction | ) |
Assigns the values in this action to those of another action.
| menuAction | The source action from which to assign this action's values. |
Definition at line 69 of file ContextMenuAction.h.
| bool ContextMenuAction::operator== | ( | const ContextMenuAction & | menuAction | ) | const |
Compares two actions.
| menuAction | The action to compare against this action. |
Definition at line 91 of file ContextMenuAction.h.
| QAction* ContextMenuAction::mpAction |
The Qt action that should appear on the context menu.
If this value is NULL, this ContextMenuAction can only be used to remove an action from the menu.
Definition at line 110 of file ContextMenuAction.h.
| std::string ContextMenuAction::mId |
The unique identifier for the Qt action that should appear on the context menu.
If this string is empty, this ContextMenuAction can only be used to remove an action from the menu.
Definition at line 121 of file ContextMenuAction.h.
Defines how the buddy action is used.
Definition at line 128 of file ContextMenuAction.h.
| std::string ContextMenuAction::mBuddyId |
The unique identifier for the associated buddy action.
The buddy action is used as a reference when placing this action on the menu. It can also be used as an action which should be removed from the menu.
Definition at line 139 of file ContextMenuAction.h.