[Uml-devel] branches/work/soc-umbrello/umbrello

Andi Fischer andi.fischer at hispeed.ch
Mon Jun 27 22:54:19 UTC 2011


SVN commit 1238544 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      umlscene.cpp  
 M  +2 -2      widgets/toolbarstateonewidget.cpp  
 M  +1 -1      widgets/toolbarstateonewidget.h  
 M  +4 -4      widgets/widgetbase.cpp  
 M  +5 -5      widgets/widgetbase.h  


--- branches/work/soc-umbrello/umbrello/assocrules.cpp #1238543:1238544
@@ -59,7 +59,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) {
@@ -152,8 +152,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() ) {
@@ -323,7 +323,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 )
@@ -335,7 +335,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 )
@@ -352,8 +352,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 &&
--- branches/work/soc-umbrello/umbrello/assocrules.h #1238543:1238544
@@ -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
--- branches/work/soc-umbrello/umbrello/controller/umlwidgetcontroller.cpp #1238543:1238544
@@ -505,7 +505,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.
  *
--- branches/work/soc-umbrello/umbrello/dialogs/classoptionspage.cpp #1238543:1238544
@@ -28,7 +28,7 @@
   : QWidget(pParent)
 {
     init();
-    //Widget_Type type = pWidget->baseType();
+    //WidgetType type = pWidget->baseType();
     m_pWidget = pWidget;
     setupPage();
 }
@@ -101,7 +101,7 @@
     m_pShowPackageCB->setChecked(m_pWidget->visualProperty(ClassifierWidget::ShowPackage));
     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);
@@ -208,7 +208,7 @@
     m_pWidget->setVisualProperty( ClassifierWidget::ShowVisibility, m_pShowVisibilityCB->isChecked() );
     m_pWidget->setVisualProperty( ClassifierWidget::ShowOperations, m_pShowOpsCB->isChecked() );
     m_pWidget->setVisualProperty( ClassifierWidget::ShowOperationSignature, m_pShowOpSigCB->isChecked() );
-    WidgetBase::Widget_Type type = m_pWidget->baseType();
+    WidgetBase::WidgetType type = m_pWidget->baseType();
     if (type == WidgetBase::wt_Class) {
         m_pWidget->setVisualProperty( ClassifierWidget::ShowStereotype, m_pShowStereotypeCB->isChecked() );
         m_pWidget->setVisualProperty( ClassifierWidget::ShowAttributes, m_pShowAttsCB->isChecked() );
--- branches/work/soc-umbrello/umbrello/listpopupmenu.cpp #1238543:1238544
@@ -287,9 +287,9 @@
     //make menu for logical view
     if (!object)
         return;
-    WidgetBase::Widget_Type type = object->baseType();
+    WidgetBase::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;
@@ -572,7 +572,7 @@
         }
         break;
     default:
-        uWarning() << "unhandled Widget_Type " << type;
+        uWarning() << "unhandled WidgetType " << type;
         break;
     }//end switch
 
@@ -820,12 +820,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();
@@ -922,7 +922,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);
@@ -962,7 +962,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)
--- branches/work/soc-umbrello/umbrello/listpopupmenu.h #1238543:1238544
@@ -248,7 +248,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();
--- branches/work/soc-umbrello/umbrello/model_utils.cpp #1238543:1238544
@@ -46,10 +46,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:
--- branches/work/soc-umbrello/umbrello/model_utils.h #1238543:1238544
@@ -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);
 
--- branches/work/soc-umbrello/umbrello/toolbarstateassociation.cpp #1238543:1238544
@@ -211,7 +211,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);
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1238543:1238544
@@ -1042,7 +1042,7 @@
 
     removeAssociations(o);
 
-    WidgetBase::Widget_Type t = o->baseType();
+    WidgetBase::WidgetType t = o->baseType();
     if (type() == DiagramType::Sequence && t == WidgetBase::wt_Object) {
         checkMessages(static_cast<ObjectWidget*>(o));
     }
@@ -1360,7 +1360,7 @@
 {
     // loop through all selected items
     foreach(UMLWidget *temp , selectedWidgets()) {
-        WidgetBase::Widget_Type type = temp->baseType();
+        WidgetBase::WidgetType type = temp->baseType();
         ClassifierWidget *cw = dynamic_cast<ClassifierWidget*>(temp);
 
         // toggle the show setting sel
@@ -1788,7 +1788,7 @@
     if (pWidget->scene() != this) {
         addItem(pWidget);
     }
-    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));
@@ -3440,7 +3440,7 @@
 void UMLScene::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();
