[umbrello] [Bug 73847] support for UML tagged values

Oliver Kellogg bugzilla_noreply at kde.org
Mon Dec 21 23:37:01 GMT 2020


--- Comment #28 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 66da747fe8dbd48aeea79074da9e06539e4aee59 by Oliver Kellogg.
Committed on 13/10/2020 at 21:44.
Pushed by okellogg into branch 'master'.

Add default value capability at stereotype attribute:

- In class AttributeDef,
  - add member defaultVal of type QString;
  - extend constructor for externally provided defaultVal.

- In function saveToXMI1 loop over m_attrDefs, if ad.defaultVal is
  non empty then setAttribute "initialValue" on attElement.
- In function load1 traversal of QDomNodes tag "UML:Stereotype.feature"
  while-loop over attElem tag "UML:Attribute" retrieve attElem attribute
  "initialValue" into local dfltVal of type QString.
  Pass dfltVal into AttributeDef constructor.

- Add member m_pDefaultValueLabel[N_STEREOATTRS] of type QLabel*.
- Add member m_pDefaultValueEdit [N_STEREOATTRS] of type KLineEdit*.

- In function setupDialog() for-loop of row,
  - place m_pDefaultValueLabel[row], m_pDefaultValueEdit[row] into
    columns 4, 5 using Dialog_Utils::makeLabeledEditField();
  - in case (adefs.count() > row) initialize m_pDefaultValueEdit[row]
    from adefs.at(row).defaultVal.
- In function apply() pass m_pDefaultValueEdit[i]->text().trimmed()
  into UMLStereotype::AttributeDef constructor argument dfltVal.

M  +11   -2    umbrello/dialogs/stereoattributedialog.cpp
M  +7    -5    umbrello/dialogs/stereoattributedialog.h
M  +4    -1    umbrello/uml1model/stereotype.cpp
M  +5    -3    umbrello/uml1model/stereotype.h


You are receiving this mail because:
You are the assignee for the bug.

More information about the umbrello-devel mailing list