[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker ralf.habacker at gmail.com
Thu Aug 23 04:09:48 UTC 2012


SVN commit 1312466 by habacker:

Renamed type to UMLScene related types to reduce differences to soc branch.

 M  +3 -3      controller/floatingtextwidgetcontroller.cpp  
 M  +3 -3      controller/floatingtextwidgetcontroller.h  
 M  +8 -8      controller/messagewidgetcontroller.cpp  
 M  +4 -4      controller/messagewidgetcontroller.h  
 M  +5 -5      controller/objectwidgetcontroller.cpp  
 M  +4 -4      controller/objectwidgetcontroller.h  
 M  +2 -2      controller/umlwidgetcontroller.cpp  
 M  +2 -2      controller/umlwidgetcontroller.h  
 M  +5 -5      widgets/floatingdashlinewidget.cpp  
 M  +5 -5      widgets/floatingdashlinewidget.h  
 M  +2 -2      widgets/signalwidget.cpp  
 M  +2 -2      widgets/signalwidget.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/controller/floatingtextwidgetcontroller.cpp #1312465:1312466
@@ -90,7 +90,7 @@
  * @param diffX The difference between current X position and new X position.
  * @param diffY The difference between current Y position and new Y position.
  */
-void FloatingTextWidgetController::moveWidgetBy(int diffX, int diffY)
+void FloatingTextWidgetController::moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY)
 {
     if (m_floatingTextWidget->textRole() == Uml::TextRole::Seq_Message_Self)
         return;
@@ -155,7 +155,7 @@
  * @param diffX The difference between current X position and new X position.
  * @param diffY The difference between current Y position and new Y position.
  */
-void FloatingTextWidgetController::constrainMovementForAllWidgets(int &diffX, int &diffY)
+void FloatingTextWidgetController::constrainMovementForAllWidgets(UMLSceneValue &diffX, UMLSceneValue &diffY)
 {
     UMLScenePoint constrainedPosition = constrainPosition(diffX, diffY);
 
@@ -175,7 +175,7 @@
  * @param diffY The difference between current Y position and new Y position.
  * @return A UMLScenePoint with the constrained new position.
  */
-UMLScenePoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY)
+UMLScenePoint FloatingTextWidgetController::constrainPosition(UMLSceneValue diffX, UMLSceneValue diffY)
 {
     UMLSceneValue newX = m_floatingTextWidget->x() + diffX;
     UMLSceneValue newY = m_floatingTextWidget->y() + diffY;
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/floatingtextwidgetcontroller.h #1312465:1312466
@@ -49,13 +49,13 @@
 
     virtual bool isInResizeArea(UMLSceneMouseEvent *me);
 
-    virtual void moveWidgetBy(int diffX, int diffY);
+    virtual void moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY);
 
-    virtual void constrainMovementForAllWidgets(int &diffX, int &diffY);
+    virtual void constrainMovementForAllWidgets(UMLSceneValue &diffX, UMLSceneValue &diffY);
 
 private:
 
-    UMLScenePoint constrainPosition(int diffX, int diffY);
+    UMLScenePoint constrainPosition(UMLSceneValue diffX, UMLSceneValue diffY);
 
     /**
      * The floating text widget which uses the controller.
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/messagewidgetcontroller.cpp #1312465:1312466
@@ -73,7 +73,7 @@
  * @param newW The new width for the widget (isn't used).
  * @param newH The new height for the widget.
  */
-void MessageWidgetController::resizeWidget(int newW, int newH)
+void MessageWidgetController::resizeWidget(UMLSceneValue newW, UMLSceneValue newH)
 {
     if (m_messageWidget->sequenceMessageType() == Uml::sequence_message_creation)
         m_messageWidget->setSize(m_messageWidget->width(), newH);
@@ -112,11 +112,11 @@
  *                          (isn't used).
  * @param diffY The difference between current Y position and new Y position.
  */
-void MessageWidgetController::moveWidgetBy(int diffX, int diffY)
+void MessageWidgetController::moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY)
 {
     Q_UNUSED(diffX);
     m_unconstrainedPositionY += diffY;
-    int newY = constrainPositionY(diffY);
+    UMLSceneValue newY = constrainPositionY(diffY);
 
     if (m_unconstrainedPositionY != newY) {
         if (m_unconstrainedPositionY > m_messageWidget->y()) {
@@ -129,7 +129,7 @@
     m_messageWidget->setY(newY);
 
     if (m_messageWidget->m_sequenceMessageType == Uml::sequence_message_creation) {
-        const int objWidgetHalfHeight = m_messageWidget->m_pOw[Uml::B]->height() / 2;
+        const UMLSceneValue objWidgetHalfHeight = m_messageWidget->m_pOw[Uml::B]->height() / 2;
         m_messageWidget->m_pOw[Uml::B]->UMLWidget::setY(newY - objWidgetHalfHeight);
     }
 
@@ -145,7 +145,7 @@
  * @param diffX The difference between current X position and new X position.
  * @param diffY The difference between current Y position and new Y position.
  */
-void MessageWidgetController::constrainMovementForAllWidgets(int &diffX, int &diffY)
+void MessageWidgetController::constrainMovementForAllWidgets(UMLSceneValue &diffX, UMLSceneValue &diffY)
 {
     diffX = 0;
     diffY = constrainPositionY(diffY) - m_widget->y();
@@ -176,11 +176,11 @@
  * @param diffY The difference between current Y position and new Y position.
  * @return The new Y position, constrained.
  */
-int MessageWidgetController::constrainPositionY(int diffY)
+int MessageWidgetController::constrainPositionY(UMLSceneValue diffY)
 {
-    int newY = m_widget->y() + diffY;
+    UMLSceneValue newY = m_widget->y() + diffY;
 
-    int minY = m_messageWidget->getMinY();
+    UMLSceneValue minY = m_messageWidget->getMinY();
     if (m_messageWidget->m_pFText && !m_messageWidget->m_pFText->displayText().isEmpty()) {
         minY += m_messageWidget->m_pFText->height();
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/messagewidgetcontroller.h #1312465:1312466
@@ -56,17 +56,17 @@
 
     virtual QCursor getResizeCursor();
 
-    virtual void resizeWidget(int newW, int newH);
+    virtual void resizeWidget(UMLSceneValue newW, UMLSceneValue newH);
 
-    virtual void moveWidgetBy(int diffX, int diffY);
+    virtual void moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY);
 
-    virtual void constrainMovementForAllWidgets(int &diffX, int &diffY);
+    virtual void constrainMovementForAllWidgets(UMLSceneValue &diffX, UMLSceneValue &diffY);
 
     virtual void doMouseDoubleClick(UMLSceneMouseEvent *me);
 
 private:
 
-    int constrainPositionY(int diffY);
+    int constrainPositionY(UMLSceneValue diffY);
 
     /**
      * The message widget which uses the controller.
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/objectwidgetcontroller.cpp #1312465:1312466
@@ -65,7 +65,7 @@
  * @param newW The new width for the widget.
  * @param newH The new height for the widget (isn't used).
  */
-void ObjectWidgetController::resizeWidget(int newW, int newH)
+void ObjectWidgetController::resizeWidget(UMLSceneValue newW, UMLSceneValue newH)
 {
     Q_UNUSED(newH);
     m_widget->setSize(newW, m_widget->height());
@@ -121,7 +121,7 @@
  * @param diffY The difference between current Y position and new Y position
  *                          (isn't used).
  */
-void ObjectWidgetController::moveWidgetBy(int diffX, int diffY)
+void ObjectWidgetController::moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY)
 {
     Q_UNUSED(diffY);
     m_widget->setX(m_widget->x() + diffX);
@@ -134,10 +134,10 @@
  *
  * @param diffY The difference between current Y position and new Y position
  */
-void ObjectWidgetController::moveDestructionBy(int diffY)
+void ObjectWidgetController::moveDestructionBy(UMLSceneValue diffY)
 {
     // endLine = length of the life line + diffY - 10 to center on the destruction box
-    int endLine = dynamic_cast<ObjectWidget *>(m_widget)->getEndLineY() + diffY - 10;
+    UMLSceneValue endLine = dynamic_cast<ObjectWidget *>(m_widget)->getEndLineY() + diffY - 10;
     SeqLineWidget * pLine = dynamic_cast<ObjectWidget *>(m_widget)->sequentialLine();
     pLine->setEndOfLine(endLine);
     m_oldY = endLine;
@@ -151,7 +151,7 @@
  * @param diffX The difference between current X position and new X position.
  * @param diffY The difference between current Y position and new Y position.
  */
-void ObjectWidgetController::constrainMovementForAllWidgets(int& diffX, int& diffY)
+void ObjectWidgetController::constrainMovementForAllWidgets(UMLSceneValue& diffX, UMLSceneValue& diffY)
 {
     Q_UNUSED(diffX);
     diffY = 0;
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/objectwidgetcontroller.h #1312465:1312466
@@ -40,16 +40,16 @@
 
     virtual QCursor getResizeCursor();
 
-    virtual void resizeWidget(int newW, int newH);
+    virtual void resizeWidget(UMLSceneValue newW, UMLSceneValue newH);
 
     virtual void mousePressEvent(UMLSceneMouseEvent *me);
     virtual void mouseMoveEvent(UMLSceneMouseEvent* me);
 
-    virtual void moveWidgetBy(int diffX, int diffY);
+    virtual void moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY);
 
-    void moveDestructionBy (int diffY);
+    void moveDestructionBy (UMLSceneValue diffY);
 
-    virtual void constrainMovementForAllWidgets(int &diffX, int &diffY);
+    virtual void constrainMovementForAllWidgets(UMLSceneValue &diffX, UMLSceneValue &diffY);
 
     bool m_isOnDestructionBox;  ///< true when a click occurred on the destruction box
 };
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/umlwidgetcontroller.cpp #1312465:1312466
@@ -445,7 +445,7 @@
  * @param newW The new width for the widget.
  * @param newH The new height for the widget.
  */
-void UMLWidgetController::resizeWidget(int newW, int newH)
+void UMLWidgetController::resizeWidget(UMLSceneValue newW, UMLSceneValue newH)
 {
     m_widget->setSize(newW, newH);
 }
@@ -467,7 +467,7 @@
  * @param diffX The difference between current X position and new X position.
  * @param diffY The difference between current Y position and new Y position.
  */
-void UMLWidgetController::moveWidgetBy(int diffX, int diffY)
+void UMLWidgetController::moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY)
 {
     m_widget->setX(m_widget->x() + diffX);
     m_widget->setY(m_widget->y() + diffY);
--- trunk/KDE/kdesdk/umbrello/umbrello/controller/umlwidgetcontroller.h #1312465:1312466
@@ -81,9 +81,9 @@
 
     void insertSaveValues(int _oldX, int _oldY, int X, int Y);
 
-    virtual void moveWidgetBy(int diffX, int diffY);
+    virtual void moveWidgetBy(UMLSceneValue diffX, UMLSceneValue diffY);
 
-    virtual void resizeWidget(int newW, int newH);
+    virtual void resizeWidget(UMLSceneValue newW, UMLSceneValue newH);
 
     virtual UMLWidget* getWidget();
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/floatingdashlinewidget.cpp #1312465:1312466
@@ -101,7 +101,7 @@
 /**
  * Overrides the setY method.
  */
-void FloatingDashLineWidget::setY(int y)
+void FloatingDashLineWidget::setY(UMLSceneValue y)
 {
     if(y >= m_yMin + FLOATING_DASH_LINE_MARGIN && y <= m_yMax - FLOATING_DASH_LINE_MARGIN)
         UMLWidget::setY(y);
@@ -110,7 +110,7 @@
 /**
  * Sets m_yMin.
  */
-void FloatingDashLineWidget::setYMin(int yMin)
+void FloatingDashLineWidget::setYMin(UMLSceneValue yMin)
 {
     m_yMin = yMin;
 }
@@ -118,7 +118,7 @@
 /**
  * Sets m_yMax.
  */
-void FloatingDashLineWidget::setYMax(int yMax)
+void FloatingDashLineWidget::setYMax(UMLSceneValue yMax)
 {
     m_yMax = yMax;
 }
@@ -126,7 +126,7 @@
 /**
  * Returns m_yMin.
  */
-int FloatingDashLineWidget::getYMin() const
+UMLSceneValue FloatingDashLineWidget::getYMin() const
 {
     return m_yMin;
 }
@@ -134,7 +134,7 @@
 /**
  * Returns the difference between the y-coordinate of the dash line and m_yMin.
  */
-int FloatingDashLineWidget::getDiffY() const
+UMLSceneValue FloatingDashLineWidget::getDiffY() const
 {
     return (y() - getYMin());
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/floatingdashlinewidget.h #1312465:1312466
@@ -45,11 +45,11 @@
 
     void setText(const QString& text);
 
-    void setY(int y);
-    void setYMin(int yMin);
-    void setYMax(int yMax);
-    int getYMin() const;
-    int getDiffY() const;
+    void setY(UMLSceneValue y);
+    void setYMin(UMLSceneValue yMin);
+    void setYMax(UMLSceneValue yMax);
+    UMLSceneValue getYMin() const;
+    UMLSceneValue getDiffY() const;
 
     void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
     bool loadFromXMI( QDomElement & qElement );
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/signalwidget.cpp #1312465:1312466
@@ -161,7 +161,7 @@
 /**
  * Overrides the UMLWidget method.
  */
-void SignalWidget::setX(int newX)
+void SignalWidget::setX(UMLSceneValue newX)
 {
     m_oldX = x();
     UMLWidget::setX(newX);
@@ -170,7 +170,7 @@
 /**
  * Overrides the UMLWidget method.
  */
-void SignalWidget::setY(int newY)
+void SignalWidget::setY(UMLSceneValue newY)
 {
     m_oldY = y();
     UMLWidget::setY(newY);
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/signalwidget.h #1312465:1312466
@@ -44,8 +44,8 @@
 
     void paint(QPainter & p, int offsetX, int offsetY);
 
-    void setX(int newX);
-    void setY(int newY);
+    void setX(UMLSceneValue newX);
+    void setY(UMLSceneValue newY);
 
     virtual void setName(const QString &strName);
     virtual QString getName() const;




More information about the umbrello-devel mailing list