[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Wed Feb 26 10:04:01 UTC 2003
CVS commit by jriddell:
the list of interfaces are now listed as an option when creating
M +5 -0 dialogs/umloperationdialog.cpp 1.7
M +10 -0 umldoc.cpp 1.14
M +8 -0 umldoc.h 1.7
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.13:1.14
@@ -1438,4 +1438,14 @@ QList<UMLConcept> UMLDoc::getConcepts()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+QList<UMLInterface> UMLDoc::getInterfaces() {
+ QList<UMLInterface> interfaceList;
+ for(UMLObject* obj = objectList.first(); obj ; obj = objectList.next()) {
+ if(obj->getBaseType() == ot_Interface) {
+ interfaceList.append((UMLInterface*)obj);
+ }
+ }
+ return interfaceList;
+}
+////////////////////////////////////////////////////////////////////////////////////////////////////
QList<UMLAssociation> UMLDoc::getAssociations() {
QList<UMLAssociation> associationList;
--- kdesdk/umbrello/umbrello/umldoc.h #1.6:1.7
@@ -39,4 +39,5 @@ class UMLViewData;
class UMLWidget;
class UMLConcept;
+class UMLInterface;
class UMLAssociation;
class UMLApp;
@@ -465,4 +466,11 @@ public:
*/
QList<UMLConcept> getConcepts();
+
+ /**
+ * Returns a list of interfaces
+ *
+ * @return Returns a list of interfaces
+ */
+ QList<UMLInterface> getInterfaces();
/**
--- kdesdk/umbrello/umbrello/dialogs/umloperationdialog.cpp #1.6:1.7
@@ -127,4 +127,9 @@ void UMLOperationDialog::setupDialog() {
m_pRtypeCB->insertItem( pConcept->getName() );
}
+ QPtrList<UMLInterface> interfaceList( pDoc->getInterfaces() );
+ UMLInterface* pInterface = 0;
+ for(pInterface=interfaceList.first(); pInterface!=0 ;pInterface=interfaceList.next()) {
+ m_pRtypeCB->insertItem( pInterface->getName() );
+ }
//work out which one to select
More information about the umbrello-devel
mailing list