umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Member Functions | Protected Member Functions | List of all members
WidgetBasePopupMenu Class Reference

#include <widgetbasepopupmenu.h>

Inheritance diagram for WidgetBasePopupMenu:
Collaboration diagram for WidgetBasePopupMenu:

Public Member Functions

 WidgetBasePopupMenu (QWidget *parent, WidgetBase *widget, bool multi, WidgetBase::WidgetType uniqueType=WidgetBase::wt_UMLWidget)
 
- Public Member Functions inherited from ListPopupMenu
 ListPopupMenu (QWidget *parent=0)
 
virtual ~ListPopupMenu ()
 
QAction * getAction (MenuType idx)
 
void setActionEnabled (MenuType idx, bool value)
 
MenuType getMenuType (QAction *action)
 
void dumpActions (const QString &title)
 
KMenu * newMenu (const QString &title, QWidget *widget)
 
void addMenu (KMenu *menu)
 

Protected Member Functions

void makeMultiClassifierShowPopup (WidgetBase::WidgetType type)
 
void makeClassifierShowPopup (ClassifierWidget *c)
 
void insertSingleSelectionMenu (WidgetBase *widget)
 
void insertMultiSelectionMenu (WidgetBase::WidgetType uniqueType)
 
void insertStdItems (bool insertLeadingSeparator=true, WidgetBase::WidgetType type=WidgetBase::wt_UMLWidget)
 
void insertSubMenuAlign ()
 
void insertSubMenuColor (bool fc)
 
void insertSubMenuNew (WidgetBase::WidgetType type)
 
void insertSubMenuShowEntity (EntityWidget *widget)
 
KMenu * makeCategoryTypeMenu (UMLCategory *category)
 
- Protected Member Functions inherited from ListPopupMenu
void insert (MenuType m)
 
void insertFromActionKey (const MenuType m, KMenu *menu, const QString &action)
 
void insert (const MenuType m, KMenu *menu)
 
void insert (const MenuType m, KMenu *menu, const QIcon &icon, const QString &text)
 
void insert (const MenuType m, KMenu *menu, const QString &text, const bool checkable=false)
 
void insert (const MenuType m, const QIcon &icon, const QString &text)
 
void insert (const MenuType m, const QString &text, const bool checkable=false)
 
void insertContainerItems (bool folders, bool diagrams, bool packages)
 
void insertContainerItems (KMenu *menu, bool folders, bool diagrams, bool packages)
 
void insertAssociationTextItem (const QString &label, MenuType mt)
 
KMenu * makeNewMenu ()
 
void insertSubMenuCategoryType (UMLCategory *category)
 
void setActionChecked (MenuType idx, bool value)
 
void setupActionsData ()
 

Additional Inherited Members

