[Uml-devel] state diagram improvements

Andreas Fischer andi.fischer at gmx.ch
Tue Feb 15 23:41:35 UTC 2005


Hi Umbrellos, 
Here a first (small) patch. I would like to improve the 
state diagram part (bugs 53369, 63231, 98652) in the next 
weeks and months. Is that ok? 
 
Andi Fischer 
 
 
Index: umbrello/statewidget.cpp 
=================================================================== 
RCS 
file: /home/kde/kdesdk/umbrello/umbrello/statewidget.cpp,v 
retrieving revision 1.25 
diff -u -p -r1.25 statewidget.cpp 
--- umbrello/statewidget.cpp	9 Nov 2004 01:48:27 -0000	
1.25 
+++ umbrello/statewidget.cpp	15 Feb 2005 20:23:31 -0000 
@@ -85,7 +85,7 @@ void StateWidget::draw(QPainter & p, int 
 			
p.setBrush( UMLWidget::getLineColour() ); 
 			p.drawEllipse( offsetX, offsetY, w, 
h ); 
 			break; 
-		default : 
+		case End : 
 			
p.setBrush( UMLWidget::getLineColour() ); 
 			p.drawEllipse( offsetX, offsetY, w, 
h ); 
 			p.setBrush( white ); 
@@ -93,6 +93,9 @@ void StateWidget::draw(QPainter & p, int 
 			
p.setBrush( UMLWidget::getLineColour() ); 
 			p.drawEllipse( offsetX + 3, offsetY 
+ 3, w - 6, h - 6 ); 
 			break; 
+		default: 
+			kdWarning() << "Unknown state type: 
" << m_StateType << endl; 
+			break; 
 	} 
 	if(m_bSelected) 
 		drawSelected(&p, offsetX, offsetY); 
Index: umbrello/statewidget.h 
=================================================================== 
RCS 
file: /home/kde/kdesdk/umbrello/umbrello/statewidget.h,v 
retrieving revision 1.15 
diff -u -p -r1.15 statewidget.h 
--- umbrello/statewidget.h	9 Nov 2004 01:48:27 -0000	
1.15 
+++ umbrello/statewidget.h	15 Feb 2005 20:23:31 -0000 
@@ -49,7 +49,29 @@ public: 
 	    Normal, 
 	    End 
 	}; 
- 
+	 
+	/// Enumeration that codes the different types of 
pseudostate. (Not yet used!) 
+	enum PseudostateKind 
+	{ 
+	    DeepHistory = 0, 
+	    ShallowHistory, 
+	    Join, 
+	    Fork, 
+	    Junction, 
+	    Choice, 
+	    EntryPoint, 
+	    ExitPoint, 
+	    Terminate 
+	}; 
+ 
+	/// Enumeration that codes the different types of 
transition. (Not yet used!) 
+	enum TransitionKind 
+	{ 
+	    Internal = 0, 
+	    Local, 
+	    External 
+	}; 
+	 
 	/** 
 	 * Creates a State widget. 
 	 * 
 

-- 
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl




More information about the umbrello-devel mailing list