[Uml-devel] branches/work/isi-umbrello/umbrello/umbrello
Caroline Bourdeu d'Aguerre
cbda at free.fr
Mon Feb 19 21:36:24 UTC 2007
SVN commit 635347 by bourdeu:
Add a new widget in the activity diagram: expansion region.
M +3 -2 CMakeLists.txt
AM expansionregionwidget.cpp [License: GPL (v2+)]
AM expansionregionwidget.h [License: GPL (v2+)]
M +2 -3 pics/CMakeLists.txt
AM pics/cursor-expansion_region.png
AM pics/expansion_region.png
M +6 -1 toolbarstateother.cpp
M +18 -7 widget_factory.cpp
M +3 -0 worktoolbar.cpp
M +3 -1 worktoolbar.h
--- branches/work/isi-umbrello/umbrello/umbrello/CMakeLists.txt #635346:635347
@@ -245,8 +245,7 @@
########### next target ###############
set(libumbrello_SRCS
- activitywidget.cpp
- combinedfragmentwidget.cpp
+ activitywidget.cpp
actor.cpp
actorwidget.cpp
aligntoolbar.cpp
@@ -275,6 +274,7 @@
codemethodblock.cpp
codeoperation.cpp
codeparameter.cpp
+ combinedfragmentwidget.cpp
component.cpp
componentwidget.cpp
configurable.cpp
@@ -285,6 +285,7 @@
entity.cpp
entityattribute.cpp
entitywidget.cpp
+ expansionregionwidget.cpp
enum.cpp
enumliteral.cpp
enumwidget.cpp
** branches/work/isi-umbrello/umbrello/umbrello/expansionregionwidget.cpp #property svn:executable
+ *
** branches/work/isi-umbrello/umbrello/umbrello/expansionregionwidget.h #property svn:executable
+ *
--- branches/work/isi-umbrello/umbrello/umbrello/pics/CMakeLists.txt #635346:635347
@@ -1,8 +1,7 @@
install( FILES actor.png aggregation.png align_left.png align_right.png align_top.png align_bottom.png
align_vert_middle.png align_hori_middle.png align_vert_distribute.png align_hori_distribute.png anchor.png
-andline.png arrow.png association.png choice-rhomb.png choice-round.png combined_fragment.png component.png
-composition.png containment.png CVglobal_meth.png CVglobal_var.png CVimplementation_meth.png
+andline.png arrow.png association.png choice-rhomb.png choice-round.png combined_fragment.png component.png expansion_region.png composition.png containment.png CVglobal_meth.png CVglobal_var.png CVimplementation_meth.png
CVimplementation_signal.png CVimplementation_slot.png CVimplementation_var.png CVnamespace.png
CVprivate_meth.png CVprivate_signal.png CVprivate_slot.png CVprivate_var.png CVprotected_meth.png
CVprotected_signal.png CVprotected_slot.png CVprotected_var.png CVpublic_meth.png CVpublic_signal.png
@@ -18,7 +17,7 @@
cursor-class.png cursor-artifact.png cursor-dependency.png cursor-message-synchronous.png
cursor-uniassociation.png cursor-association.png cursor-end_state.png cursor-final_activity.png cursor-node.png cursor-box.png
cursor-fork.png cursor-note.png cursor-branch.png cursor-generalisation.png cursor-object.png
-cursor-entity.png cursor-relationship.png precondition.png cursor-precondition.png cursor-send_signal.png cursor-accept_signal.png cursor-accept_time_event.png
+cursor-entity.png cursor-relationship.png precondition.png cursor-precondition.png cursor-send_signal.png cursor-accept_signal.png cursor-accept_time_event.png cursor-expansion_region.png
cursor-message-found.png message-lost.png cursor-message-lost.png end_of_life.png cursor-end_of_life.png exception.png
cursor-exception.png DESTINATION
${DATA_INSTALL_DIR}/umbrello/pics )
** branches/work/isi-umbrello/umbrello/umbrello/pics/cursor-expansion_region.png #property svn:mime-type
+ application/octet-stream
** branches/work/isi-umbrello/umbrello/umbrello/pics/expansion_region.png #property svn:mime-type
+ application/octet-stream
--- branches/work/isi-umbrello/umbrello/umbrello/toolbarstateother.cpp #635346:635347
@@ -21,6 +21,7 @@
#include "activitywidget.h"
#include "boxwidget.h"
#include "dialog_utils.h"
+#include "expansionregionwidget.h"
#include "floatingtextwidget.h"
#include "forkjoinwidget.h"
#include "notewidget.h"
@@ -151,7 +152,11 @@
umlWidget = new SignalWidget(m_pUMLView, SignalWidget::Time);
break;
- case WorkToolBar::tbb_Seq_Combined_Fragment:
+ case WorkToolBar::tbb_Expansion_Region:
+ umlWidget = new ExpansionRegionWidget(m_pUMLView);
+ break;
+
+ case WorkToolBar::tbb_Seq_Combined_Fragment:
umlWidget = new CombinedFragmentWidget(m_pUMLView);
break;
--- branches/work/isi-umbrello/umbrello/umbrello/widget_factory.cpp #635346:635347
@@ -37,6 +37,7 @@
#include "enum.h"
#include "entitywidget.h"
#include "entity.h"
+#include "expansionregionwidget.h"
#include "actorwidget.h"
#include "actor.h"
#include "usecasewidget.h"
@@ -160,12 +161,19 @@
UMLWidget* makeWidgetFromXMI(const QString& tag,
const QString& idStr, UMLView *view) {
UMLWidget *widget = NULL;
- if (tag == "statewidget" || tag == "notewidget" || tag == "boxwidget" ||
- tag == "floatingtext" || tag == "activitywidget" || tag == "forkjoin" || tag == "preconditionwidget" || tag == "endoflifewidget" ||
- tag == "combinedFragmentwidget" || tag == "signalwidget" || tag == "objectflowwidget" || tag == "floatingdashlinewidget" ||
+ if (tag == "statewidget" || tag == "notewidget"
+ || tag == "boxwidget" || tag == "floatingtext"
+ || tag == "activitywidget" || tag == "forkjoin"
+ || tag == "preconditionwidget" || tag == "endoflifewidget"
+ || tag == "combinedFragmentwidget" || tag == "signalwidget"
+ || tag == "objectflowwidget" || tag == "floatingdashlinewidget"
+ || tag == "expansionregionwidget" ||
// tests for backward compatibility:
- tag == "UML:StateWidget" || tag == "UML:NoteWidget" ||
- tag=="UML:CombinedFragmentWidget" || tag == "UML:FloatingTextWidget" || tag == "UML:SignalWidget" || tag == "UML:ActivityWidget" || tag == "UML:EndOfLifeWidget"||tag == "UML:PreconditionWidget"||tag == "UML:FloatingDashLineWidget" || tag == "UML:ObjectFlowWidget" ) {
+ tag == "UML:StateWidget" || tag == "UML:NoteWidget"
+ || tag=="UML:CombinedFragmentWidget"|| tag == "UML:FloatingTextWidget"
+ || tag == "UML:SignalWidget" || tag == "UML:ActivityWidget"
+ || tag == "UML:EndOfLifeWidget" ||tag == "UML:PreconditionWidget"
+ ||tag == "UML:FloatingDashLineWidget" || tag == "UML:ObjectFlowWidget" ) {
// Loading of widgets which do NOT represent any UMLObject,
// just graphic stuff with no real model information
//FIXME while boxes and texts are just diagram objects, activities and
@@ -204,9 +212,12 @@
} else if (tag == "objectflowwidget"
|| tag == "UML:ObjectFlowWidget" ) {
widget = new ObjectFlowWidget(view,Uml::id_Reserved);
- }
+ } else if (tag == "expansionregionwidget" ) {
+ widget = new ExpansionRegionWidget(view, Uml::id_Reserved);
+ }
}
- else {
+ else
+ {
// Find the UMLObject and create the Widget to represent it
Uml::IDType id = STR2ID(idStr);
UMLDoc *umldoc = UMLApp::app()->getDocument();
--- branches/work/isi-umbrello/umbrello/umbrello/worktoolbar.cpp #635346:635347
@@ -151,6 +151,7 @@
insertHotBtn(tbb_Send_Signal);
insertHotBtn(tbb_Accept_Signal);
insertHotBtn(tbb_Accept_Time_Event);
+ insertHotBtn(tbb_Expansion_Region);
break;
case Uml::dt_Component:
@@ -280,6 +281,7 @@
{ tbb_UseCase, i18n("Use Case"), "usecase.png", SLOT(slotUseCase()) },
{ tbb_Class, i18n("Class"), "class.png", SLOT(slotClass()) },
{ tbb_Initial_State, i18n("Initial State"), "initial_state.png", SLOT(slotInitial_State()) },
+ { tbb_Expansion_Region, i18n("Expansion Region"), "expansion_region.png", SLOT(slotExpansion_Region()) },
{ tbb_End_State, i18n("End State"), "end_state.png", SLOT(slotEnd_State()) },
{ tbb_Branch, i18n("Branch/Merge"), "branch.png", SLOT(slotBranch()) },
{ tbb_Send_Signal, i18n("Send signal"), "send_signal.png", SLOT(slotSend_Signal()) },
@@ -383,6 +385,7 @@
void WorkToolBar::slotAccept_Signal() {buttonChanged(tbb_Accept_Signal);}
void WorkToolBar::slotAccept_Time_Event() {buttonChanged(tbb_Accept_Time_Event);}
void WorkToolBar::slotEnd_State() {buttonChanged(tbb_End_State);}
+void WorkToolBar::slotExpansion_Region() {buttonChanged(tbb_Expansion_Region);}
void WorkToolBar::slotInitial_Activity() {buttonChanged(tbb_Initial_Activity);}
void WorkToolBar::slotActivity() {buttonChanged(tbb_Activity);}
void WorkToolBar::slotObject_Flow() {buttonChanged(tbb_Object_Flow);}
--- branches/work/isi-umbrello/umbrello/umbrello/worktoolbar.h #635346:635347
@@ -113,6 +113,7 @@
tbb_Object,
tbb_Initial_State,
tbb_State,
+ tbb_Expansion_Region,
tbb_End_State,
tbb_Initial_Activity,
tbb_Activity,
@@ -191,7 +192,7 @@
void slotCheckToolBar(Uml::Diagram_Type dt);
void buttonChanged(int b);
void slotResetToolBar();
-
+
/**
* These slots are triggered by the buttons. They call buttonChanged with
* the button id
@@ -232,6 +233,7 @@
void slotNode();
void slotArtifact();
void slotObject();
+ void slotExpansion_Region();
void slotInitial_State();
void slotState();
void slotEnd_State();
More information about the umbrello-devel
mailing list