[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Jun 5 20:49:03 UTC 2004
CVS commit by okellogg:
Minor fix for #includes.
UMLView::selectWidgets(): Simplify code for FloatingText.
M +4 -0 boxwidget.h 1.10
M +3 -3 toolbarstate.cpp 1.2
M +13 -15 umlview.cpp 1.140
M +10 -10 umlview.h 1.55
--- kdesdk/umbrello/umbrello/boxwidget.h #1.9:1.10
@@ -13,4 +13,8 @@
#include <qpainter.h>
//app includes
+#include "umlwidget.h"
+
+// fwd decl.
+class UMLView;
/**
--- kdesdk/umbrello/umbrello/toolbarstate.cpp #1.1:1.2
@@ -7,10 +7,10 @@
* *
***************************************************************************/
+#include <qwmatrix.h> // need for inverseWorldMatrix.map
+
#include "toolbarstate.h"
#include "umlview.h"
-
-#include <qwmatrix.h> // need for inverseWorldMatrix.map
+#include "umlwidget.h"
#include "associationwidget.h"
-
#include "uml.h"
--- kdesdk/umbrello/umbrello/umlview.cpp #1.139:1.140
@@ -50,5 +50,5 @@
#include "clipboard/idchangelog.h"
#include "clipboard/umldrag.h"
-
+#include "floatingtext.h"
#include "classwidget.h"
#include "class.h"
@@ -1123,22 +1123,20 @@ void UMLView::selectWidgets(int px, int
//if it is text that is part of an association then select the association
//and the objects that are connected to it.
- if(temp -> getBaseType() == wt_Text && ((FloatingText *)temp) -> getRole() != tr_Floating ) {
-
- int t = ((FloatingText *)temp) -> getRole();
- if( t == tr_Seq_Message ) {
- MessageWidget * mw = (MessageWidget *)((FloatingText *)temp) -> getMessage();
+ if (temp -> getBaseType() == wt_Text) {
+ FloatingText *ft = static_cast<FloatingText*>(temp);
+ Text_Role t = ft -> getRole();
+ if (t == tr_Seq_Message ) {
+ MessageWidget * mw = ft -> getMessage();
makeSelected( mw );
makeSelected( mw->getWidgetA() );
makeSelected( mw->getWidgetB() );
- } else {
- AssociationWidget * a = static_cast<AssociationWidget *>( (static_cast<FloatingText *>(temp)) -> getAssoc() );
+ } else if (t != tr_Floating) {
+ AssociationWidget * a = ft -> getAssoc();
selectWidgetsOfAssoc( a );
- }//end else
- }//end if text
- else if(temp -> getBaseType() == wt_Message) {
- UMLWidget * ow = ((MessageWidget *)temp) -> getWidgetA();
- makeSelected( ow );
- ow = ((MessageWidget *)temp) -> getWidgetB();
- makeSelected( ow );
+ }
+ } else if(temp -> getBaseType() == wt_Message) {
+ MessageWidget *mw = static_cast<MessageWidget*>(temp);
+ makeSelected( mw -> getWidgetA() );
+ makeSelected( mw -> getWidgetB() );
}
if(temp -> isVisible()) {
--- kdesdk/umbrello/umbrello/umlview.h #1.54:1.55
@@ -15,22 +15,22 @@
#endif
+// system includes
+#include <kurl.h>
+#include <qdom.h>
+#include <qcanvas.h>
+
+//local includes
#include "umlobjectlist.h"
#include "umlwidgetlist.h"
+#include "associationwidgetlist.h"
#include "messagewidgetlist.h"
-
+#include "optionstate.h"
#include "worktoolbar.h"
-#include "floatingtext.h"
-
-
-// QT includes
-
-// KDE includes
-#include <kurl.h>
-
-// #define OFFSET 50
+// forward declarations
class ClassOptionsPage;
class IDChangeLog;
class ListPopupMenu;
+class FloatingText;
class SeqLineWidget;
class ObjectWidget;
More information about the umbrello-devel
mailing list