diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-06-23 17:10:48 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-06-23 22:10:10 +0200 |
commit | eeedc3cfbaec881fc717309b228bea4004ac2875 (patch) | |
tree | f5355e1233a7db0a1c12be2c561557092a2b77e3 /src/uml/qumlclass.cpp | |
parent | 0fb17589f45752f4eb72edf250ee403d2b0123c8 (diff) |
Provide initial QML representation of classes' operations
Change-Id: I797fbe987edebb8251e6688b1d63f27284ba79a1
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumlclass.cpp')
-rw-r--r-- | src/uml/qumlclass.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/uml/qumlclass.cpp b/src/uml/qumlclass.cpp index 286a4ba8..0ba6ad29 100644 --- a/src/uml/qumlclass.cpp +++ b/src/uml/qumlclass.cpp @@ -1066,10 +1066,14 @@ QSet<QUmlNamedElement *> QUmlClass::inherit(QSet<QUmlNamedElement *> inhs) const void QUmlClass::setQmlContextProperties(QQmlContext *qmlContext) { qmlContext->setContextProperty(QString::fromLatin1("element"), this); - QVariantList varList; + QVariantList attributeList; foreach (QUmlProperty *property, ownedAttributes()) - varList << qVariantFromValue(property); - qmlContext->setContextProperty(QString::fromLatin1("attributes"), varList); + attributeList << qVariantFromValue(property); + qmlContext->setContextProperty(QString::fromLatin1("attributes"), attributeList); + QVariantList operationList; + foreach (QUmlOperation *operation, ownedOperations()) + operationList << qVariantFromValue(operation); + qmlContext->setContextProperty(QString::fromLatin1("operations"), operationList); } void QUmlClass::setPropertyData() |