[Uml-devel] branches/work/isi-umbrello/umbrello/umbrello
Pierre Pettera
ppmakusu at gmail.com
Thu Jan 18 22:37:29 UTC 2007
SVN commit 625097 by pettera:
Undo / Redo Commit:
QUndoCommand for the WidgetResize.
TODO: Comments...
M +1 -0 CMakeLists.txt
M +1 -0 cmds.h
A cmds/cmd_resizeWidget.cpp [License: GPL (v2+)]
A cmds/cmd_resizeWidget.h [License: GPL (v2+)]
M +9 -6 umlwidgetcontroller.cpp
M +17 -13 umlwidgetcontroller.h
--- branches/work/isi-umbrello/umbrello/umbrello/CMakeLists.txt #625096:625097
@@ -231,6 +231,7 @@
cmds/widgets/cmd_create_umlobject.cpp
cmds/cmd_moveWidget.cpp
+ cmds/cmd_resizeWidget.cpp
)
kde4_automoc(${libclipboard_SRCS})
--- branches/work/isi-umbrello/umbrello/umbrello/cmds.h #625096:625097
@@ -25,6 +25,7 @@
#include "cmds/cmd_create_statediag.h"
#include "cmds/cmd_create_usecasediag.h"
#include "cmds/cmd_moveWidget.h"
+#include "cmds/cmd_resizeWidget.h"
/************************************************************
* Widgets
--- branches/work/isi-umbrello/umbrello/umbrello/umlwidgetcontroller.cpp #625096:625097
@@ -237,6 +237,8 @@
m_doc->executeCommand(new cmdMoveWidget(this));
} else {
+ UMLDoc* m_doc = UMLApp::app()->getDocument();
+ m_doc->executeCommand(new cmdResizeWidget(this));
m_resized = false;
}
@@ -384,16 +386,17 @@
}
int UMLWidgetController::getOldX()
-{
- return m_oldX;
-}
+{ return m_oldX; }
int UMLWidgetController::getOldY()
-{
- return m_oldY;
-}
+{ return m_oldY; }
+int UMLWidgetController::getOldW()
+{ return m_oldW; }
+int UMLWidgetController::getOldH()
+{ return m_oldH; }
+
void UMLWidgetController::setSelectionBounds() {
if (m_widget->m_pView->getSelectCount() > 0) {
m_selectedWidgetsList.clear();
--- branches/work/isi-umbrello/umbrello/umbrello/umlwidgetcontroller.h #625096:625097
@@ -181,8 +181,10 @@
virtual void widgetMoved();
int getOldX();
int getOldY();
+int getOldH();
+int getOldW();
void insertSaveValues(int _oldX, int _oldY, int X, int Y);
-
+//avant c'estait protected?
/**
* Moves the widget to a new position using the difference between the
* current position and the new position.
@@ -202,6 +204,19 @@
*/
virtual void moveWidgetBy(int diffX, int diffY);
+ /**
+ * Resizes the widget.
+ * It's called from resize, after the values are constrained and before
+ * the associations are adjusted.
+ *
+ * Default behaviour is resize the widget using the new size values.
+ * @see resize
+ *
+ * @param newW The new width for the widget.
+ * @param newH The new height for the widget.
+ */
+ virtual void resizeWidget(int newW, int newH);
+//plus de modif dans les droits acces
virtual UMLWidget* getWidget();
@@ -242,21 +257,10 @@
*/
virtual QCursor getResizeCursor();
- /**
- * Resizes the widget.
- * It's called from resize, after the values are constrained and before
- * the associations are adjusted.
- *
- * Default behaviour is resize the widget using the new size values.
- * @see resize
- *
- * @param newW The new width for the widget.
- * @param newH The new height for the widget.
- */
- virtual void resizeWidget(int newW, int newH);
+
/**
* Modifies the value of the diffX and diffY variables used to move the widgets.
*
More information about the umbrello-devel
mailing list