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

Ralf Habacker ralf.habacker at gmail.com
Sun Apr 1 22:48:52 UTC 2012


SVN commit 1287871 by habacker:

Reduced differences to trunk.

 M  +7 -7      umlscene.cpp  
 M  +2 -2      umlscene.h  


--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1287870:1287871
@@ -1208,7 +1208,7 @@
  *
  * @return Returns the smallest area to print.
  */
-QRectF UMLScene::diagramRect()
+UMLSceneRect UMLScene::diagramRect()
 {
     return itemsBoundingRect();
 }
@@ -1219,7 +1219,7 @@
  * @param atPos   the mouse position on the scene
  * @return true if there is a widget or an association line
  */
-bool UMLScene::isWidgetOrAssociation(const QPointF& atPos)
+bool UMLScene::isWidgetOrAssociation(const UMLScenePoint& atPos)
 {
     UMLWidget* widget = widgetAt(atPos);
     if (widget) {
@@ -1617,7 +1617,7 @@
 void UMLScene::selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
 {
     clearSelected();
-    QRectF rect = QRectF(QPointF(px, py), QPointF(qx, qy)).normalized();
+    UMLSceneRect rect = UMLSceneRect(UMLScenePoint(px, py), UMLScenePoint(qx, qy)).normalized();
     QPainterPath path;
     path.addRect(rect);
     setSelectionArea(path);
@@ -1626,7 +1626,7 @@
 /**
  * Paint diagram to the paint device
  */
-void  UMLScene::getDiagram(const QRectF &rect, QPixmap & diagram)
+void  UMLScene::getDiagram(const UMLSceneRect &rect, QPixmap & diagram)
 {
     QPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
     QPainter painter(&pixmap);
@@ -1638,7 +1638,7 @@
 /**
  * Paint diagram to the paint device
  */
-void  UMLScene::getDiagram(const QRectF &area, QPainter & painter)
+void  UMLScene::getDiagram(const UMLSceneRect &area, QPainter & painter)
 {
     DEBUG(DBG_SRC) << "area=" << area << ", painter=" << painter.window();
     //TODO unselecting and selecting later doesn't work now as the selection is
@@ -3361,7 +3361,7 @@
  * Only call this straight after the event, the value won't stay valid.
  * Should only be called by Assoc widgets at the moment. no one else needs it.
  */
-QPointF UMLScene::getPastePoint()
+UMLScenePoint UMLScene::getPastePoint()
 {
     return m_PastePoint - m_Pos;
 }
@@ -3748,7 +3748,7 @@
  */
 void UMLScene::resizeCanvasToItems()
 {
-    QRectF rect = itemsBoundingRect();
+    UMLSceneRect rect = itemsBoundingRect();
     //Make sure (0,0) is in the topLeft
     rect.setTopLeft(QPointF(0, 0));
     setSceneRect(rect);
--- branches/work/soc-umbrello/umbrello/umlscene.h #1287870:1287871
@@ -376,7 +376,7 @@
 
     void selectWidgetsOfAssoc (AssociationWidget * a);
 
-    QRectF diagramRect();
+    UMLSceneRect diagramRect();
 
     void makeSelected (UMLWidget * uw);
 
@@ -425,7 +425,7 @@
                                          UMLForeignKeyConstraint* fkConstraint,
                                          UMLWidget* widget);
 
-    bool isWidgetOrAssociation(const QPointF& atPos);
+    bool isWidgetOrAssociation(const UMLScenePoint& atPos);
 
 public slots:
     void slotToolBarChanged(int c);




More information about the umbrello-devel mailing list