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

Gopala Krishna A krishna.ggk at gmail.com
Thu Aug 28 17:37:29 UTC 2008


SVN commit 854026 by gopala:

Patch by Andi. The branch is now 100% q3canvas codefree!! Yay.
Also there are some cosmetic changes.



 M  +5 -4      associationwidget.cpp  
 M  +3 -8      associationwidget.h  
 M  +52 -28    toolbarstate.cpp  
 M  +2 -3      toolbarstatearrow.cpp  
 M  +4 -2      toolbarstateassociation.cpp  


--- branches/work/soc-umbrello/umbrello/associationwidget.cpp #854025:854026
@@ -1,5 +1,4 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
@@ -11,16 +10,18 @@
 
 // own header
 #include "associationwidget.h"
+
 // system includes
 #include <cstdlib>
 #include <cmath>
-// qt/kde includes
-#include <q3canvas.h>
+
+// qt includes
 #include <QRegExpValidator>
-//Added by qt3to4:
 #include <QGraphicsSceneMouseEvent>
 #include <QMoveEvent>
 #include <QApplication>
+
+// kde includes
 #include <kdebug.h>
 #include <klocale.h>
 #include <kinputdialog.h>
--- branches/work/soc-umbrello/umbrello/associationwidget.h #854025:854026
@@ -1,11 +1,10 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2002-2006                                               *
+ *   copyright (C) 2002-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -18,14 +17,8 @@
 #include "messagewidgetlist.h"
 #include "associationwidgetlist.h"
 #include "linepath.h"
-//Added by qt3to4:
-#include <QPixmap>
-#include <QGraphicsSceneMouseEvent>
-#include <QMoveEvent>
 
 class ListPopupMenu;
-class QPixmap;
-class Q3CanvasLine;
 class ClassifierWidget;
 class UMLDoc;
 class UMLView;
@@ -33,6 +26,8 @@
 class UMLClassifierListItem;
 class UMLAttribute;
 class UMLOperation;
