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

Ralf Habacker ralf.habacker at gmail.com
Tue Dec 13 14:09:55 UTC 2011


SVN commit 1268463 by habacker:

init() is private by default, place it in the private section

 M  +17 -17    entitywidget.cpp  
 M  +3 -1      entitywidget.h  
 M  +20 -20    enumwidget.cpp  
 M  +1 -2      enumwidget.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/entitywidget.cpp #1268462:1268463
@@ -47,23 +47,6 @@
 }
 
 /**
- * Initializes key variables of the class.
- */
-void EntityWidget::init()
-{
-    UMLWidget::setBaseType(WidgetBase::wt_Entity);
-    setSize(100, 30);
-
-    //set defaults from m_pView
-    if (m_pView) {
-        //check to see if correct
-        //const Settings::OptionState& ops = m_pView->getOptionState();
-    }
-    if (! UMLApp::app()->document()->loading())
-        updateComponentSize();
-}
-
-/**
  * Draws the entity as a rectangle with a box underneith with a list of literals
  */
 void EntityWidget::draw(QPainter& p, int offsetX, int offsetY)
@@ -260,3 +243,20 @@
 
     return QSize(width, height);
 }
+
+/**
+ * Initializes key variables of the class.
+ */
+void EntityWidget::init()
+{
+    UMLWidget::setBaseType(WidgetBase::wt_Entity);
+    setSize(100, 30);
+
+    //set defaults from m_pView
+    if (m_pView) {
+        //check to see if correct
+        //const Settings::OptionState& ops = m_pView->getOptionState();
+    }
+    if (! UMLApp::app()->document()->loading())
+        updateComponentSize();
+}
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/entitywidget.h #1268462:1268463
@@ -34,7 +34,6 @@
     explicit EntityWidget(UMLView* view, UMLObject* o);
     virtual ~EntityWidget();
 
-    void init();
 
     virtual void draw(QPainter& p, int offsetX, int offsetY);
 
@@ -47,6 +46,9 @@
 protected:
     QSize calculateSize();
 
+private:
+    void init();
+
 };
 
 #endif
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/enumwidget.cpp #1268462:1268463
@@ -44,26 +44,6 @@
 }
 
 /**
- * Initializes key variables of the class.
- */
-void EnumWidget::init()
-{
-    UMLWidget::setBaseType(WidgetBase::wt_Enum);
-    setSize(100, 30);
-    //set defaults from m_pView
-    if (m_pView) {
-        //check to see if correct
-        const Settings::OptionState& ops = m_pView->optionState();
-        m_bShowPackage = ops.classState.showPackage;
-    } else {
-        // For completeness only. Not supposed to happen.
-        m_bShowPackage = false;
-    }
-    if (! UMLApp::app()->document()->loading())
-        updateComponentSize();
-}
-
-/**
  * Returns the status of whether to show Package.
  *
  * @return  True if package is shown.
@@ -267,3 +247,23 @@
 
     return QSize(width, height);
 }
+
+/**
+ * Initializes key variables of the class.
+ */
+void EnumWidget::init()
+{
+    UMLWidget::setBaseType(WidgetBase::wt_Enum);
+    setSize(100, 30);
+    //set defaults from m_pView
+    if (m_pView) {
+        //check to see if correct
+        const Settings::OptionState& ops = m_pView->optionState();
+        m_bShowPackage = ops.classState.showPackage;
+    } else {
+        // For completeness only. Not supposed to happen.
+        m_bShowPackage = false;
+    }
+    if (! UMLApp::app()->document()->loading())
+        updateComponentSize();
+}
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/enumwidget.h #1268462:1268463
@@ -33,8 +33,6 @@
     EnumWidget(UMLView* view, UMLObject* o);
     ~EnumWidget();
 
-    void init();
-
     // TODO: is this a generic pattern and should be moved to a base class ? 
     bool getShowPackage() const;
     void setShowPackage(bool _status);
@@ -54,6 +52,7 @@
     bool m_bShowPackage;
 
 private:
+    void init();
 
 };
 




More information about the umbrello-devel mailing list