- Public Types inherited from ListPopupMenu
enum  MenuType {
  mt_Model , mt_Activity_Diagram , mt_Class_Diagram , mt_Collaboration_Diagram ,
  mt_Component_Diagram , mt_Deployment_Diagram , mt_EntityRelationship_Diagram , mt_Sequence_Diagram ,
  mt_State_Diagram , mt_UseCase_Diagram , mt_Logical_Folder , mt_UseCase_Folder ,
  mt_Component_Folder , mt_Deployment_Folder , mt_EntityRelationship_Folder , mt_Accept_Signal ,
  mt_Accept_Time_Event , mt_Activity , mt_Activity_Transition , mt_Actor ,
  mt_Artifact , mt_Attribute , mt_Branch , mt_Category ,
  mt_CheckConstraint , mt_Choice , mt_Class , mt_CombinedState ,
  mt_Component , mt_Datatype , mt_DeepHistory , mt_DisjointSpecialisation ,
  mt_EditCombinedState , mt_End_Activity , mt_End_State , mt_Entity ,
  mt_EntityAttribute , mt_Enum , mt_EnumLiteral , mt_Exception ,
  mt_FloatText , mt_Final_Activity , mt_ForeignKeyConstraint , mt_Fork ,
  mt_GoToStateDiagram , mt_Initial_Activity , mt_Initial_State , mt_Invoke_Activity ,
  mt_Instance , mt_InstanceAttribute , mt_Interface , mt_InterfaceComponent ,
  mt_InterfaceProvided , mt_InterfaceRequired , mt_Junction , mt_MessageAsynchronous ,
  mt_MessageCreation , mt_MessageDestroy , mt_MessageFound , mt_MessageLost ,
  mt_MessageSynchronous , mt_Node , mt_Note , mt_Object ,
  mt_Object_Node , mt_Operation , mt_OverlappingSpecialisation , mt_Package ,
  mt_Param_Activity , mt_Pin , mt_Port , mt_PrePostCondition ,
  mt_PrimaryKeyConstraint , mt_Region , mt_SelectStateDiagram , mt_Send_Signal ,
  mt_ShallowHistory , mt_State , mt_StateFork , mt_StateJoin ,
  mt_StateTransition , mt_Subsystem , mt_Template , mt_Union ,
  mt_UniqueConstraint , mt_UseCase , mt_New_Activity , mt_New_Attribute ,
  mt_New_EntityAttribute , mt_New_EnumLiteral , mt_New_InstanceAttribute , mt_New_Operation ,
  mt_New_Parameter , mt_New_Template , mt_RemoveStateDiagram , mt_ReturnToClass ,
  mt_ReturnToCombinedState , mt_Hide_Attribute_Signature_Selection , mt_Hide_Attributes_Selection , mt_Hide_Destruction_Box ,
  mt_Hide_NonPublic_Selection , mt_Hide_Operation_Signature_Selection , mt_Hide_Operations_Selection , mt_Hide_Packages_Selection ,
  mt_Hide_Stereotypes_Selection , mt_Hide_Visibility_Selection , mt_Show_Attribute_Signature , mt_Show_Attribute_Signature_Selection ,
  mt_Show_Attributes_Selection , mt_Show_Attributes , mt_Show_Destruction_Box , mt_Show_Documentation ,
  mt_Show_NonPublic_Selection , mt_Show_Operation_Signature , mt_Show_Operation_Signature_Selection , mt_Show_Operations_Selection ,
  mt_Show_Operations , mt_Show_Packages , mt_Show_Packages_Selection , mt_Show_Public_Only ,
  mt_Show_Stereotypes , mt_Show_Stereotypes_Selection , mt_Show_Visibility_Selection , mt_Visibility ,
  mt_DrawAsCircle , mt_ChangeToClass , mt_ChangeToInterface , mt_ChangeToPackage ,
  mt_Open_File , mt_Rename_Object , mt_Select_Operation , mt_Properties ,
  mt_Rename , mt_NameAsTooltip , mt_Show , mt_Delete ,
  mt_Export_Image , mt_Import_Class , mt_Import_Project , mt_Cut ,
  mt_Copy , mt_Paste , mt_Clear , mt_Redo ,
  mt_Undo , mt_Reset_Label_Positions , mt_Line_Color , mt_Line_Color_Selection ,
  mt_Fill_Color , mt_Fill_Color_Selection , mt_Use_Fill_Color , mt_Set_Use_Fill_Color_Selection ,
  mt_Unset_Use_Fill_Color_Selection , mt_Rename_MultiA , mt_Rename_MultiB , mt_Rename_Name ,
  mt_Rename_RoleAName , mt_Rename_RoleBName , mt_Change_Font , mt_Change_Font_Selection ,
  mt_SnapToGrid , mt_SnapComponentSizeToGrid , mt_ShowDocumentationIndicator , mt_ShowSnapGrid ,
  mt_AutoResize , mt_Resize , mt_Up , mt_Down ,
  mt_FlipHorizontal , mt_FlipVertical , mt_Add_Point , mt_Delete_Point ,
  mt_Auto_Layout_Spline , mt_Expand_All , mt_Collapse_All , mt_Refactoring ,
  mt_ViewCode , mt_Clone , mt_Externalize_Folder , mt_Internalize_Folder ,
  mt_AddInteractionOperand , mt_Apply_Layout , mt_Apply_Layout1 , mt_Apply_Layout2 ,
  mt_Apply_Layout3 , mt_Apply_Layout4 , mt_Apply_Layout5 , mt_Apply_Layout6 ,
  mt_Apply_Layout7 , mt_Apply_Layout8 , mt_Apply_Layout9 , mt_LayoutDirect ,
  mt_LayoutSpline , mt_LayoutOrthogonal , mt_LayoutPolyline , mt_Align_Right ,
  mt_Align_Left , mt_Align_Top , mt_Align_Bottom , mt_Align_VerticalMiddle ,
  mt_Align_HorizontalMiddle , mt_Align_VerticalDistribute , mt_Align_HorizontalDistribute , mt_Import_from_File ,
  mt_Remove , mt_Undefined = - 1
}
 < This type hosts all possible menu entry types More...
 