+class QMoveEvent;
+class QGraphicsSceneMouseEvent;
 
 /**
  * This class represents an association inside a diagram.
--- branches/work/soc-umbrello/umbrello/toolbarstate.cpp #854025:854026
@@ -1,11 +1,10 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2004-2006                                               *
+ *   copyright (C) 2004-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -14,6 +13,7 @@
 
 // qt includes
 #include <qwmatrix.h> // need for inverseWorldMatrix.map
+#include <QtGui/QGraphicsSceneMouseEvent>
 
 // app includes
 #include "associationwidget.h"
@@ -24,11 +24,13 @@
 #include "umlscene.h"
 #include "umlwidget.h"
 
-ToolBarState::~ToolBarState() {
+ToolBarState::~ToolBarState()
+{
     delete m_pMouseEvent;
 }
 
-void ToolBarState::init() {
+void ToolBarState::init()
+{
     // [PORT]
     // m_pUMLScene->viewport()->setMouseTracking(false);
     m_pMouseEvent = 0;
@@ -41,14 +43,16 @@
             this, SLOT(slotWidgetRemoved(NewUMLRectWidget*)));
 }
 
-void ToolBarState::cleanBeforeChange() {
+void ToolBarState::cleanBeforeChange()
+{
     disconnect(m_pUMLScene, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
                this, SLOT(slotAssociationRemoved(AssociationWidget*)));
     disconnect(m_pUMLScene, SIGNAL(sigWidgetRemoved(NewUMLRectWidget*)),
                this, SLOT(slotWidgetRemoved(NewUMLRectWidget*)));
 }
 
-void ToolBarState::mousePress(QGraphicsSceneMouseEvent* ome) {
+void ToolBarState::mousePress(QGraphicsSceneMouseEvent* ome)
+{
     setMouseEvent(ome, QEvent::MouseButtonPress);
 
     // [PORT]
@@ -75,7 +79,8 @@
     }
 }
 
-void ToolBarState::mouseRelease(QGraphicsSceneMouseEvent* ome) {
+void ToolBarState::mouseRelease(QGraphicsSceneMouseEvent* ome)
+{
     setMouseEvent(ome, QEvent::MouseButtonRelease);
 
     // Set the position of the mouse
@@ -101,7 +106,8 @@
     changeTool();
 }
 
-void ToolBarState::mouseDoubleClick(QGraphicsSceneMouseEvent* ome) {
+void ToolBarState::mouseDoubleClick(QGraphicsSceneMouseEvent* ome)
+{
     setMouseEvent(ome, QEvent::MouseButtonDblClick);
 
 // [PORT] Check if scenePos fits in here
@@ -121,7 +127,8 @@
     }
 }
 
-void ToolBarState::mouseMove(QGraphicsSceneMouseEvent* ome) {
+void ToolBarState::mouseMove(QGraphicsSceneMouseEvent* ome)
+{
     setMouseEvent(ome, QEvent::MouseMove);
 
     if (getCurrentWidget()) {
@@ -152,13 +159,15 @@
 #endif
 }
 
-void ToolBarState::slotAssociationRemoved(AssociationWidget* association) {
+void ToolBarState::slotAssociationRemoved(AssociationWidget* association)
+{
     if (association == getCurrentAssociation()) {
         setCurrentAssociation(0);
     }
 }
 
-void ToolBarState::slotWidgetRemoved(NewUMLRectWidget* widget) {
+void ToolBarState::slotWidgetRemoved(NewUMLRectWidget* widget)
+{
     if (widget == getCurrentWidget()) {
         setCurrentWidget(0);
     }
@@ -215,45 +224,58 @@
     }
 }
 
-void ToolBarState::mousePressAssociation() {
+void ToolBarState::mousePressAssociation()
+{
 }
 
-void ToolBarState::mousePressWidget() {
+void ToolBarState::mousePressWidget()
+{
 }
 
-void ToolBarState::mousePressEmpty() {
+void ToolBarState::mousePressEmpty()
+{
     m_pUMLScene->clearSelected();
 }
 
-void ToolBarState::mouseReleaseAssociation() {
+void ToolBarState::mouseReleaseAssociation()
+{
 }
 
-void ToolBarState::mouseReleaseWidget() {
+void ToolBarState::mouseReleaseWidget()
+{
 }
 
-void ToolBarState::mouseReleaseEmpty() {
+void ToolBarState::mouseReleaseEmpty()
+{
 }
 
-void ToolBarState::mouseDoubleClickAssociation() {
+void ToolBarState::mouseDoubleClickAssociation()
+{
 }
 
-void ToolBarState::mouseDoubleClickWidget() {
+void ToolBarState::mouseDoubleClickWidget()
+{
 }
 
-void ToolBarState::mouseDoubleClickEmpty() {
+void ToolBarState::mouseDoubleClickEmpty()
+{
     m_pUMLScene->clearSelected();
 }
 
-void ToolBarState::mouseMoveAssociation() {
+void ToolBarState::mouseMoveAssociation()
+{
 }
 
-void ToolBarState::mouseMoveWidget() {
+void ToolBarState::mouseMoveWidget()
+{
 }
 
-void ToolBarState::mouseMoveEmpty() {
+void ToolBarState::mouseMoveEmpty()
+{
 }
 
-void ToolBarState::changeTool() {
+void ToolBarState::changeTool()
+{
     // [PORT] Check if button works well instead of state()
     if (m_pMouseEvent->button() == Qt::RightButton) {
         UMLApp::app()->getWorkToolBar()->setDefaultTool();
@@ -278,7 +300,8 @@
     m_pMouseEvent->setModifiers(ome->modifiers());
 }
 
-MessageWidget* ToolBarState::getMessageAt(const QPointF& pos) {
+MessageWidget* ToolBarState::getMessageAt(const QPointF& pos)
+{
     foreach (  MessageWidget* message, m_pUMLScene->getMessageList() ) {
         if (message->isVisible() && message->onWidget(pos)) {
             return message;
@@ -288,8 +311,8 @@
     return 0;
 }
 
-AssociationWidget* ToolBarState::getAssociationAt(const QPointF& pos) {
-
+AssociationWidget* ToolBarState::getAssociationAt(const QPointF& pos)
+{
     foreach ( AssociationWidget* association, m_pUMLScene->getAssociationList() ) {
         if (association->onAssociation(pos)) {
             return association;
@@ -299,7 +322,8 @@
     return 0;
 }
 
-FloatingDashLineWidget* ToolBarState::getFloatingLineAt(const QPointF& pos) {
+FloatingDashLineWidget* ToolBarState::getFloatingLineAt(const QPointF& pos)
+{
     FloatingDashLineWidget* floatingline = 0;
 
     foreach ( NewUMLRectWidget* widget, m_pUMLScene->getWidgetList() ) {
--- branches/work/soc-umbrello/umbrello/toolbarstatearrow.cpp #854025:854026
@@ -1,11 +1,10 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2004-2006                                               *
+ *   copyright (C) 2004-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -13,7 +12,7 @@
 #include "toolbarstatearrow.h"
 
 // qt includes
-#include <QMouseEvent>
+#include <QtGui/QGraphicsSceneMouseEvent>
 
 // app includes
 #include "associationwidget.h"
--- branches/work/soc-umbrello/umbrello/toolbarstateassociation.cpp #854025:854026
@@ -1,11 +1,10 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2004-2007                                               *
+ *   copyright (C) 2004-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -31,6 +30,9 @@
 #include "umldoc.h"
 #include "umlwidget.h"
 
+// qt includes
+#include <QtGui/QGraphicsSceneMouseEvent>
+
 using namespace Uml;
 
 ToolBarStateAssociation::ToolBarStateAssociation(UMLScene *umlScene) :




More information about the umbrello-devel mailing list