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

Ralf Habacker ralf.habacker at gmail.com
Sun Apr 1 09:19:09 UTC 2012


SVN commit 1287805 by habacker:

Changed some QPoint references to UMLScenePoint to reduce soc-umbrello branch differences.

 M  +6 -6      umlscene.cpp  
 M  +9 -9      umlscene.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.cpp #1287804:1287805
@@ -144,7 +144,7 @@
     m_bPopupShowing = false;
     m_bStartedCut = false;
     //clear pointers
-    m_PastePoint = QPoint(0, 0);
+    m_PastePoint = UMLScenePoint(0, 0);
     m_pIDChangesLog = 0;
     m_pMenu = 0;
 
@@ -981,7 +981,7 @@
  * @return The widget thats line was clicked on.
  *  Returns 0 if no line was clicked on.
  */
-ObjectWidget * UMLScene::onWidgetLine(const QPoint &point) const
+ObjectWidget * UMLScene::onWidgetLine(const UMLScenePoint &point) const
 {
     foreach(UMLWidget* obj, m_WidgetList) {
         ObjectWidget *ow = dynamic_cast<ObjectWidget*>(obj);
@@ -1006,7 +1006,7 @@
  * @return The widget thats destruction box was clicked on.
  *  Returns 0 if no destruction box was clicked on.
  */
-ObjectWidget * UMLScene::onWidgetDestructionBox(const QPoint &point) const
+ObjectWidget * UMLScene::onWidgetDestructionBox(const UMLScenePoint &point) const
 {
     foreach(UMLWidget* obj,  m_WidgetList) {
         ObjectWidget *ow = dynamic_cast<ObjectWidget*>(obj);
@@ -1039,7 +1039,7 @@
  * Returns NULL if the point is not inside any widget.
  * Does not use or modify the m_pOnWidget member.
  */
-UMLWidget *UMLScene::widgetAt(const QPoint& p)
+UMLWidget *UMLScene::widgetAt(const UMLScenePoint& p)
 {
     int relativeSize = 10000;  // start with an arbitrary large number
     UMLWidget  *retObj = NULL;
@@ -3398,9 +3398,9 @@
  * 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.
  */
-QPoint UMLScene::getPastePoint()
+UMLScenePoint UMLScene::getPastePoint()
 {
-    QPoint point = m_PastePoint;
+    UMLScenePoint point = m_PastePoint;
     point.setX(point.x() - m_Pos.x());
     point.setY(point.y() - m_Pos.y());
     return point;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.h #1287804:1287805
@@ -215,7 +215,7 @@
     void setSelected(UMLWidget * w, QMouseEvent * me);
     void clearSelected();
 
-    void moveSelectedBy(int dX, int dY);
+    void moveSelectedBy(UMLSceneValue dX, UMLSceneValue dY);
 
     int getSelectCount(bool filterText = false) const;
 
@@ -264,8 +264,8 @@
 
     void removeAllWidgets();
 
-    void getDiagram(const QRect &rect, QPixmap & diagram);
-    void getDiagram(const QRect &area, QPainter & painter);
+    void getDiagram(const UMLSceneRect &rect, QPixmap & diagram);
+    void getDiagram(const UMLSceneRect &area, QPainter & painter);
 
     void copyAsImage(QPixmap*& pix);
 
@@ -277,7 +277,7 @@
 
     bool addWidget(UMLWidget * pWidget, bool isPasteOperation = false);
 
-    QPoint getPastePoint();
+    UMLScenePoint getPastePoint();
     void resetPastePoint();
 
     void setStartedCut();
@@ -326,16 +326,16 @@
 
     void addObject(UMLObject *object);
 
-    void selectWidgets(int px, int py, int qx, int qy);
+    void selectWidgets(UMLSceneValue px, UMLSceneValue py, UMLSceneValue qx, UMLSceneValue qy);
     void selectWidgetsOfAssoc (AssociationWidget * a);
     void selectWidgets(UMLWidgetList &widgets);
 
-    ObjectWidget * onWidgetLine(const QPoint &point) const;
-    ObjectWidget * onWidgetDestructionBox(const QPoint &point) const;
+    ObjectWidget * onWidgetLine(const UMLScenePoint &point) const;
+    ObjectWidget * onWidgetDestructionBox(const UMLScenePoint &point) const;
 
     UMLWidget* getFirstMultiSelectedWidget() const;
 
-    UMLWidget *widgetAt(const QPoint& p);
+    UMLWidget *widgetAt(const UMLScenePoint& p);
 
     void setupNewWidget(UMLWidget *w);
 
@@ -518,7 +518,7 @@
     /**
      * The offset at which to paste the clipboard.
      */
-    QPoint m_PastePoint;
+    UMLScenePoint m_PastePoint;
 
     /**
      * Pointer to the UMLDoc




More information about the umbrello-devel mailing list