umbrello/umbrello
#include <listpopupmenu.h>
Public Member Functions | |
ListPopupMenu (QWidget *parent, MenuType type=mt_Undefined, UMLView *view=0) | |
ListPopupMenu (QWidget *parent, MenuType type, WidgetBase *widget) | |
ListPopupMenu (QWidget *parent, UMLListViewItem::ListViewType type, UMLObject *object) | |
ListPopupMenu (QWidget *parent, WidgetBase *object, bool multi=false, bool unique=false) | |
virtual | ~ListPopupMenu () |
QAction * | getAction (MenuType idx) |
MenuType | getMenuType (QAction *action) |
WidgetBase * | ownerWidget () const |
void | setActionEnabled (MenuType idx, bool value) |
Static Public Member Functions | |
static Uml::DiagramType::Enum | convert_MT_DT (MenuType mt) |
static UMLObject::ObjectType | convert_MT_OT (MenuType mt) |
static QVariant | dataFromAction (DataType key, QAction *action) |
static ListPopupMenu * | menuFromAction (QAction *action) |
static QString | toString (MenuType menu) |
static QString | toString (DataType data) |
static MenuType | typeFromAction (QAction *action) |
Detailed Description
A popup menu that depending on what type is set to will display a different menu.
The data field of actions is used to carry user data between objects. Because different types of data are used, a map is loaded with an enum as key (see DataType).
Displays a popup menu.
Definition at line 40 of file listpopupmenu.h.
Member Enumeration Documentation
< Key value of the data map used in actions.
Enumerator | |
---|---|
dt_MenuPointer | |
dt_ApplyLayout |
Definition at line 241 of file listpopupmenu.h.
< This type hosts all possible menu types.
Definition at line 47 of file listpopupmenu.h.
Constructor & Destructor Documentation
|
explicit |
Constructs the popup menu for a UMLView (diagram).
- Parameters
-
parent The parent to ListPopupMenu. type The type of menu to display. view The UMLView object
Definition at line 54 of file listpopupmenu.cpp.
ListPopupMenu::ListPopupMenu | ( | QWidget * | parent, |
MenuType | type, | ||
WidgetBase * | widget | ||
) |
Constructs the popup menu for a WidgetBase with customized menu type.
- Parameters
-
parent The parent to ListPopupMenu. type The type of menu to display. object The WidgetBase object.
Definition at line 70 of file listpopupmenu.cpp.
ListPopupMenu::ListPopupMenu | ( | QWidget * | parent, |
UMLListViewItem::ListViewType | type, | ||
UMLObject * | object | ||
) |
Constructs the popup menu for a tree list view item.
- Parameters
-
parent The parent to ListPopupMenu. type The type of menu to display. object The UMLObject of the ListViewItem
Definition at line 86 of file listpopupmenu.cpp.
ListPopupMenu::ListPopupMenu | ( | QWidget * | parent, |
WidgetBase * | object, | ||
bool | multi = false , |
||
bool | unique = false |
||
) |
Constructs the popup menu for a scene widget.
- Parameters
-
parent The parent to ListPopupMenu. object The WidgetBase to represent a menu for. multi True if multiple items are selected. unique True if multiple selected items all have the same type (e.g. Class, Interface)
Definition at line 283 of file listpopupmenu.cpp.
|
virtual |
Standard destructor.
Definition at line 603 of file listpopupmenu.cpp.
Member Function Documentation
|
static |
Utility: Convert a MenuType value to a Diagram_Type value.
Definition at line 1152 of file listpopupmenu.cpp.
|
static |
Utility: Convert a MenuType value to an ObjectType value.
Definition at line 1193 of file listpopupmenu.cpp.
|
static |
Returns the data from the given action to the given key.
Definition at line 1234 of file listpopupmenu.cpp.
QAction * ListPopupMenu::getAction | ( | MenuType | idx | ) |
Get the action from the menu type as index.
Definition at line 1890 of file listpopupmenu.cpp.
ListPopupMenu::MenuType ListPopupMenu::getMenuType | ( | QAction * | action | ) |
Get the MenuType from the action.
Get the MenuType from the action.
Definition at line 1906 of file listpopupmenu.cpp.
|
static |
Convenience method to extract the ListPopupMenu pointer stored in QAction objects belonging to ListPopupMenu.
Definition at line 1245 of file listpopupmenu.cpp.
WidgetBase * ListPopupMenu::ownerWidget | ( | ) | const |
Utility method to fetch owner of the menu.
- Returns
- The owned WidgetBase if this menu is owned by a widget. Otherwise returns 0.
Definition at line 1923 of file listpopupmenu.cpp.
void ListPopupMenu::setActionEnabled | ( | MenuType | idx, |
bool | value | ||
) |
Enables the action item.
- Parameters
-
idx The MenuType for which to enable the menu item. value The value.
Definition at line 1954 of file listpopupmenu.cpp.
|
static |
Convert enum MenuType to string.
Definition at line 1986 of file listpopupmenu.cpp.
|
static |
Convert enum DataType to string.
Definition at line 1994 of file listpopupmenu.cpp.
|
static |
Convenience method to extract the ListPopupMenu type from an action.
- Parameters
-
action the action which was called
- Returns
- menu type enum value
Definition at line 1122 of file listpopupmenu.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.