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

Ralf Habacker ralf.habacker at gmail.com
Fri Dec 16 07:07:10 UTC 2011


SVN commit 1268864 by habacker:

reduced the differences to trunk

 M  +16 -17    toolbarstateonewidget.cpp  
 M  +4 -16     toolbarstateonewidget.h  


--- branches/work/soc-umbrello/umbrello/widgets/toolbarstateonewidget.cpp #1268863:1268864
@@ -1,4 +1,5 @@
 /***************************************************************************
+ *                                                                         *
  *   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,21 +12,21 @@
 // own header
 #include "toolbarstateonewidget.h"
 
-// local includes
+// app includes
+#include "activitywidget.h"
+#include "dialog_utils.h"
 #include "floatingtextwidget.h"
-#include "pinwidget.h"
-#include "preconditionwidget.h"
 #include "messagewidget.h"
 #include "objectwidget.h"
-#include "activitywidget.h"
+#include "pinwidget.h"
+#include "preconditionwidget.h"
 #include "regionwidget.h"
-#include "umlwidget.h"
 #include "uml.h"
 #include "umldoc.h"
 #include "umlscene.h"
-#include "dialog_utils.h"
-#include "umlscene.h"
+#include "umlwidget.h"
 
+// kde includes
 #include <klocale.h>
 #include <kmessagebox.h>
 
@@ -39,7 +40,6 @@
 ToolBarStateOneWidget::ToolBarStateOneWidget(UMLScene *umlScene)
   : ToolBarStatePool(umlScene),
     m_firstObject(0),
-    m_umlScene(umlScene),
     m_isObjectWidgetLine(false)
 {
 }
@@ -52,14 +52,6 @@
 }
 
 /**
- * Goes back to the initial state.
- */
-void ToolBarStateOneWidget::init()
-{
-    ToolBarStatePool::init();
-}
-
-/**
  * Called when the current tool is changed to use another tool.
  * Executes base method and cleans the message.
  */
@@ -194,7 +186,6 @@
 
     if (umlwidget) {
         m_pUMLScene->setupNewWidget(umlwidget);
-
     }
 
 }
@@ -218,4 +209,12 @@
     return WidgetBase::wt_Pin;
 }
 
+/**
+ * Goes back to the initial state.
+ */
+void ToolBarStateOneWidget::init()
+{
+    ToolBarStatePool::init();
+}
+
 #include "toolbarstateonewidget.moc"
--- branches/work/soc-umbrello/umbrello/widgets/toolbarstateonewidget.h #1268863:1268864
@@ -1,4 +1,5 @@
 /***************************************************************************
+ *                                                                         *
  *   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     *
@@ -14,10 +15,6 @@
 #include "toolbarstatepool.h"
 #include "widgetbase.h"
 
-#include <QtGui/QMouseEvent>
-
-class UMLWidget;
-
 /**
  * Sequence tool to create components linked with one object in sequence diagram
  * like precondition.
@@ -28,44 +25,35 @@
 {
     Q_OBJECT
 public:
-
     ToolBarStateOneWidget(UMLScene *umlScene);
     virtual ~ToolBarStateOneWidget();
 
-    virtual void init();
-
     virtual void cleanBeforeChange();
 
     virtual void mouseMove(UMLSceneMouseEvent* ome);
 
-public slots:
-
+public Q_SLOTS:
     virtual void slotWidgetRemoved(UMLWidget* widget);
 
 protected:
-
     virtual void setCurrentElement();
 
     virtual void mouseReleaseWidget();
-
     virtual void mouseReleaseEmpty();
 
-protected:
-
     void setWidget(UMLWidget* firstObject);
-
     WidgetBase::WidgetType widgetType();
 
     UMLWidget* m_firstObject;  ///< The first object in the message.
 
-    UMLScene * m_umlScene;
-
     /**
      * If there is a current widget, it is true if the press event happened on
      * the line of an object, or false if it happened on a normal UMLWidget.
      */
     bool m_isObjectWidgetLine;
 
+private:
+    virtual void init();
 };
 
 #endif //TOOLBARSTATEONEWIDGET_H




More information about the umbrello-devel mailing list