[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
Oliver.Kellogg at t-online.de
Sat Sep 6 23:01:03 UTC 2003
CVS commit by okellogg:
Add method findAssocWidget().
M +20 -1 umlview.cpp 1.78
M +9 -0 umlview.h 1.33
--- kdesdk/umbrello/umbrello/umlview.cpp #1.77:1.78
@@ -74,4 +74,5 @@
#include "umllistviewitemdata.h"
#include "umlobjectlist.h"
+#include "association.h"
#include "umlwidget.h"
@@ -379,5 +380,4 @@ void UMLView::contentsMouseReleaseEvent(
FloatingText* messageText = new FloatingText(this, tr_Seq_Message, "");
messageText->setFont( getFont() );
- messageText->setID(m_pDoc -> getUniqueID());
Sequence_Message_Type msgType = (isSyncMsg ? sequence_message_synchronous :
@@ -391,4 +391,10 @@ void UMLView::contentsMouseReleaseEvent(
message, SLOT(slotColorChanged(int)));
+ // WAS:
+ // messageText->setID(m_pDoc -> getUniqueID());
+ // EXPERIMENTALLY CHANGED TO:
+ messageText->setID( message->getID() );
+
+ messageText->setMessage( message );
messageText->setActivated();
message->setActivated();
@@ -781,4 +787,17 @@ UMLWidget * UMLView::findWidget( int id
}
+ return 0;
+}
+////////////////////////////////////////////////////////////////////////////////////////////////////
+AssociationWidget * UMLView::findAssocWidget( int id ) {
+ AssociationWidget *obj;
+ AssociationWidgetListIt it( m_AssociationList );
+ while ( (obj = it.current()) != 0 ) {
+ ++it;
+ UMLAssociation* umlassoc = obj -> getAssociation();
+ if ( umlassoc && umlassoc->getID() == id ) {
+ return obj;
+ }
+ }
return 0;
}
--- kdesdk/umbrello/umbrello/umlview.h #1.32:1.33
@@ -385,4 +385,13 @@ public:
/**
+ * Finds an association widget with the given ID.
+ *
+ * @param id The ID of the widget to find.
+ *
+ * @return Returns the widget found, returns 0 if no widget found.
+ */
+ AssociationWidget * findAssocWidget(int id);
+
+ /**
* Remove a widget from view.
*
More information about the umbrello-devel
mailing list