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

Andi Fischer andi.fischer at hispeed.ch
Fri Nov 9 23:07:17 UTC 2012


SVN commit 1324675 by fischer:

Some changes from trunk applied.

 M  +1 -0      listpopupmenu.cpp  
 M  +1 -0      listpopupmenu.h  
 M  +1 -1      toolbarstateassociation.h  
 M  +2 -2      toolbarstatemessages.cpp  
 M  +1 -1      toolbarstatemessages.h  
 M  +14 -13    umlcanvasobject.cpp  
 M  +0 -1      umlscene.h  
 M  +1 -1      umlviewimageexportermodel.cpp  


--- branches/work/soc-umbrello/umbrello/listpopupmenu.cpp #1324674:1324675
@@ -843,6 +843,7 @@
     else if (Model_Utils::isCloneable(type))
         insert(mt_Clone);
     insert(mt_Delete);
+    insert(mt_Resize, i18n("Resize"));
 }
 
 /**
--- branches/work/soc-umbrello/umbrello/listpopupmenu.h #1324674:1324675
@@ -189,6 +189,7 @@
         mt_Change_Font_Selection,
         mt_SnapToGrid,
         mt_ShowSnapGrid,
+        mt_Resize,
         mt_Activity_Selected,
         mt_New_Activity,
         mt_Up,
--- branches/work/soc-umbrello/umbrello/toolbarstateassociation.h #1324674:1324675
@@ -77,7 +77,7 @@
      * The association line shown while the first widget is selected and the
      * second one wasn't selected yet.
      */
-    UMLSceneLineItem* m_associationLine;
+    QGraphicsLineItem* m_associationLine;
 
 };
 
--- branches/work/soc-umbrello/umbrello/toolbarstatemessages.cpp #1324674:1324675
@@ -191,7 +191,7 @@
         xclick = m_pMouseEvent->scenePos().x();
         yclick = m_pMouseEvent->scenePos().y();
 
-        m_messageLine = new UMLSceneLineItem();
+        m_messageLine = new QGraphicsLineItem();
         m_pUMLScene->addItem(m_messageLine);
         qreal x = m_pMouseEvent->scenePos().x(), y = m_pMouseEvent->scenePos().y();
         m_messageLine->setLine(x, y, x, y);
@@ -224,7 +224,7 @@
         yclick = 0;
     }
     else {
-        m_messageLine = new UMLSceneLineItem();
+        m_messageLine = new QGraphicsLineItem();
         m_pUMLScene->addItem(m_messageLine);
         qreal x = m_pMouseEvent->scenePos().x();
         qreal y = m_pMouseEvent->scenePos().y();
--- branches/work/soc-umbrello/umbrello/toolbarstatemessages.h #1324674:1324675
@@ -99,7 +99,7 @@
      * The message line shown while the first widget is selected and the
      * second one wasn't selected yet.
      */
-    UMLSceneLineItem* m_messageLine;
+    QGraphicsLineItem* m_messageLine;
 
     /**
      * If there is a current widget, it is true if the press event happened on
--- branches/work/soc-umbrello/umbrello/umlcanvasobject.cpp #1324674:1324675
@@ -35,6 +35,7 @@
 UMLCanvasObject::UMLCanvasObject(const QString & name, Uml::IDType id)
   : UMLObject(name, id)
 {
+    DEBUG_REGISTER_DISABLED(DBG_SRC);
 }
 
 /**
@@ -47,7 +48,7 @@
     //  It should have been called explicitly before destructing the
     //  UMLCanvasObject.
     if (associations())
-        uDebug() << "UMLCanvasObject destructor: FIXME: there are still associations()";
+        DEBUG(DBG_SRC) << "UMLCanvasObject destructor: FIXME: there are still associations()";
 }
 
 /**
@@ -102,7 +103,7 @@
 bool UMLCanvasObject::hasAssociation(UMLAssociation* assoc)
 {
     uint cnt = m_List.count(assoc);
-    uDebug() << "count is " << cnt;
+    DEBUG(DBG_SRC) << "count is " << cnt;
     return (cnt > 0);
 }
 
@@ -115,7 +116,7 @@
 int UMLCanvasObject::removeAssociationEnd(UMLAssociation * assoc)
 {
     if (!hasAssociation(assoc) || !m_List.removeAll(assoc)) {
-        uDebug() << "can not find given assoc " << assoc << " in list";
+        DEBUG(DBG_SRC) << "can not find given assoc " << assoc << " in list";
         return -1;
     }
     UMLApp::app()->document()->removeAssociation(assoc, false);
@@ -142,17 +143,17 @@
         UMLCanvasObject *roleAObj = dynamic_cast<UMLCanvasObject*>(objA);
         if (roleAObj) {
             roleAObj->removeAssociationEnd(assoc);
-        } else if (objA)
-            uDebug() << name() << ": objA " << objA->name() << " is not a UMLCanvasObject";
-        else
-            uDebug() << name() << "): objA is NULL";
+        } else if (objA) {
+            DEBUG(DBG_SRC) << name() << ": objA " << objA->name() << " is not a UMLCanvasObject";
+        } else
+            DEBUG(DBG_SRC) << name() << "): objA is NULL";
         UMLCanvasObject *roleBObj = dynamic_cast<UMLCanvasObject*>(objB);
         if (roleBObj) {
             roleBObj->removeAssociationEnd(assoc);
-        } else if (objB)
-            uDebug() << name() << "): objB " << objB->name() << " is not a UMLCanvasObject";
-        else
-            uDebug() << name() << "): objB is NULL";
+        } else if (objB) {
+            DEBUG(DBG_SRC) << name() << "): objB " << objB->name() << " is not a UMLCanvasObject";
+        } else
+            DEBUG(DBG_SRC) << name() << "): objB is NULL";
     }
 }
 
@@ -368,7 +369,7 @@
         if (c)
             list.append(c);
         else
-            uDebug() << name() << ": generalization's other end is not a "
+            DEBUG(DBG_SRC) << name() << ": generalization's other end is not a "
                 << "UMLClassifier (id= " << ID2STR(a->getObjectId(Uml::B)) << ")";
     }
     return list;
@@ -395,7 +396,7 @@
         if (c)
             list.append(c);
         else
-            uDebug() << "specialization's other end is not a UMLClassifier"
+            DEBUG(DBG_SRC) << "specialization's other end is not a UMLClassifier"
                 << " (id=" << ID2STR(a->getObjectId(Uml::A)) << ")";
     }
     return list;
--- branches/work/soc-umbrello/umbrello/umlscene.h #1324674:1324675
@@ -72,7 +72,6 @@
 typedef QGraphicsSceneDragDropEvent UMLSceneDragEnterEvent;
 typedef QGraphicsSceneDragDropEvent UMLSceneDragMoveEvent;
 
-typedef QGraphicsLineItem UMLSceneLineItem;
 typedef QGraphicsRectItem UMLSceneRectItem;
 typedef QGraphicsEllipseItem UMLSceneEllipse;
 
--- branches/work/soc-umbrello/umbrello/umlviewimageexportermodel.cpp #1324674:1324675
@@ -476,7 +476,7 @@
     //      do not have it and it forces a resize of the widgets,
     //      which is not correctly implemented for now.
 
-    painter.translate(-rect.x(),-rect.y());
+    painter.translate(0, 0);
     scene->getDiagram(painter, rect);
     painter.end();
 




More information about the umbrello-devel mailing list