[Uml-devel] KDE/kdesdk/umbrello/umbrello

Andi Fischer andi.fischer at hispeed.ch
Mon Jun 27 22:53:28 UTC 2011


SVN commit 1238543 by fischer:

Renaming Widget_Type to WidgetType.

 M  +7 -7      assocrules.cpp  
 M  +4 -4      assocrules.h  
 M  +1 -1      controller/umlwidgetcontroller.cpp  
 M  +3 -3      dialogs/classoptionspage.cpp  
 M  +7 -7      listpopupmenu.cpp  
 M  +1 -1      listpopupmenu.h  
 M  +2 -2      model_utils.cpp  
 M  +1 -1      model_utils.h  
 M  +1 -1      toolbarstateassociation.cpp  
 M  +5 -5      umlview.cpp  
 M  +2 -2      widgets/toolbarstateonewidget.cpp  
 M  +1 -1      widgets/toolbarstateonewidget.h  
 M  +3 -3      widgets/umlwidget.cpp  
 M  +1 -1      widgets/umlwidget.h  
 M  +4 -4      widgets/widgetbase.cpp  
 M  +6 -6      widgets/widgetbase.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/assocrules.cpp #1238542:1238543
@@ -58,7 +58,7 @@
  */
 bool AssocRules::allowAssociation( Uml::AssociationType assocType, UMLWidget * widget )
 {
-    WidgetBase::Widget_Type widgetType = widget->baseType();
+    WidgetBase::WidgetType widgetType = widget->baseType();
     bool bValid = false;
     for (int i = 0; i < m_nNumRules; ++i) {
         if (assocType == m_AssocRules[i].assoc_type) {
@@ -151,8 +151,8 @@
                                    UMLWidget * widgetA, UMLWidget * widgetB,
                                    bool extendedCheck )
 {
-    WidgetBase::Widget_Type widgetTypeA = widgetA->baseType();
-    WidgetBase::Widget_Type widgetTypeB = widgetB->baseType();
+    WidgetBase::WidgetType widgetTypeA = widgetA->baseType();
+    WidgetBase::WidgetType widgetTypeB = widgetB->baseType();
     bool bValid = false;
 
     if ( widgetA->umlObject() == widgetB->umlObject() ) {
@@ -322,7 +322,7 @@
  * Returns whether to allow a multiplicity text for the given
  * association and widget type.
  */
-bool AssocRules::allowMultiplicity( Uml::AssociationType assocType, WidgetBase::Widget_Type widgetType )
+bool AssocRules::allowMultiplicity( Uml::AssociationType assocType, WidgetBase::WidgetType widgetType )
 {
     for( int i = 0; i < m_nNumRules; ++i )
         if( assocType == m_AssocRules[ i ].assoc_type )
@@ -334,7 +334,7 @@
 /**
  * Returns whether to allow an association to self for given variables.
  */
-bool AssocRules::allowSelf( Uml::AssociationType assocType, WidgetBase::Widget_Type widgetType )
+bool AssocRules::allowSelf( Uml::AssociationType assocType, WidgetBase::WidgetType widgetType )
 {
     for( int i = 0; i < m_nNumRules; ++i )
         if( assocType == m_AssocRules[ i ].assoc_type )
@@ -351,8 +351,8 @@
  */
 Uml::AssociationType AssocRules::isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB)
 {
-    WidgetBase::Widget_Type widgetTypeA = widgetA->baseType();
-    WidgetBase::Widget_Type widgetTypeB = widgetB->baseType();
+    WidgetBase::WidgetType widgetTypeA = widgetA->baseType();
+    WidgetBase::WidgetType widgetTypeB = widgetB->baseType();
     for (int i = 0; i < m_nNumRules; ++i) {
         if (m_AssocRules[i].assoc_type == Uml::AssociationType::Realization &&
                 widgetTypeA == m_AssocRules[i].widgetA_type &&
--- trunk/KDE/kdesdk/umbrello/umbrello/assocrules.h #1238542:1238543
@@ -40,9 +40,9 @@
 
     static bool allowRole( Uml::AssociationType assocType );
 
-    static bool allowMultiplicity( Uml::AssociationType assocType, WidgetBase::Widget_Type widgetType );
+    static bool allowMultiplicity( Uml::AssociationType assocType, WidgetBase::WidgetType widgetType );
 
-    static bool allowSelf( Uml::AssociationType assocType, WidgetBase::Widget_Type widgetType );
+    static bool allowSelf( Uml::AssociationType assocType, WidgetBase::WidgetType widgetType );
 
     static Uml::AssociationType isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB);
 
@@ -50,8 +50,8 @@
 
     struct Assoc_Rule {  ///< Structure to help determine association rules.
         Uml::AssociationType assoc_type;   ///< association type
-        WidgetBase::Widget_Type widgetA_type;    ///< type of role A widget
-        WidgetBase::Widget_Type widgetB_type;    ///< type of role B widget
+        WidgetBase::WidgetType widgetA_type;    ///< type of role A widget
+        WidgetBase::WidgetType widgetB_type;    ///< type of role B widget
         bool role;                         ///< role text
         bool multiplicity;                 ///< multipliciy text on association
         bool directional;                  ///< can have an association of same type going between widget each way
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/umlwidgetcontroller.cpp #1238542:1238543
@@ -497,7 +497,7 @@
  *
  * Default behaviour is show the properties dialog for the widget using
  * m_widget->slotMenuSelection(ListPopupMenu::mt_Properties);
- * If the widget doesn't have a property dialog (from the Widget_Type enum, those that
+ * If the widget doesn't have a property dialog (from the WidgetType enum, those that
  * don't have an UMLObject representation) there's no need to override
  * the method, it simply does nothing.
  *
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classoptionspage.cpp #1238542:1238543
@@ -29,7 +29,7 @@
   : QWidget(pParent)
 {
     init();
-    //Widget_Type type = pWidget->baseType();
+    //WidgetType type = pWidget->baseType();
     m_pWidget = pWidget;
     setupPage();
 }
@@ -102,7 +102,7 @@
     m_pShowPackageCB->setChecked(m_pWidget->getShowPackage());
     visibilityLayout->addWidget(m_pShowPackageCB, 1, 1);
 
-    WidgetBase::Widget_Type type = m_pWidget->baseType();
+    WidgetBase::WidgetType type = m_pWidget->baseType();
 
     if (type == WidgetBase::wt_Class) {
         m_pShowAttsCB = new QCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
@@ -209,7 +209,7 @@
     m_pWidget->setShowVisibility( m_pShowVisibilityCB->isChecked() );
     m_pWidget->setShowOps( m_pShowOpsCB->isChecked() );
     m_pWidget->setShowOpSigs( m_pShowOpSigCB->isChecked() );
-    WidgetBase::Widget_Type type = m_pWidget->baseType();
+    WidgetBase::WidgetType type = m_pWidget->baseType();
     if (type == WidgetBase::wt_Class) {
         m_pWidget->setShowStereotype( m_pShowStereotypeCB->isChecked() );
         m_pWidget->setShowAtts( m_pShowAttsCB->isChecked() );
--- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.cpp #1238542:1238543
@@ -266,9 +266,9 @@
     //make menu for logical view
     if (!object)
         return;
-    UMLWidget::Widget_Type type = object->baseType();
+    UMLWidget::WidgetType type = object->baseType();
     // uDebug() << "ListPopupMenu created with multi=" << multi << " , unique="
-    //          << unique << " for Widget_Type=" << type;
+    //          << unique << " for WidgetType=" << type;
 
     if (multi) {
         ClassifierWidget *c = NULL;
@@ -549,7 +549,7 @@
         }
         break;
     default:
-        uWarning() << "unhandled Widget_Type " << type;
+        uWarning() << "unhandled WidgetType " << type;
         break;
     }//end switch
 
@@ -796,12 +796,12 @@
  *
  * @param insertLeadingSeparator   Set this true if the group shall
  *                                 start with a separator.
- * @param type      The Widget_Type for which to insert the menu items.
+ * @param type      The WidgetType for which to insert the menu items.
  *                  If no argument is supplied then a Rename item will be
  *                  included.
  */
 void ListPopupMenu::insertStdItems(bool insertLeadingSeparator /* = true */,
-                                   WidgetBase::Widget_Type type /* = wt_UMLWidget */)
+                                   WidgetBase::WidgetType type /* = wt_UMLWidget */)
 {
     if (insertLeadingSeparator)
         addSeparator();
@@ -898,7 +898,7 @@
  */
 void ListPopupMenu::makeMultiClassifierPopup(ClassifierWidget *c)
 {
-    WidgetBase::Widget_Type type = c->baseType();
+    WidgetBase::WidgetType type = c->baseType();
     ClassifierWidget *cls = NULL;
 
     KMenu* show = new KMenu(i18n("Show"), this);
@@ -938,7 +938,7 @@
  */
 void ListPopupMenu::makeClassifierPopup(ClassifierWidget *c)
 {
-    WidgetBase::Widget_Type type = c->baseType();
+    WidgetBase::WidgetType type = c->baseType();
     KMenu* menu = new KMenu(i18nc("new classifier menu", "New"), this);
     menu->setIcon(Icon_Utils::SmallIcon(Icon_Utils::it_New));
     if (type == WidgetBase::wt_Class)
--- trunk/KDE/kdesdk/umbrello/umbrello/listpopupmenu.h #1238542:1238543
@@ -246,7 +246,7 @@
     void insert(const Menu_Type m, KMenu* menu, const QString & text, const bool checkable = false);
 
     void insertStdItems(bool insertLeadingSeparator = true,
-                        WidgetBase::Widget_Type type = WidgetBase::wt_UMLWidget);
+                        WidgetBase::WidgetType type = WidgetBase::wt_UMLWidget);
     void insertContainerItems(bool folderAndDiagrams);
     void insertAssocItem(const QString &label, Menu_Type mt);
     void insertSubmodelAction();
--- trunk/KDE/kdesdk/umbrello/umbrello/model_utils.cpp #1238542:1238543
@@ -45,10 +45,10 @@
 /**
  * Determines whether the given widget type is cloneable.
  *
- * @param type  The input Widget_Type.
+ * @param type  The input WidgetType.
  * @return      True if the given type is cloneable.
  */
-bool isCloneable(WidgetBase::Widget_Type type)
+bool isCloneable(WidgetBase::WidgetType type)
 {
     switch (type) {
     case WidgetBase::wt_Actor:
--- trunk/KDE/kdesdk/umbrello/umbrello/model_utils.h #1238542:1238543
@@ -34,7 +34,7 @@
  */
 namespace Model_Utils {
 
-bool isCloneable(WidgetBase::Widget_Type type);
+bool isCloneable(WidgetBase::WidgetType type);
 
 UMLObject* findObjectInList(Uml::IDType id, const UMLObjectList& inList);
 
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstateassociation.cpp #1238542:1238543
@@ -215,7 +215,7 @@
     Uml::AssociationType type = getAssociationType();
     UMLWidget* widgetA = m_firstWidget;
     UMLWidget* widgetB = getCurrentWidget();
-    WidgetBase::Widget_Type at = widgetA->baseType();
+    WidgetBase::WidgetType at = widgetA->baseType();
     bool valid = true;
     if (type == Uml::AssociationType::Generalization) {
         type = AssocRules::isGeneralisationOrRealisation(widgetA, widgetB);
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #1238542:1238543
@@ -872,7 +872,7 @@
 
     removeAssociations(o);
 
-    WidgetBase::Widget_Type t = o->baseType();
+    WidgetBase::WidgetType t = o->baseType();
     if (type() == Uml::DiagramType::Sequence && t == WidgetBase::wt_Object)
         checkMessages(static_cast<ObjectWidget*>(o));
 
@@ -1096,7 +1096,7 @@
 {
     // loop through all selected items
     foreach(UMLWidget *temp , m_SelectedList) {
-        WidgetBase::Widget_Type type = temp->baseType();
+        WidgetBase::WidgetType type = temp->baseType();
         ClassifierWidget *cw = dynamic_cast<ClassifierWidget*>(temp);
 
         // toggle the show setting sel
@@ -1514,7 +1514,7 @@
     if (!pWidget) {
         return false;
     }
-    WidgetBase::Widget_Type type = pWidget->baseType();
+    WidgetBase::WidgetType type = pWidget->baseType();
     if (isPasteOperation) {
         if (type == WidgetBase::wt_Message)
             m_MessageList.append(static_cast<MessageWidget*>(pWidget));
@@ -2887,7 +2887,7 @@
 void UMLView::setClassWidgetOptions(ClassOptionsPage * page)
 {
     foreach(UMLWidget* pWidget , m_WidgetList) {
-        WidgetBase::Widget_Type wt = pWidget->baseType();
+        WidgetBase::WidgetType wt = pWidget->baseType();
         if (wt == WidgetBase::wt_Class || wt == WidgetBase::wt_Interface) {
             page->setWidget(static_cast<ClassifierWidget *>(pWidget));
             page->updateUMLWidget();
@@ -2940,7 +2940,7 @@
 
     // get the first item and its base type
     UMLWidget * pTemp = (UMLWidget *) m_SelectedList.first();
-    WidgetBase::Widget_Type tmpType = pTemp->baseType();
+    WidgetBase::WidgetType tmpType = pTemp->baseType();
 
     // check all selected items, if they have the same BaseType
     foreach(pTemp , m_SelectedList) {
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/toolbarstateonewidget.cpp #1238542:1238543
@@ -84,7 +84,7 @@
 
 void ToolBarStateOneWidget::mouseReleaseWidget()
 {
-    WidgetBase::Widget_Type widgetType = getWidgetType();
+    WidgetBase::WidgetType widgetType = getWidgetType();
 
     if (widgetType == WidgetBase::wt_Precondition) {
         m_firstObject = 0;
@@ -144,7 +144,7 @@
 }
 
 
-WidgetBase::Widget_Type ToolBarStateOneWidget::getWidgetType()
+WidgetBase::WidgetType ToolBarStateOneWidget::getWidgetType()
 {
     if (getButton() == WorkToolBar::tbb_Seq_Precondition) {
         return WidgetBase::wt_Precondition;
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/toolbarstateonewidget.h #1238542:1238543
@@ -117,7 +117,7 @@
      *
      * @return The widget type of this tool.
      */
-    WidgetBase::Widget_Type getWidgetType();
+    WidgetBase::WidgetType getWidgetType();
 
 
     /**
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1238542:1238543
@@ -268,7 +268,7 @@
 void UMLWidget::slotMenuSelection(QAction* action)
 {
     QColor newColour;
-    const WidgetBase::Widget_Type wt = m_Type;
+    const WidgetBase::WidgetType wt = m_Type;
     UMLWidget* widget = 0; // use for select the first object properties (fill, line color)
 
     ListPopupMenu::Menu_Type sel = m_pMenu->getMenuType(action);
@@ -742,7 +742,7 @@
 
 void UMLWidget::setSelected(bool _select)
 {
-    const WidgetBase::Widget_Type wt = m_Type;
+    const WidgetBase::WidgetType wt = m_Type;
     if (_select) {
         if (m_pView->getSelectCount() == 0) {
             if (widgetHasUMLObject(wt)) {
@@ -847,7 +847,7 @@
     setY(getY());
 }
 
-bool UMLWidget::widgetHasUMLObject(WidgetBase::Widget_Type type)
+bool UMLWidget::widgetHasUMLObject(WidgetBase::WidgetType type)
 {
     if (type == WidgetBase::wt_Actor         ||
             type == WidgetBase::wt_UseCase   ||
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.h #1238542:1238543
@@ -492,7 +492,7 @@
     /**
      * Returns whether the widget type has an associated UMLObject
      */
-    static bool widgetHasUMLObject(WidgetBase::Widget_Type type);
+    static bool widgetHasUMLObject(WidgetBase::WidgetType type);
 
     /**
      * Update the size of this widget.
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/widgetbase.cpp #1238542:1238543
@@ -30,7 +30,7 @@
 /**
  * Initialize members.
  */
-void WidgetBase::init(UMLView *view, Widget_Type type /* = Uml::wt_UMLWidget */)
+void WidgetBase::init(UMLView *view, WidgetType type /* = wt_UMLWidget */)
 {
     m_pView = view;
     m_Type = type;
@@ -60,7 +60,7 @@
 /**
  * Set property m_Type.
  */
-void WidgetBase::setBaseType(WidgetBase::Widget_Type type)
+void WidgetBase::setBaseType(WidgetBase::WidgetType type)
 {
     m_Type = type;
 }
@@ -68,7 +68,7 @@
 /**
  * Read property of m_Type.
  */
-WidgetBase::Widget_Type WidgetBase::baseType() const
+WidgetBase::WidgetType WidgetBase::baseType() const
 {
     return m_Type;
 }
@@ -78,7 +78,7 @@
  */
 QLatin1String WidgetBase::baseTypeStr() const
 {
-    return QLatin1String(ENUM_NAME(WidgetBase, Widget_Type, m_Type));
+    return QLatin1String(ENUM_NAME(WidgetBase, WidgetType, m_Type));
 }
 
 /**
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/widgetbase.h #1238542:1238543
@@ -30,10 +30,10 @@
 class WidgetBase : public QObject
 {
     Q_OBJECT
-    Q_ENUMS(Widget_Type)
+    Q_ENUMS(WidgetType)
 
 public:
-    enum Widget_Type
+    enum WidgetType
     {
         wt_UMLWidget = 300,         // does not have UMLObject representation
         wt_Actor,                   // has UMLObject representation
@@ -75,8 +75,8 @@
     Uml::IDType id() const;
     void setID(Uml::IDType id);
 
-    Widget_Type baseType() const;
-    void setBaseType(Widget_Type type);
+    WidgetType baseType() const;
+    void setBaseType(WidgetType type);
     QLatin1String baseTypeStr() const;
 
     UMLView* umlScene() const;
@@ -101,9 +101,9 @@
     virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
 
 protected:
-    void init(UMLView *view, Widget_Type type = wt_UMLWidget);
+    void init(UMLView *view, WidgetType type = wt_UMLWidget);
 
-    Widget_Type m_Type;  ///< Type of widget.
+    WidgetType  m_Type;  ///< Type of widget.
     UMLView    *m_pView;
     UMLObject  *m_pObject;
     QString     m_Doc;   ///< Only used if m_pObject is not set.




More information about the umbrello-devel mailing list