[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Tue Sep 25 16:17:33 UTC 2012
SVN commit 1317716 by fischer:
Unused code removed. Small changes to reduce the diff to gsoc-branch applied.
M +5 -5 umlscene.cpp
M +7 -44 umlscene.h
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.cpp #1317715:1317716
@@ -1482,8 +1482,8 @@
*/
void UMLScene::selectionUseFillColor(bool useFC)
{
- foreach(UMLWidget* temp, selectedWidgets()) {
- temp->setUseFillColor(useFC);
+ foreach(UMLWidget* widget, selectedWidgets()) {
+ widget->setUseFillColor(useFC);
}
}
@@ -1538,9 +1538,9 @@
{
UMLApp::app()->beginMacro(i18n("Change Fill Color"));
- foreach(UMLWidget* temp, selectedWidgets()) {
- temp->setFillColor(color);
- temp->setUsesDiagramFillColor(false);
+ foreach(UMLWidget* widget, selectedWidgets()) {
+ widget->setFillColor(color);
+ widget->setUsesDiagramFillColor(false);
}
UMLApp::app()->endMacro();
}
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.h #1317715:1317716
@@ -24,10 +24,10 @@
// Qt includes
#include <QMouseEvent>
#include <QKeyEvent>
-#include <QtGui/QPixmap>
+#include <QPixmap>
#include <QGraphicsScene>
-#include <qgraphicsitem.h>
-#include <QtXml/QDomDocument>
+#include <QGraphicsItem>
+#include <QDomDocument>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsPolygonItem>
@@ -85,44 +85,8 @@
typedef QGraphicsSceneDragDropEvent UMLSceneDragDropEvent;
typedef QGraphicsSceneDragDropEvent UMLSceneDragEnterEvent;
typedef QGraphicsSceneDragDropEvent UMLSceneDragMoveEvent;
-/**
- * Qt3 migration wrapper for QMouseEvent.
- */
-#if 0
-class UMLSceneMouseEvent : public QGraphicsSceneMouseEvent
-{
-public:
- UMLSceneMouseEvent(Type type, const UMLScenePoint& position, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
- : QGraphicsSceneMouseEvent(type)
- {
- Q_UNUSED(position);
- Q_UNUSED(button);
- Q_UNUSED(buttons);
- Q_UNUSED(modifiers);
- //( position, button, buttons, modifiers)
- }
- UMLSceneMouseEvent(Type type)
- : QGraphicsSceneMouseEvent(type)
- {
- }
- QPoint globalPos() {
- return screenPos();
- }
-
- UMLSceneValue x() const
- {
- return pos().x();
- }
-
- UMLSceneValue y() const
- {
- return pos().y();
- }
-};
-#else
#define UMLSceneMouseEvent QGraphicsSceneMouseEvent
-#endif
class UMLSceneMoveEvent : public QGraphicsSceneMoveEvent
{
@@ -259,8 +223,8 @@
/**
* UMLScene instances represent diagrams.
- * The UMLScene class inherits from Q3Canvas and
- * in the future from QGraphicsScene.
+ * The UMLScene class inherits from QGraphicsScene and it owns the
+ * objects displayed (see m_WidgetList.)
*/
class UMLScene : public QGraphicsScene
{
@@ -543,9 +507,8 @@
// End of methods and members related to loading/saving
////////////////////////////////////////////////////////////////////////
- void closeEvent(QCloseEvent * e);
- void dragEnterEvent(UMLSceneDragEnterEvent* enterEvent);
- void dragMoveEvent(UMLSceneDragMoveEvent* moveEvent);
+ void dragEnterEvent(UMLSceneDragDropEvent* enterEvent);
+ void dragMoveEvent(UMLSceneDragDropEvent* moveEvent);
void dropEvent(UMLSceneDragDropEvent* dropEvent);
void mouseMoveEvent(UMLSceneMouseEvent* mouseEvent);
More information about the umbrello-devel
mailing list