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

Ralf Habacker ralf.habacker at gmail.com
Wed Jan 18 15:29:49 UTC 2012


SVN commit 1274514 by habacker:

minimumSize() implementation should return type wrapper.

 M  +1 -1      actorwidget.cpp  
 M  +1 -1      categorywidget.cpp  
 M  +1 -1      classifierwidget.cpp  
 M  +1 -1      combinedfragmentwidget.cpp  
 M  +2 -2      componentwidget.cpp  
 M  +1 -1      datatypewidget.cpp  
 M  +1 -1      entitywidget.cpp  
 M  +1 -1      enumwidget.cpp  
 M  +1 -1      floatingtextwidget.cpp  
 M  +2 -2      forkjoinwidget.cpp  
 M  +1 -1      nodewidget.cpp  
 M  +1 -1      notewidget.cpp  
 M  +1 -1      objectnodewidget.cpp  
 M  +1 -1      objectwidget.cpp  
 M  +1 -1      packagewidget.cpp  
 M  +1 -1      preconditionwidget.cpp  
 M  +1 -1      regionwidget.cpp  
 M  +1 -1      signalwidget.cpp  
 M  +1 -1      statewidget.cpp  
 M  +1 -1      usecasewidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/actorwidget.cpp #1274513:1274514
@@ -95,7 +95,7 @@
     int width = textWidth > A_WIDTH ? textWidth : A_WIDTH;
     int height = A_HEIGHT + fontHeight + A_MARGIN;
     width += A_MARGIN * 2;
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/categorywidget.cpp #1274513:1274514
@@ -81,7 +81,7 @@
     const int fontHeight = fm.lineSpacing();
     int radius = UC_RADIUS + fontHeight + UC_MARGIN;
 
-    return QSize(radius, radius);
+    return UMLSceneSize(radius, radius);
 }
 
 void CategoryWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/classifierwidget.cpp #1274513:1274514
@@ -412,7 +412,7 @@
     // allow for width margin
     width += MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void ClassifierWidget::slotMenuSelection(QAction* action)
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/combinedfragmentwidget.cpp #1274513:1274514
@@ -176,7 +176,7 @@
     width += COMBINED_FRAGMENT_MARGIN * 2;
     height += COMBINED_FRAGMENT_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 CombinedFragmentWidget::CombinedFragmentType CombinedFragmentWidget::combinedFragmentType() const
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/componentwidget.cpp #1274513:1274514
@@ -122,7 +122,7 @@
 UMLSceneSize ComponentWidget::minimumSize()
 {
     if ( !m_pObject) {
-        return QSize(70, 70);
+        return UMLSceneSize(70, 70);
     }
     const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
     const int fontHeight = fm.lineSpacing();
@@ -145,5 +145,5 @@
 
     int height = (2*fontHeight) + (COMPONENT_MARGIN * 3);
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/datatypewidget.cpp #1274513:1274514
@@ -129,5 +129,5 @@
     //allow for width margin
     width += DATATYPE_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/entitywidget.cpp #1274513:1274514
@@ -241,5 +241,5 @@
     //allow for width margin
     width += ENTITY_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/enumwidget.cpp #1274513:1274514
@@ -257,5 +257,5 @@
     //allow for width margin
     width += ENUM_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/floatingtextwidget.cpp #1274513:1274514
@@ -161,7 +161,7 @@
     const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
     int h = fm.lineSpacing();
     int w = fm.width( displayText() );
-    return QSize(w + 8, h + 4);  // give a small margin
+    return UMLSceneSize(w + 8, h + 4);  // give a small margin
 }
 
 /**
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/forkjoinwidget.cpp #1274513:1274514
@@ -113,9 +113,9 @@
 UMLSceneSize ForkJoinWidget::minimumSize()
 {
     if (m_drawVertical) {
-        return QSize(4, 40);
+        return UMLSceneSize(4, 40);
     } else {
-        return QSize(40, 4);
+        return UMLSceneSize(40, 4);
     }
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/nodewidget.cpp #1274513:1274514
@@ -123,7 +123,7 @@
 
     int height = (2*fontHeight) + DEPTH;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void NodeWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/notewidget.cpp #1274513:1274514
@@ -301,7 +301,7 @@
     else {
         // keep width and height unchanged
     }
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 /**
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/objectnodewidget.cpp #1274513:1274514
@@ -144,7 +144,7 @@
         height += OBJECTNODE_MARGIN * 4;
     }
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 ObjectNodeWidget::ObjectNodeType ObjectNodeWidget::objectNodeType() const
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/objectwidget.cpp #1274513:1274514
@@ -145,7 +145,7 @@
         }
     }//end else drawasactor
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void ObjectWidget::setDrawAsActor( bool drawAsActor )
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/packagewidget.cpp #1274513:1274514
@@ -115,7 +115,7 @@
 
     int height = (lines*fontHeight) + fontHeight + (PACKAGE_MARGIN * 2);
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void PackageWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/preconditionwidget.cpp #1274513:1274514
@@ -108,7 +108,7 @@
     width += PRECONDITION_MARGIN * 2;
     height += PRECONDITION_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void PreconditionWidget::slotMenuSelection(QAction* action)
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/regionwidget.cpp #1274513:1274514
@@ -66,7 +66,7 @@
     width  += REGION_MARGIN * 2;
     height += REGION_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 void RegionWidget::setName(const QString &strName) {
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/signalwidget.cpp #1274513:1274514
@@ -341,7 +341,7 @@
         width  += SIGNAL_MARGIN * 2;
         height += SIGNAL_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 #include "signalwidget.moc"
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/statewidget.cpp #1274513:1274514
@@ -220,7 +220,7 @@
             break;
     }
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }
 
 /**
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/usecasewidget.cpp #1274513:1274514
@@ -84,5 +84,5 @@
 
     width += UC_MARGIN * 2;
 
-    return QSize(width, height);
+    return UMLSceneSize(width, height);
 }




More information about the umbrello-devel mailing list