[Uml-devel] [Bug 147061] Add option for switching off automatic drawing attribute associations in class diagram
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Jul 17 22:16:13 UTC 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=147061
okellogg users sourceforge net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From okellogg users sourceforge net 2007-07-18 00:16 -------
SVN commit 689217 by okellogg:
Add showAttribAssocs to Settings::OptionState.classState
FEATURE:147061
M +1 -0 ChangeLog.2
M +7 -0 umbrello/dialogs/classoptionspage.cpp
M +2 -1 umbrello/dialogs/classoptionspage.h
M +2 -2 umbrello/dialogs/umlviewdialog.cpp
M +1 -0 umbrello/optionstate.h
M +5 -0 umbrello/umbrello.kcfg
M +2 -0 umbrello/uml.cpp
M +4 -1 umbrello/umlview.cpp
--- trunk/KDE/kdesdk/umbrello/ChangeLog.2 #689216:689217
@ -30,3 +30,4 @
* Input / Output / Constant Pins.
* RMB LogicalView->New->Class in treeview creates TWO classes (144537)
* New code generator for D language
+* Add option for automatic drawing attribute associations in class diagram (147061)
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classoptionspage.cpp #689216:689217
@ -45,6 +45,7 @
m_pShowStereotypeCB = NULL;
m_pShowAttsCB = NULL;
m_pShowAttSigCB = NULL;
+ m_pShowAttribAssocsCB = NULL;
m_pDrawAsCircleCB = NULL;
}
@ -154,6 +155,10 @
m_pShowStereotypeCB -> setChecked(m_options->classState.showStereoType);
visibilityLayout -> addWidget(m_pShowStereotypeCB, 2, 1);
+ m_pShowAttribAssocsCB = new QCheckBox(i18n("&Attribute associations"), m_pVisibilityGB);
+ m_pShowAttribAssocsCB -> setChecked(m_options->classState.showAttribAssocs);
+ visibilityLayout -> addWidget(m_pShowAttribAssocsCB, 3, 1);
+
}
void ClassOptionsPage::updateUMLWidget() {
@ -188,6 +193,8 @
if (m_pShowStereotypeCB)
m_options->classState.showStereoType = m_pShowStereotypeCB->isChecked();
m_options->classState.showPackage = m_pShowPackageCB->isChecked();
+ if (m_pShowAttribAssocsCB)
+ m_options->classState.showAttribAssocs = m_pShowAttribAssocsCB->isChecked();
if (m_pShowAttSigCB)
m_options->classState.showAttSig = m_pShowAttSigCB->isChecked();
m_options->classState.showOpSig = m_pShowOpSigCB->isChecked();
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classoptionspage.h #689216:689217
@ -92,7 +92,8 @
QCheckBox * m_pShowVisibilityCB, * m_pShowAttSigCB;
QCheckBox * m_pShowOpSigCB, * m_pShowAttsCB, * m_pShowOpsCB;
QCheckBox * m_pShowStereotypeCB, * m_pShowPackageCB;
- QCheckBox* m_pDrawAsCircleCB;
+ QCheckBox * m_pShowAttribAssocsCB;
+ QCheckBox * m_pDrawAsCircleCB;
/**
* The classifier widget to represent in the dialog page.
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umlviewdialog.cpp #689216:689217
@ -113,9 +113,9 @
pageDisplayItem->setIcon( KIcon( DesktopIcon( "document-properties") ));
addPage( pageDisplayItem);
- QHBoxLayout * m_pOptionsLayout = new QHBoxLayout( newPage );
+ QHBoxLayout * pOptionsLayout = new QHBoxLayout( newPage );
m_pOptionsPage = new ClassOptionsPage( newPage, &m_options );
- m_pOptionsLayout -> addWidget( m_pOptionsPage );
+ pOptionsLayout -> addWidget( m_pOptionsPage );
}
void UMLViewDialog::setupColorPage() {
--- trunk/KDE/kdesdk/umbrello/umbrello/optionstate.h #689216:689217
@ -62,6 +62,7 @
bool showAttSig;
bool showOpSig;
bool showPackage;
+ bool showAttribAssocs;
Uml::Visibility defaultAttributeScope;
Uml::Visibility defaultOperationScope;
};
--- trunk/KDE/kdesdk/umbrello/umbrello/umbrello.kcfg #689216:689217
@ -154,6 +154,11 @
<whatisthis>Show Stereotypes</whatisthis>
<default>true</default>
</entry>
+ <entry name="showAttribAssocs" type="Bool">
+ <label>Show Attribute Associations</label>
+ <whatisthis>Show Attribute Associations</whatisthis>
+ <default>true</default>
+ </entry>
<entry name="showAttSig" type="Bool">
<label>Show Attribute Signature</label>
<whatisthis>Show Attribute Signature</whatisthis>
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #689216:689217
@ -695,6 +695,7 @
UmbrelloSettings::setShowAttSig( optionState.classState.showAttSig );
UmbrelloSettings::setShowOpSig( optionState.classState.showOpSig );
UmbrelloSettings::setShowPackage( optionState.classState.showPackage );
+ UmbrelloSettings::setShowAttribAssocs( optionState.classState.showAttribAssocs );
UmbrelloSettings::setDefaultAttributeScope( optionState.classState.defaultAttributeScope);
UmbrelloSettings::setDefaultOperationScope( optionState.classState.defaultOperationScope);
@ -1349,6 +1350,7 @
optionState.classState.showAttSig = UmbrelloSettings::showAttSig();
optionState.classState.showOpSig = UmbrelloSettings::showOpSig();
optionState.classState.showPackage = UmbrelloSettings::showPackage();
+ optionState.classState.showAttribAssocs = UmbrelloSettings::showAttribAssocs();
optionState.classState.defaultAttributeScope = UmbrelloSettings::defaultAttributeScope();
optionState.classState.defaultOperationScope = UmbrelloSettings::defaultOperationScope();
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #689216:689217
@ -2227,7 +2227,7 @
}
void UMLView::createAutoAttributeAssociations(UMLWidget *widget) {
- if (widget == NULL || m_Type != Uml::dt_Class)
+ if (widget == NULL || m_Type != Uml::dt_Class || !m_Options.classState.showAttribAssocs)
return;
// Pseudocode:
@ -3108,6 +3108,7 @
viewElement.setAttribute( "showopsig", m_Options.classState.showOpSig );
viewElement.setAttribute( "showops", m_Options.classState.showOps );
viewElement.setAttribute( "showpackage", m_Options.classState.showPackage );
+ viewElement.setAttribute( "showattribassocs", m_Options.classState.showAttribAssocs );
viewElement.setAttribute( "showscope", m_Options.classState.showVisibility );
viewElement.setAttribute( "showstereotype", m_Options.classState.showStereoType );
//misc
@ -3202,6 +3203,8 @
m_Options.classState.showOps = (bool)temp.toInt();
temp = qElement.attribute( "showpackage", "0" );
m_Options.classState.showPackage = (bool)temp.toInt();
+ temp = qElement.attribute( "showattribassocs", "0" );
+ m_Options.classState.showAttribAssocs = (bool)temp.toInt();
temp = qElement.attribute( "showscope", "0" );
m_Options.classState.showVisibility = (bool)temp.toInt();
temp = qElement.attribute( "showstereotype", "0" );
More information about the umbrello-devel
mailing list