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

Ralf Habacker ralf.habacker at gmail.com
Tue Apr 3 06:47:14 UTC 2012


SVN commit 1288054 by habacker:

Use UMLSceneSize instead of QSizeF to reduce differences to trunk.

 M  +1 -0      umlscene.h  
 M  +4 -4      widgets/umlwidget.cpp  
 M  +6 -7      widgets/umlwidget.h  


--- branches/work/soc-umbrello/umbrello/umlscene.h #1288053:1288054
@@ -62,6 +62,7 @@
 // base types
 typedef QPointF UMLScenePoint;
 typedef QRectF UMLSceneRect;
+typedef QSizeF UMLSceneSize;
 typedef qreal UMLSceneValue;
 // event types
 typedef QGraphicsSceneMouseEvent UMLSceneMouseEvent;
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.cpp #1288053:1288054
@@ -37,8 +37,8 @@
 #include <QtCore/QPointer>
 #include <QtGui/QDialog>
 
-const QSizeF UMLWidget::DefaultMinimumSize(50, 20);
-const QSizeF UMLWidget::DefaultMaximumSize(1000, 1000);
+const UMLSceneSize UMLWidget::DefaultMinimumSize(50, 20);
+const UMLSceneSize UMLWidget::DefaultMaximumSize(1000, 1000);
 
 /**
  * Construct a UMLWidget using an id.
@@ -108,7 +108,7 @@
  * the geometry. The geometry should be explicitly updated using
  * WidgetBase::updateGeometry()
  */
-void UMLWidget::setMinimumSize(const QSizeF& newSize, SizeHintOption option)
+void UMLWidget::setMinimumSize(const UMLSceneSize& newSize, SizeHintOption option)
 {
     m_minimumSize = newSize;
     if (option == AddMargin) {
@@ -131,7 +131,7 @@
  * the geometry. The geometry should be explicitly updated using
  * WidgetBase::updateGeometry()
  */
-void UMLWidget::setMaximumSize(const QSizeF& newSize, SizeHintOption option)
+void UMLWidget::setMaximumSize(const UMLSceneSize& newSize, SizeHintOption option)
 {
     m_maximumSize = newSize;
     if (option == AddMargin) {
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.h #1288053:1288054
@@ -53,7 +53,6 @@
     Q_PROPERTY(bool showStereotype READ showStereotype WRITE setShowStereotype)
 
 public:
-
     /**
      * This enum presents options for @ref setMinimumSize and @ref
      * setMaximumSize methods.
@@ -62,24 +61,24 @@
         DontAddMargin,
         AddMargin ///< adds 2 * margin() to width and height
     };
-    static const QSizeF DefaultMinimumSize;
-    static const QSizeF DefaultMaximumSize;
+    static const UMLSceneSize DefaultMinimumSize;
+    static const UMLSceneSize DefaultMaximumSize;
 
     explicit UMLWidget(WidgetType type = wt_UMLWidget, Uml::IDType id = 0);
     UMLWidget(WidgetType type, UMLObject *object);
     virtual ~UMLWidget();
 
     /// @return The minimum size for this widget.
-    QSizeF minimumSize() const {
+    UMLSceneSize minimumSize() const {
         return m_minimumSize;
     }
-    void setMinimumSize(const QSizeF& newSize, SizeHintOption option = DontAddMargin);
+    void setMinimumSize(const UMLSceneSize& newSize, SizeHintOption option = DontAddMargin);
 
     /// @return The maximum size for this widget.
-    QSizeF maximumSize() const {
+    UMLSceneSize maximumSize() const {
         return m_maximumSize;
     }
-    void setMaximumSize(const QSizeF& newSize, SizeHintOption option = DontAddMargin);
+    void setMaximumSize(const UMLSceneSize& newSize, SizeHintOption option = DontAddMargin);
 
     /// @return The current size of this widget.
     QSizeF size() const {




More information about the umbrello-devel mailing list