umbrello API Documentation

listpopupmenu.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2003-2007                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef LISTPOPUPMENU_H
00013 #define LISTPOPUPMENU_H
00014 
00015 #include <kpopupmenu.h>
00016 #include "umlnamespace.h"
00017 
00018 class UMLView;
00019 class UMLWidget;
00020 class ClassifierWidget;
00021 
00031 class ListPopupMenu : public KPopupMenu {
00032 public:
00033 
00035     enum Menu_Type
00036     {
00037         mt_Model,
00038         mt_Logical_View,
00039         mt_UseCase_View,
00040         mt_Component_View,
00041         mt_Deployment_View,
00042         mt_EntityRelationship_Model,
00043         mt_UseCase_Diagram,
00044         mt_Sequence_Diagram,
00045         mt_Class_Diagram,
00046         mt_Collaboration_Diagram,
00047         mt_State_Diagram,
00048         mt_Activity_Diagram,
00049         mt_Component_Diagram,
00050         mt_Deployment_Diagram,
00051         mt_EntityRelationship_Diagram,
00052         mt_On_UseCase_Diagram,
00053         mt_On_Sequence_Diagram,
00054         mt_On_Class_Diagram,
00055         mt_On_Collaboration_Diagram,
00056         mt_On_State_Diagram,
00057         mt_On_Activity_Diagram,
00058         mt_On_Component_Diagram,
00059         mt_On_Deployment_Diagram,
00060         mt_On_EntityRelationship_Diagram,
00061         mt_Logical_Folder,
00062         mt_UseCase_Folder,
00063         mt_Component_Folder,
00064         mt_Deployment_Folder,
00065         mt_EntityRelationship_Folder,
00066         mt_Class,
00067         mt_Package,
00068         mt_Subsystem,
00069         mt_Component,
00070         mt_Node,
00071         mt_Artifact,
00072         mt_Interface,
00073         mt_Enum,
00074         mt_Entity,
00075         mt_Datatype,
00076         mt_Actor,
00077         mt_UseCase,
00078         mt_Attribute,
00079         mt_EntityAttribute,
00080         mt_EnumLiteral,
00081         mt_Object,
00082         mt_Initial_State,
00083         mt_End_State,
00084         mt_State,
00085         mt_Activity,
00086         mt_Initial_Activity,
00087         mt_End_Activity,
00088         mt_Operation,
00089         mt_Template,
00090         mt_New_Parameter,
00091         mt_New_Operation,
00092         mt_New_Attribute,
00093         mt_New_Template,
00094         mt_New_EnumLiteral,
00095         mt_New_EntityAttribute,
00096         mt_Parameter_Selected,
00097         mt_Operation_Selected,
00098         mt_Attribute_Selected,
00099         mt_Template_Selected,
00100         mt_EnumLiteral_Selected,
00101         mt_EntityAttribute_Selected,
00102         mt_Association_Selected,          // Association without role names
00103         mt_Show_Attributes,
00104         mt_Show_Attributes_Selection,     //SHOWATTS, multiple items
00105         mt_Show_Operations,
00106         mt_Show_Operations_Selection,     //SHOWOPS, multiple items
00107         mt_Show_Packages,
00108         mt_Show_Packages_Selection,       //SHOWPACKAGE, multiple items
00109         mt_Show_Stereotypes,
00110         mt_Show_Stereotypes_Selection,    //SHOWSTEREOTYPE, multiple items
00111         mt_Visibility,
00112         mt_Visibility_Selection,               //SCOPE, multiple items
00113         mt_DrawAsCircle,
00114         mt_DrawAsCircle_Selection,        //DRAWASCIRCLE, multiple items
00115         mt_ChangeToClass,
00116         mt_ChangeToClass_Selection,
00117         mt_ChangeToInterface,
00118         mt_ChangeToInterface_Selection,
00119         mt_Rename_Object,
00120         mt_Select_Operation,
00121         mt_Anchor,
00122         mt_Properties,
00123         mt_Rename,
00124         mt_Delete,
00125         mt_Export_Image,
00126         mt_Import_Classes,
00127         mt_Sequence_Number,
00128         mt_Cut,
00129         mt_Copy,
00130         mt_Paste,
00131         mt_Clear,
00132         mt_Redo,
00133         mt_Undo,
00134         mt_Link_Docs,
00135         mt_Show_Operation_Signature,
00136         mt_Show_Operation_Signature_Selection, //SHOWOPSIG, multiple items
00137         mt_Show_Attribute_Signature,
00138         mt_Show_Attribute_Signature_Selection, //SHOWATTSIG, multiple items
00139         mt_Message_Text,
00140         mt_Collaboration_Message,
00141         mt_FloatText,
00142         mt_MultiA,
00143         mt_MultiB,
00144         mt_Name,                          //Association name
00145         mt_FullAssociation,                 // Association with role names
00146         mt_RoleNameA,
00147         mt_RoleNameB,
00148         mt_Delete_Selection,
00149         mt_Reset_Label_Positions,
00150         mt_Line_Color,
00151         mt_Line_Color_Selection,          //LINECOLOR, multiple items
00152         mt_Fill_Color,
00153         mt_Fill_Color_Selection,          //FILLCOLOR, multiple items
00154         mt_Use_Fill_Color,
00155         mt_Default_Properties,
00156         mt_Rename_MultiA,
00157         mt_Rename_MultiB,
00158         mt_Rename_Name,
00159         mt_Rename_RoleAName,
00160         mt_Rename_RoleBName,
00161         mt_Change_Font,
00162         mt_Change_Font_Selection,
00163         mt_SnapToGrid,
00164         mt_ShowSnapGrid,
00165         mt_Activity_Selected,
00166         mt_New_Activity,
00167         mt_Up,
00168         mt_Down,
00169         mt_Branch,
00170         mt_Flip,
00171 
00172         mt_Expand_All,                     //Expand all items in the list
00173         mt_Collapse_All,                   //Collapse all items in the list
00174 
00175         mt_Refactoring,
00176         mt_ViewCode, // view code document contents
00177         mt_Clone, // Create a deep copy of the object.
00178         mt_Show_Public_Only, // (not currently used)
00179         mt_Show_Public_Only_Selection,  // Show public operations/attributes only.
00180         mt_Externalize_Folder,  // Mark folder for saving as separate submodel
00181         mt_Internalize_Folder,  // Reintegrate separate submodel into main model
00182 
00183         mt_Undefined  =  - 1
00184     };
00185 
00192     explicit ListPopupMenu(QWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
00193 
00200     ListPopupMenu(QWidget* parent, Uml::ListView_Type type);
00201 
00211     ListPopupMenu(QWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
00212 
00216     ~ListPopupMenu();
00217 
00221     static Uml::Object_Type convert_MT_OT(Menu_Type mt);
00222 
00226     static Uml::Diagram_Type convert_MT_DT(Menu_Type mt);
00227 
00228 private:
00232     void init();
00233 
00237     void insertFileNew();
00238 
00244     void insertStdItem(Menu_Type m);
00245 
00255     void insertStdItems(bool insertLeadingSeparator = true,
00256                         Uml::Widget_Type type = Uml::wt_UMLWidget);
00257 
00265     void insertContainerItems(bool folderAndDiagrams);
00266 
00274     void insertAssocItem(const QString &label, Menu_Type mt);
00275 
00280     void insertSubmodelAction();
00281 
00286     void makeMultiClassifierPopup(ClassifierWidget *c);
00287 
00291     void makeClassifierPopup(ClassifierWidget *c);
00292 
00299     void setupMenu(Menu_Type type, UMLView * view = 0);
00300 
00301     enum PixMap_Type {
00302         pm_Class,
00303         pm_Package,
00304         pm_Interface,
00305         pm_Datatype,
00306         pm_Enum,
00307         pm_Actor,
00308         pm_Usecase,
00309         pm_InitialState,
00310         pm_EndState,
00311         pm_Branch,
00312         pm_Object,
00313         pm_Component,
00314         pm_Node,
00315         pm_Artifact,
00316         pm_Text,
00317         pm_Entity,
00318         pm_Subsystem,
00319         pm_NUMBER_OF_PIXMAPS
00320     };
00321     QPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
00322     KPopupMenu * m_pInsert, * m_pShow, * m_pColor;
00323     void setupColor(bool fc);
00324     void setupColorSelection(bool fc);
00325     void setupDiagramMenu(UMLView* view);
00326 };
00327 
00328 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:58 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003