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, WidgetBase::WidgetType uniqueType=WidgetBase::wt_UMLWidget) | |
virtual | ~ListPopupMenu () |
QAction * | getAction (MenuType idx) |
MenuType | getMenuType (QAction *action) |
WidgetBase * | ownerWidget () const |
void | setActionEnabled (MenuType idx, bool value) |
Static Public Member Functions | |
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 265 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 59 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. widget The WidgetBase object.
Definition at line 75 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 91 of file listpopupmenu.cpp.
ListPopupMenu::ListPopupMenu | ( | QWidget * | parent, |
WidgetBase * | object, | ||
bool | multi = false , |
||
WidgetBase::WidgetType | uniqueType = WidgetBase::wt_UMLWidget |
||
) |
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. uniqueType The type of widget shared by all selected widgets
Definition at line 291 of file listpopupmenu.cpp.
|
virtual |
Standard destructor.
Definition at line 322 of file listpopupmenu.cpp.
Member Function Documentation
|
static |
Utility: Convert a MenuType value to an ObjectType value.
Definition at line 1283 of file listpopupmenu.cpp.
Returns the data from the given action to the given key.
Definition at line 1324 of file listpopupmenu.cpp.
Get the action from the menu type as index.
Definition at line 2003 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 2019 of file listpopupmenu.cpp.
|
static |
Convenience method to extract the ListPopupMenu pointer stored in QAction objects belonging to ListPopupMenu.
Definition at line 1335 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 2036 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 2067 of file listpopupmenu.cpp.
Convert enum MenuType to string.
Definition at line 2099 of file listpopupmenu.cpp.
Convert enum DataType to string.
Definition at line 2107 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 1234 of file listpopupmenu.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.