[Uml-devel] branches/work/isi-umbrello/umbrello/umbrello
Florence Mattler
florence.mattler at libertysurf.fr
Wed Jan 17 17:08:15 UTC 2007
SVN commit 624671 by mattler:
Add files preconditionwidget (.h and .cpp) for drawing a precondition widget in a sequence
diagram. A right mouse button click shows a menu where the user can choose the color, the font,...
M +1 -0 CMakeLists.txt
M +14 -0 listpopupmenu.cpp
A preconditionwidget.cpp [License: GPL (v2+)]
A preconditionwidget.h [License: GPL (v2+)]
M +1 -1 toolbarstatefactory.cpp
M +9 -0 toolbarstateother.cpp
M +2 -1 umlnamespace.h
--- branches/work/isi-umbrello/umbrello/umbrello/CMakeLists.txt #624670:624671
@@ -309,6 +309,7 @@
petaltree2uml.cpp
plugin.cpp
pluginloader.cpp
+ preconditionwidget.cpp
seqlinewidget.cpp
statewidget.cpp
stereotype.cpp
--- branches/work/isi-umbrello/umbrello/umbrello/listpopupmenu.cpp #624670:624671
@@ -33,6 +33,7 @@
#include "umlview.h"
#include "statewidget.h"
#include "activitywidget.h"
+#include "preconditionwidget.h"
#include "forkjoinwidget.h"
#include "objectwidget.h"
@@ -391,6 +392,19 @@
}
break;
+ case Uml::wt_Precondition:
+ setupColor( object -> getUseFillColour() );
+ insertSeparator();
+ insertStdItem(mt_Cut);
+ insertStdItem(mt_Copy);
+ insertStdItem(mt_Paste);
+ insertItem(SmallIcon( "editdelete"), i18n("Clear"), mt_Clear);
+ insertSeparator();
+ insertItem(i18n("Change Text..."), mt_Rename);
+ insertStdItem(mt_Delete);
+ insertStdItem(mt_Change_Font);
+ break;
+
case Uml::wt_Text:
switch( (static_cast<FloatingTextWidget*>(object))->getRole() ) {
case Uml::tr_MultiB:
--- branches/work/isi-umbrello/umbrello/umbrello/toolbarstatefactory.cpp #624670:624671
@@ -86,7 +86,7 @@
case WorkToolBar::tbb_Seq_Message_Synchronous: return 2;
case WorkToolBar::tbb_Seq_Message_Asynchronous: return 2;
case WorkToolBar::tbb_Seq_Combined_Fragment: return 2;
- case WorkToolBar::tbb_Seq_Precondition: return 2;
+ //case WorkToolBar::tbb_Seq_Precondition: return 2;
// Arrow pointer
case WorkToolBar::tbb_Arrow: return 3;
--- branches/work/isi-umbrello/umbrello/umbrello/toolbarstateother.cpp #624670:624671
@@ -25,6 +25,7 @@
#include "forkjoinwidget.h"
#include "notewidget.h"
#include "object_factory.h"
+#include "preconditionwidget.h"
#include "statewidget.h"
#include "uml.h"
#include "umlview.h"
@@ -103,6 +104,10 @@
umlWidget = new ActivityWidget(m_pUMLView, ActivityWidget::Normal);
break;
+ case WorkToolBar::tbb_Seq_Precondition:
+ umlWidget = new PreconditionWidget(m_pUMLView);
+ break;
+
case WorkToolBar::tbb_End_Activity:
umlWidget = new ActivityWidget(m_pUMLView, ActivityWidget::End);
break;
@@ -142,6 +147,10 @@
Dialog_Utils::askNameForWidget(
umlWidget, i18n("Enter Activity Name"),
i18n("Enter the name of the new activity:"), i18n("new activity"));
+ } /* Florence MATTLER */else if (getButton() == WorkToolBar::tbb_Seq_Precondition) {
+ Dialog_Utils::askNameForWidget(
+ umlWidget, i18n("Enter Precondition Name"),
+ i18n("Enter the precondition"), i18n("new precondition"));
} else if (getButton() == WorkToolBar::tbb_State) {
Dialog_Utils::askNameForWidget(
umlWidget, i18n("Enter State Name"),
--- branches/work/isi-umbrello/umbrello/umbrello/umlnamespace.h #624670:624671
@@ -104,7 +104,8 @@
wt_Artifact, // has UMLObject representation
wt_Node, // has UMLObject representation
wt_Association, // has UMLObject representation
- wt_ForkJoin // does not have UMLObject representation
+ wt_ForkJoin, // does not have UMLObject representation
+ wt_Precondition // does not have UMLObject representation
};
enum Diagram_Type
More information about the umbrello-devel
mailing list