86
100
mt_Initial_Activity,
94
108
mt_New_EnumLiteral,
95
109
mt_New_EntityAttribute,
110
mt_New_UniqueConstraint,
111
mt_New_PrimaryKeyConstraint,
112
mt_New_ForeignKeyConstraint,
113
mt_New_CheckConstraint, // 70
96
114
mt_Parameter_Selected,
97
115
mt_Operation_Selected,
98
116
mt_Attribute_Selected,
99
117
mt_Template_Selected,
100
118
mt_EnumLiteral_Selected,
101
119
mt_EntityAttribute_Selected,
120
mt_UniqueConstraint_Selected,
121
mt_PrimaryKeyConstraint_Selected,
122
mt_ForeignKeyConstraint_Selected,
123
mt_CheckConstraint_Selected, // 80
102
124
mt_Association_Selected, // Association without role names
103
125
mt_Show_Attributes,
104
126
mt_Show_Attributes_Selection, //SHOWATTS, multiple items
108
130
mt_Show_Packages_Selection, //SHOWPACKAGE, multiple items
109
131
mt_Show_Stereotypes,
110
132
mt_Show_Stereotypes_Selection, //SHOWSTEREOTYPE, multiple items
112
mt_Visibility_Selection, //SCOPE, multiple items
134
mt_Visibility_Selection, //SCOPE, multiple items
114
136
mt_DrawAsCircle_Selection, //DRAWASCIRCLE, multiple items
115
137
mt_ChangeToClass,
137
160
mt_Show_Attribute_Signature,
138
161
mt_Show_Attribute_Signature_Selection, //SHOWATTSIG, multiple items
140
mt_Collaboration_Message,
163
mt_Collaboration_Message, // 120
144
mt_Name, //Association name
145
mt_FullAssociation, // Association with role names
146
mt_AttributeAssociation, // Rendering of an attribute as an association
167
mt_Name, // Association name
168
mt_FullAssociation, // Association with role names
169
mt_AttributeAssociation, // Rendering of an attribute as an association
149
172
mt_Delete_Selection,
150
mt_Reset_Label_Positions,
173
mt_Reset_Label_Positions, // 130
152
mt_Line_Color_Selection, //LINECOLOR, multiple items
154
mt_Fill_Color_Selection, //FILLCOLOR, multiple items
155
176
mt_Use_Fill_Color,
156
177
mt_Default_Properties,
157
178
mt_Rename_MultiA,
181
202
mt_Externalize_Folder, // Mark folder for saving as separate submodel
182
203
mt_Internalize_Folder, // Reintegrate separate submodel into main model
205
mt_AddInteractionOperand, // add a dash line to an alternative or a parallel combined fragment
184
207
mt_Undefined = - 1
188
211
* Constructs the popup menu for a diagram
190
* @param parent The parent to ListPopupMenu.
191
* @param type The type of menu to display.
192
* @param view The UMLView in which this ListPopupMenu is going to be displayed
213
* @param parent The parent to ListPopupMenu.
214
* @param type The type of menu to display.
215
* @param view The UMLView in which this ListPopupMenu is going to be displayed
194
217
explicit ListPopupMenu(QWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
197
220
* Constructs the popup menu for a list view item.
199
* @param parent The parent to ListPopupMenu.
200
* @param type The type of menu to display.
222
* @param parent The parent to ListPopupMenu.
223
* @param type The type of menu to display.
224
* @param object The UMLObject of the ListViewItem
202
ListPopupMenu(QWidget* parent, Uml::ListView_Type type);
226
ListPopupMenu(QWidget* parent, Uml::ListView_Type type, UMLObject* object);
205
229
* Constructs the popup menu for a canvas widget.
207
* @param parent The parent to ListPopupMenu.
208
* @param object The UMLWidget to represent a menu for.
209
* @param multi True if multiple items are selected.
210
* @param unique True if multiple selected items all have
211
* the same type (e.g. Class, Interface)
231
* @param parent The parent to ListPopupMenu.
232
* @param object The UMLWidget to represent a menu for.
233
* @param multi True if multiple items are selected.
234
* @param unique True if multiple selected items all have
235
* the same type (e.g. Class, Interface)
213
237
ListPopupMenu(QWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
228
252
static Uml::Diagram_Type convert_MT_DT(Menu_Type mt);
255
* Get the action from the menu type as index.
257
// KAction* getAction(Menu_Type idx);
258
QAction* getAction(Menu_Type idx);
261
* Enables the action item.
263
* @param idx The Menu_Type for which to enable the menu item.
264
* @param value The value.
266
void setActionEnabled(Menu_Type idx, bool value);
269
* Get the Menu_Type from the action.
271
// Menu_Type getMenuType(KAction* action);
272
Menu_Type getMenuType(QAction* action);
232
* Basic initialization - common to all constructors.
237
* Shortcut for inserting a "File->New" choice.
239
void insertFileNew();
242
* Shortcut for the most frequently used insertItem() calls.
244
* @param m The Menu_Type for which to insert a menu item.
246
void insertStdItem(Menu_Type m);
277
* Shortcut for the most frequently used addAction() calls.
279
* @param m The Menu_Type for which to insert a menu item.
281
void insert(Menu_Type m);
284
* Shortcut for the frequently used addAction() calls.
286
* @param m The Menu_Type for which to insert a menu item.
287
* @param menu The KMenu for which to insert a menu item.
289
void insert(const Menu_Type m, KMenu* menu);
292
* Shortcut for the frequently used addAction() calls.
294
* @param m The Menu_Type for which to insert a menu item.
295
* @param icon The icon for this action.
296
* @param text The text for this action.
298
void insert(const Menu_Type m, const QIcon & icon, const QString & text);
301
* Shortcut for the frequently used addAction() calls.
303
* @param m The Menu_Type for which to insert a menu item.
304
* @param text The text for this action.
305
* @param checkable Sets the action to checkable.
307
void insert(const Menu_Type m, const QString & text, const bool checkable = false);
310
* Shortcut for the frequently used addAction() calls.
312
* @param m The Menu_Type for which to insert a menu item.
313
* @param menu The KMenu for which to insert a menu item.
314
* @param icon The icon for this action.
315
* @param text The text for this action.
317
void insert(const Menu_Type m, KMenu* menu, const QIcon & icon, const QString & text);
320
* Shortcut for the frequently used addAction() calls.
322
* @param m The Menu_Type for which to insert a menu item.
323
* @param menu The KMenu for which to insert a menu item.
324
* @param text The text for this action.
326
void insert(const Menu_Type m, KMenu* menu, const QString & text, const bool checkable = false);
249
329
* Shortcut for the most frequently used insertStdItem() calls.
251
* @param insertLeadingSeparator Set this true if the group shall
252
* start with a separator.
331
* @param insertLeadingSeparator Set this true if the group shall
332
* start with a separator.
253
333
* @param type The Widget_Type for which to insert the menu items.
254
* If no argument is supplied then a Rename item will be
334
* If no argument is supplied then a Rename item will be
257
337
void insertStdItems(bool insertLeadingSeparator = true,
258
338
Uml::Widget_Type type = Uml::wt_UMLWidget);
293
373
void makeClassifierPopup(ClassifierWidget *c);
376
* Creates a popup menu for a single category Object
377
* @param category The UMLCategory for which the category menu is created
379
KMenu* makeCategoryTypeMenu(UMLCategory* category);
382
* Shortcut for commonly used sub menu initializations.
384
* @param type The Menu_Type for which to set up the menu.
386
void insertSubMenuNew(Menu_Type type);
389
* Shortcut for commonly used sub menu initializations.
391
* @param fc The "Use Fill Color" is checked.
393
void insertSubMenuColor(bool fc);
398
void setupDiagramMenu(UMLView* view);
296
401
* Shortcut for commonly used menu initializations.
298
* @param type The Menu_Type for which to set up the menu.
299
* @param view The UMLView parent of the menu.
301
void setupMenu(Menu_Type type, UMLView * view = 0);
323
QPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
324
KPopupMenu * m_pInsert, * m_pShow, * m_pColor;
325
void setupColor(bool fc);
326
void setupColorSelection(bool fc);
327
void setupDiagramMenu(UMLView* view);
403
* @param type The Menu_Type for which to set up the menu.
405
void setupMenu(Menu_Type type);
408
* Checks the action item.
410
* @param idx The Menu_Type for which to check the menu item.
411
* @param value The value.
413
void setActionChecked(Menu_Type idx, bool value);
416
* The List Popup Menu is triggered by either by right clicking on the
417
* View, a ListViewItem ( Object ) , or a widget
426
* Enum to keep track on TriggerObject Type
428
enum TriggerObjectType {
434
TriggerObject m_TriggerObject;
435
TriggerObjectType m_TriggerObjectType;
437
// QHash<Menu_Type, KAction*> m_actions;
438
QHash<Menu_Type, QAction*> m_actions;