[Uml-devel] KDE/kdesdk/umbrello/umbrello
Ralf Habacker
ralf.habacker at gmail.com
Mon Aug 20 22:04:24 UTC 2012
SVN commit 1312112 by habacker:
Renamed types to UMLScene related ones to reduce differences to soc branch.
M +5 -5 controller/floatingtextwidgetcontroller.cpp
M +2 -1 controller/floatingtextwidgetcontroller.h
M +1 -1 controller/umlwidgetcontroller.cpp
M +2 -2 widgets/seqlinewidget.cpp
M +2 -2 widgets/seqlinewidget.h
M +1 -1 widgets/umlwidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/floatingtextwidgetcontroller.cpp #1312111:1312112
@@ -102,7 +102,7 @@
m_unconstrainedPositionX += diffX;
m_unconstrainedPositionY += diffY;
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ UMLScenePoint constrainedPosition = constrainPosition(diffX, diffY);
int newX = constrainedPosition.x();
int newY = constrainedPosition.y();
@@ -157,7 +157,7 @@
*/
void FloatingTextWidgetController::constrainMovementForAllWidgets(int &diffX, int &diffY)
{
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ UMLScenePoint constrainedPosition = constrainPosition(diffX, diffY);
diffX = constrainedPosition.x() - m_floatingTextWidget->x();
diffY = constrainedPosition.y() - m_floatingTextWidget->y();
@@ -173,9 +173,9 @@
*
* @param diffX The difference between current X position and new X position.
* @param diffY The difference between current Y position and new Y position.
- * @return A QPoint with the constrained new position.
+ * @return A UMLScenePoint with the constrained new position.
*/
-QPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY)
+UMLScenePoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY)
{
UMLSceneValue newX = m_floatingTextWidget->x() + diffX;
UMLSceneValue newY = m_floatingTextWidget->y() + diffY;
@@ -186,6 +186,6 @@
m_floatingTextWidget->textRole());
}
- return QPoint(newX, newY);
+ return UMLScenePoint(newX, newY);
}
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/floatingtextwidgetcontroller.h #1312111:1312112
@@ -11,6 +11,7 @@
#ifndef FLOATINGTEXTWIDGETCONTROLLER_H
#define FLOATINGTEXTWIDGETCONTROLLER_H
+#include "umlscene.h"
#include "umlwidgetcontroller.h"
class FloatingTextWidget;
@@ -54,7 +55,7 @@
private:
- QPoint constrainPosition(int diffX, int diffY);
+ UMLScenePoint constrainPosition(int diffX, int diffY);
/**
* The floating text widget which uses the controller.
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/umlwidgetcontroller.cpp #1312111:1312112
@@ -201,7 +201,7 @@
setSelectionBounds();
}
- QPoint position = getPosition(me);
+ UMLScenePoint position = getPosition(me);
int diffX = position.x() - m_widget->x();
int diffY = position.y() - m_widget->y();
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/seqlinewidget.cpp #1312111:1312112
@@ -53,7 +53,7 @@
* @param p The point to investigate.
* @return Non-zero if point is on this sequence line.
*/
-int SeqLineWidget::onWidget(const QPoint & p)
+int SeqLineWidget::onWidget(const UMLScenePoint & p)
{
int nOnWidget = 0;
UMLScenePoint sp = startPoint();
@@ -74,7 +74,7 @@
* @param p The point to investigate.
* @return Non-zero if point is on the destruction box of this sequence line.
*/
-int SeqLineWidget::onDestructionBox(const QPoint & p)
+int SeqLineWidget::onDestructionBox(const UMLScenePoint & p)
{
int nOnDestructionBox = 0;
int x = m_pObject->x() + m_pObject->width() / 2;
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/seqlinewidget.h #1312111:1312112
@@ -26,9 +26,9 @@
SeqLineWidget(UMLScene *scene, ObjectWidget * pObject);
virtual ~SeqLineWidget();
- int onWidget(const QPoint & p);
+ int onWidget(const UMLScenePoint & p);
- int onDestructionBox(const QPoint & p);
+ int onDestructionBox(const UMLScenePoint & p);
void cleanup();
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.h #1312111:1312112
@@ -232,7 +232,7 @@
virtual void moveEvent(QMoveEvent *me);
- virtual void constrain(int& width, int& height);
+ virtual void constrain(UMLSceneValue& width, UMLSceneValue& height);
virtual void drawSelected(QPainter * p, int offsetX, int offsetY);
virtual void drawShape(QPainter &p);
More information about the umbrello-devel
mailing list