[Uml-devel] branches/work/isi-umbrello/umbrello/umbrello
Mohamed-Amine Bouchikhi
boutchk at yahoo.fr
Wed Feb 14 16:28:51 UTC 2007
SVN commit 633628 by bouchikhi:
Undo / Redo commit
Integration of last commited commands in umlwidget.
M +4 -0 CMakeLists.txt
M +3 -0 cmds.h
M +1 -1 cmds/widget/cmd_changeFillColor.cpp
M +2 -2 cmds/widget/cmd_changeLineColor.cpp
M +15 -9 umlwidget.cpp
M +10 -0 umlwidget.h
--- branches/work/isi-umbrello/umbrello/umbrello/CMakeLists.txt #633627:633628
@@ -235,6 +235,10 @@
cmds/widget/cmd_set_name.cpp
cmds/widget/cmd_set_txt.cpp
cmds/cmd_handle_rename.cpp
+ cmds/widget/cmd_changeFontSelection.cpp
+ cmds/widget/cmd_changeLineColor.cpp
+ cmds/widget/cmd_changeFillColor.cpp
+
)
kde4_automoc(${libclipboard_SRCS})
--- branches/work/isi-umbrello/umbrello/umbrello/cmds.h #633627:633628
@@ -33,6 +33,9 @@
#include "cmds/widget/cmd_set_name.h"
#include "cmds/widget/cmd_set_txt.h"
#include "cmds/cmd_handle_rename.h"
+#include "cmds/widget/cmd_changeFontSelection.h"
+#include "cmds/widget/cmd_changeLineColor.h"
+#include "cmds/widget/cmd_changeFillColor.h"
/************************************************************
* Class Diagram
--- branches/work/isi-umbrello/umbrello/umbrello/cmds/widget/cmd_changeFillColor.cpp #633627:633628
@@ -43,7 +43,7 @@
pView=view;
//oldColor=pView->getFillColour();
color = col;
- oldColor= widget -> wgetFillColour() ;
+ oldColor= widget -> getFillColor() ;
//widget -> setFillColour(color);
//pView -> selectionSetFillColor( col );
pDoc -> setModified(true);
--- branches/work/isi-umbrello/umbrello/umbrello/cmds/widget/cmd_changeLineColor.cpp #633627:633628
@@ -37,13 +37,13 @@
cmdChangeLineColor::cmdChangeLineColor(/* obj1: m_pDoc */UMLDoc *doc
/* obj2: m_pView */ , UMLView *view
- /* obj3: newColor */ , QColor col):already(true)
+ /* obj3: newColor */ , QColor col)
{
UMLWidget * widget = view->getFirstMultiSelectedWidget();
pDoc=doc;
pView=view;
color = col;
- oldColor=widget -> wgetLineColour() ;
+ oldColor=widget -> getLineColor() ;
//view -> selectionSetLineColor( col );
// doc -> setModified(true);
}
--- branches/work/isi-umbrello/umbrello/umbrello/umlwidget.cpp #633627:633628
@@ -40,9 +40,10 @@
#include "dialogs/classpropdlg.h"
#include "clipboard/idchangelog.h"
+#include "cmds.h"
+
using namespace Uml;
-
UMLWidget::UMLWidget( UMLView * view, UMLObject * o, UMLWidgetController *widgetController /* = 0*/ )
: WidgetBase(view), Q3CanvasRectangle( view->canvas() ),
m_pMenu(0)
@@ -301,8 +302,8 @@
widget = m_pView->getFirstMultiSelectedWidget();
if (widget) { newColour = widget->getLineColor(); }
if( KColorDialog::getColor(newColour) ) {
- m_pView -> selectionSetLineColor( newColour );
- m_pDoc -> setModified(true);
+ UMLApp::app()->executeCommand(new cmdChangeLineColor(m_pDoc,m_pView,newColour));
+
}
break;
@@ -311,8 +312,7 @@
widget = m_pView->getFirstMultiSelectedWidget();
if (widget) { newColour = widget->getFillColour(); }
if ( KColorDialog::getColor(newColour) ) {
- m_pView -> selectionSetFillColor( newColour );
- m_pDoc -> setModified(true);
+ UMLApp::app()->executeCommand(new cmdChangeFillColor(m_pDoc,m_pView,newColour));
}
break;
@@ -351,8 +351,7 @@
font = getFont();
if( KFontDialog::getFont( font, false, m_pView ) )
{
- setFont( font );
- m_pDoc->setModified(true);
+ UMLApp::app()->executeCommand(new cmdChangeFontSelection(m_pDoc,m_pView,font));
}
break;
@@ -360,8 +359,7 @@
font = getFont();
if( KFontDialog::getFont( font, false, m_pView ) )
{
- m_pView -> selectionSetFont( font );
- m_pDoc->setModified(true);
+ UMLApp::app()->executeCommand(new cmdChangeFontSelection(m_pDoc,m_pView,font));
}
break;
@@ -452,6 +450,10 @@
update();
}
+QColor UMLWidget::getLineColor() {
+ return m_LineColour;
+}
+
void UMLWidget::setLineWidth(uint width) {
WidgetBase::setLineWidth(width);
update();
@@ -463,6 +465,10 @@
update();
}
+QColor UMLWidget::getFillColor() {
+ return m_FillColour;
+}
+
void UMLWidget::drawSelected(QPainter * p, int offsetX, int offsetY) {
int w = width();
int h = height();
--- branches/work/isi-umbrello/umbrello/umbrello/umlwidget.h #633627:633628
@@ -131,6 +131,11 @@
void setLineColor(const QColor &colour);
/**
+ * get line color attribute.
+ */
+ QColor getLineColor() ;
+
+ /**
* Overrides the method from WidgetBase.
*/
void setLineWidth(uint width);
@@ -143,6 +148,11 @@
void setFillColour(const QColor &colour);
/**
+ * get fill color attribute.
+ */
+ QColor getFillColor();
+
+ /**
* Read property of QColor m_FillColour.
*/
QColor getFillColour() const {
More information about the umbrello-devel
mailing list