@@ -3504,7 +3504,7 @@
 
     // get the first item and its base type
     UMLWidget * pTemp = (UMLWidget *) selectedWidgets().first();
-    WidgetBase::Widget_Type tmpType = pTemp->baseType();
+    WidgetBase::WidgetType tmpType = pTemp->baseType();
 
     // check all selected items, if they have the same BaseType
     foreach(pTemp, selectedWidgets()) {
--- branches/work/soc-umbrello/umbrello/widgets/toolbarstateonewidget.cpp #1238543:1238544
@@ -126,7 +126,7 @@
  */
 void ToolBarStateOneWidget::mouseReleaseWidget()
 {
-    WidgetBase::Widget_Type type = widgetType();
+    WidgetBase::WidgetType type = widgetType();
 
     if (type == WidgetBase::wt_Precondition) {
         m_firstObject = 0;
@@ -204,7 +204,7 @@
  *
  * @return The widget type of this tool.
  */
-WidgetBase::Widget_Type ToolBarStateOneWidget::widgetType()
+WidgetBase::WidgetType ToolBarStateOneWidget::widgetType()
 {
     if (getButton() == WorkToolBar::tbb_Seq_Precondition) {
         return WidgetBase::wt_Precondition;
--- branches/work/soc-umbrello/umbrello/widgets/toolbarstateonewidget.h #1238543:1238544
@@ -54,7 +54,7 @@
 
     void setWidget(UMLWidget* firstObject);
 
-    WidgetBase::Widget_Type widgetType();
+    WidgetBase::WidgetType widgetType();
 
     UMLWidget* m_firstObject;  ///< The first object in the message.
 
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.cpp #1238543:1238544
@@ -226,7 +226,7 @@
 /**
  * @return The type used for rtti.
  */
-WidgetBase::Widget_Type WidgetBase::baseType() const
+WidgetBase::WidgetType WidgetBase::baseType() const
 {
     return m_baseType;
 }
@@ -236,7 +236,7 @@
  */
 QLatin1String WidgetBase::baseTypeStr() const
 {
-    return QLatin1String(ENUM_NAME(WidgetBase, Widget_Type, m_baseType));
+    return QLatin1String(ENUM_NAME(WidgetBase, WidgetType, m_baseType));
 }
 
 /**
@@ -854,7 +854,7 @@
 /**
  * @return Whether the widget type has an associated UMLObject
  */
-bool WidgetBase::widgetHasUMLObject(Widget_Type type)
+bool WidgetBase::widgetHasUMLObject(WidgetType type)
 {
     switch(type)
     {
@@ -891,7 +891,7 @@
     QColor newColour;
     WidgetBase* widget = 0; // use for select the first object properties (fill, line color)
 
-    const Widget_Type wt = m_baseType; // short hand name
+    const WidgetType wt = m_baseType; // short hand name
 
     ListPopupMenu *menu = ListPopupMenu::menuFromAction(trigger);
     if (!menu) {
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.h #1238543:1238544
@@ -59,10 +59,10 @@
     Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
     Q_PROPERTY(QFont font READ font WRITE setFont)
     Q_PROPERTY(QPointF pos READ pos WRITE setPos)
-    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
@@ -136,7 +136,7 @@
     Uml::IDType id() const;
     void setID(Uml::IDType id);
 
-    Widget_Type baseType() const;
+    WidgetType baseType() const;
     QLatin1String baseTypeStr() const;
 
     UMLScene* umlScene() const;
@@ -195,7 +195,7 @@
     virtual bool loadFromXMI(QDomElement &qElement);
     virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement);
 
-    static bool widgetHasUMLObject(Widget_Type type);
+    static bool widgetHasUMLObject(WidgetType type);
 
 public Q_SLOTS:
     virtual void slotMenuSelection(QAction *trigger);
@@ -231,7 +231,7 @@
      */
     QVariantMap m_loadData;
     // Property that will be saved.
-    Widget_Type m_baseType;
+    WidgetType m_baseType;
 
 private:
     UMLObject *m_umlObject;




More information about the umbrello-devel mailing list