summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-11-03 14:32:29 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-11-03 18:29:03 +0100
commitd9a30729c5d9b40235fa81136efe8e5c7ba6e841 (patch)
treeaa2175b8124e63c754ade9fb7ec71987e0201971 /examples
parentc00b14b0cea87d3b5d01be2c7a810d5a3b419ee1 (diff)
Fix visibility() function in UML concrete syntax UML files
Change-Id: I556f1aa356b0f7e580936ed7fa7b362f08fca728 Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/uml/duse-mt/src/plugins/umlconcretesyntax/UmlClass.qml9
-rw-r--r--examples/uml/duse-mt/src/plugins/umlconcretesyntax/util.js54
2 files changed, 59 insertions, 4 deletions
diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/UmlClass.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/UmlClass.qml
index 0babe90f..7e6106ee 100644
--- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/UmlClass.qml
+++ b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/UmlClass.qml
@@ -78,10 +78,11 @@ UmlElement {
function visibility(visibilityEnum)
{
switch (visibilityEnum) {
- case 0: return "+"
- case 1: return "-"
- case 2: return "#"
- case 3: return "~"
+ case 0: return " "
+ case 1: return "+"
+ case 2: return "-"
+ case 3: return "#"
+ case 4: return "~"
}
}
}
diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/util.js b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/util.js
new file mode 100644
index 00000000..f422aca6
--- /dev/null
+++ b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/util.js
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Sandro S. Andrade <sandroandrade@kde.org>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtUml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+function findElement(owner, elementName) {
+ console.log("Procurando " + elementName + " in " + owner.name);
+ console.log(owner.ownedElements);
+ var ret;
+ for (var i = 0; i < owner.ownedElements.length; ++i) {
+ console.log("Analyzing " + owner.ownedElements[i].name);
+ ret = findElement(owner.ownedElements[i], elementName);
+ if (ret != null)
+ break;
+ }
+ if (ret == null && owner.objectName == elementName)
+ ret = owner;
+ return ret;
+}