enum  DataType { dt_MenuPointer , dt_ApplyLayout }
 < Key value of the data map used in actions. More...
 
- Static Public Member Functions inherited from ListPopupMenu
static QString toString (MenuType menu)
 
static QString toString (DataType data)
 
static QVariant dataFromAction (DataType key, QAction *action)
 
static UMLObject::ObjectType convert_MT_OT (MenuType mt)
 
static ListPopupMenumenuFromAction (QAction *action)
 
static MenuType typeFromAction (QAction *action)
 
- Protected Attributes inherited from ListPopupMenu
QHash< MenuType, QAction * > m_actions
 
ListPopupMenuPrivated
 

Detailed Description

Constructs the popup menu for a WidgetBase with customized menu type.

Constructor & Destructor Documentation

◆ WidgetBasePopupMenu()

WidgetBasePopupMenu::WidgetBasePopupMenu ( QWidget *  parent,
WidgetBase widget,
bool  multi,
WidgetBase::WidgetType  uniqueType = WidgetBase::wt_UMLWidget 
)

Constructs the popup menu for a scene widget.

Parameters
parentThe parent to ListPopupMenu.
widgetThe WidgetBase to represent a menu for.
multiTrue if multiple items are selected.
uniqueTypeThe type of widget shared by all selected widgets
Here is the call graph for this function:

Member Function Documentation

◆ insertMultiSelectionMenu()

void WidgetBasePopupMenu::insertMultiSelectionMenu ( WidgetBase::WidgetType  uniqueType)
protected

Inserts the menu actions that work on the whole selection of widgets

Here is the call graph for this function:

◆ insertSingleSelectionMenu()

void WidgetBasePopupMenu::insertSingleSelectionMenu ( WidgetBase widget)
protected

Inserts the menu actions for a widget

Parameters
widgetwidget to generate the menu for
Here is the call graph for this function:

◆ insertStdItems()

void WidgetBasePopupMenu::insertStdItems ( bool  insertLeadingSeparator = true,
WidgetBase::WidgetType  type = WidgetBase::wt_UMLWidget 
)
protected

Shortcut for the frequently used insert() calls.

Parameters
insertLeadingSeparatorSet this true if the group shall start with a separator.
typeThe WidgetType for which to insert the menu items. If no argument is supplied then a Rename item will be included.
Here is the call graph for this function:

◆ insertSubMenuAlign()

void WidgetBasePopupMenu::insertSubMenuAlign ( )
protected

Add the align actions submenu

Here is the call graph for this function:

◆ insertSubMenuColor()

void WidgetBasePopupMenu::insertSubMenuColor ( bool  fc)
protected

Shortcut for commonly used sub menu initializations.

Parameters
fcThe "Use Fill Color" is checked.
Here is the call graph for this function:

◆ insertSubMenuNew()

void WidgetBasePopupMenu::insertSubMenuNew ( WidgetBase::WidgetType  type)
protected

Shortcut for commonly used sub menu initializations.

Parameters
typeThe widget type for which to set up the menu.
Here is the call graph for this function:

◆ insertSubMenuShowEntity()

void WidgetBasePopupMenu::insertSubMenuShowEntity ( EntityWidget widget)
protected
Here is the call graph for this function:

◆ makeCategoryTypeMenu()

KMenu * WidgetBasePopupMenu::makeCategoryTypeMenu ( UMLCategory category)
protected

◆ makeClassifierShowPopup()

void WidgetBasePopupMenu::makeClassifierShowPopup ( ClassifierWidget c)
protected

Creates the "Show" submenu in the context menu of one classifier widget

Here is the call graph for this function:

◆ makeMultiClassifierShowPopup()

void WidgetBasePopupMenu::makeMultiClassifierShowPopup ( WidgetBase::WidgetType  type)
protected

Creates the "Show" submenu the context menu of multiple classifier widgets

Here is the call graph for this function:

The documentation for this class was generated from the following files: