[Uml-devel] kdesdk/umbrello/umbrello/dialogs
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Tue Dec 23 08:44:01 UTC 2003
CVS commit by thomas:
fix bug: association role dialog-- connected umlobject name appears now
M +18 -2 assocrolepage.cpp 1.11
--- kdesdk/umbrello/umbrello/dialogs/assocrolepage.cpp #1.10:1.11
@@ -15,4 +15,6 @@
#include "assocrolepage.h"
+#include "../association.h"
+#include "../umlrole.h"
AssocRolePage::AssocRolePage (UMLDoc *d, QWidget *parent, AssociationWidget *assoc)
@@ -37,4 +39,18 @@ AssocRolePage::~AssocRolePage() {}
void AssocRolePage::constructWidget() {
+ // underlying roles and objects
+ UMLRole * roleA = m_pAssociationWidget->getAssociation()->getUMLRoleA();
+ UMLRole * roleB = m_pAssociationWidget->getAssociation()->getUMLRoleB();
+ UMLObject * objA = roleA->getObject();
+ UMLObject * objB = roleB->getObject();
+ QString nameA = objA->getName();
+ QString nameB = objB->getName();
+ QString titleA = i18n("Role A Properties");
+ QString titleB = i18n("Role B Properties");
+ if(!nameA.isEmpty())
+ titleA.append( "("+nameA+")");
+ if(!nameB.isEmpty())
+ titleB.append( "("+nameB+")");
+
// general configuration of the GUI
int margin = fontMetrics().height();
@@ -52,6 +68,6 @@ void AssocRolePage::constructWidget() {
QGroupBox *docAGB = new QGroupBox(this);
QGroupBox *docBGB = new QGroupBox(this);
- propsAGB -> setTitle(i18n("Role A Properties"));
- propsBGB -> setTitle(i18n("Role B Properties"));
+ propsAGB -> setTitle(titleA);
+ propsBGB -> setTitle(titleB);
docAGB -> setTitle(i18n("Documentation"));
docBGB -> setTitle(i18n("Documentation"));
More information about the umbrello-devel
mailing list