[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Jul 18 23:31:02 UTC 2004
CVS commit by okellogg:
Reimplement UMLWidget::set{X,Y}. Required for syncing the SeqLineWidget.
M +10 -6 objectwidget.cpp 1.37
M +16 -0 objectwidget.h 1.17
--- kdesdk/umbrello/umbrello/objectwidget.cpp #1.36:1.37
@@ -136,9 +136,4 @@ void ObjectWidget::calculateSize() {
}//end else drawasactor
setSize(width, height);
- if( m_pView -> getType() == dt_Sequence ) {
-//FIXME not quite sure what this did, but it broke paste
-// setY( getY() + (oldHeight - height ) );
- }
- emit sigWidgetMoved( m_nLocalID );//makes any message widgets connected resize themselves
adjustAssocs( getX(), getY() );//adjust assoc lines
moveEvent( 0 );
@@ -173,4 +168,14 @@ bool ObjectWidget::activate(IDChangeLog*
}
+void ObjectWidget::setX( int x ) {
+ UMLWidget::setX(x);
+ moveEvent(0);
+}
+
+void ObjectWidget::setY( int y ) {
+ UMLWidget::setY(y);
+ moveEvent(0);
+}
+
void ObjectWidget::moveEvent(QMoveEvent */*m*/) {
emit sigWidgetMoved( m_nLocalID );
@@ -271,5 +276,4 @@ void ObjectWidget::mouseMoveEvent(QMouse
adjustAssocs(newX, newY);
m_pView->resizeCanvasToItems();
- moveEvent(0);
}
}
--- kdesdk/umbrello/umbrello/objectwidget.h #1.16:1.17
@@ -49,4 +49,20 @@ public:
/**
+ * Sets the x-coordinate.
+ * Reimplements the method from UMLWidget.
+ *
+ * @param x The x-coordinate to be set.
+ */
+ virtual void setX( int x );
+
+ /**
+ * Sets the y-coordinate.
+ * Reimplements the method from UMLWidget.
+ *
+ * @param y The y-coordinate to be set.
+ */
+ virtual void setY( int y );
+
+ /**
* Returns the local ID for this object. This ID is used so that
* many objects of the same @ref UMLObject instance can be on the
More information about the umbrello-devel
mailing list