diff options
Diffstat (limited to 'examples/uml/duse-mt/src/plugins')
115 files changed, 0 insertions, 6570 deletions
diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.json b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.json deleted file mode 100644 index 1952997f..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Category": "Architecture Recovery", - "Vendor": "Qt Project", - "Version": "1.0", - "DependencyList": [ - "ArchitectureRecoveryCorePlugin" - ] -} diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.pro b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.pro deleted file mode 100644 index f1964825..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm.pro +++ /dev/null @@ -1,24 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-08-13T04:20:30 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT -= widgets gui - -DEFINES += ACDCARCHITECTURERECOVERYALGORITHM_LIBRARY - -HEADERS += \ - acdcarchitecturerecoveryalgorithm_export.h \ - acdcarchitecturerecoveryalgorithmplugin.h \ - dependencyrelationstreemanager.h \ - subgraphdominatorpattern.h - -SOURCES += \ - acdcarchitecturerecoveryalgorithmplugin.cpp \ - dependencyrelationstreemanager.cpp \ - subgraphdominatorpattern.cpp - -OTHER_FILES += acdcarchitecturerecoveryalgorithm.json diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_dependencies.pri b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_dependencies.pri deleted file mode 100644 index d7045bf4..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_dependencies.pri +++ /dev/null @@ -1,4 +0,0 @@ -DUSEMT_PLUGIN_NAME = AcdcArchitectureRecoveryAlgorithm - -DUSEMT_PLUGIN_DEPENDS += \ - architecturerecoverycore diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_export.h b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_export.h deleted file mode 100644 index 87d44411..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithm_export.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ - -#ifndef ACDCARCHITECTURERECOVERYALGORITHM_EXPORT_H -#define ACDCARCHITECTURERECOVERYALGORITHM_EXPORT_H - -#include <qglobal.h> - -#if defined(ACDCARCHITECTURERECOVERYALGORITHM_LIBRARY) -# define ACDCARCHITECTURERECOVERYALGORITHM_EXPORT Q_DECL_EXPORT -#else -# define ACDCARCHITECTURERECOVERYALGORITHM_EXPORT Q_DECL_IMPORT -#endif - -#endif // ACDCARCHITECTURERECOVERYALGORITHM_EXPORT_H diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.cpp b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.cpp deleted file mode 100644 index 8a370d68..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "acdcarchitecturerecoveryalgorithmplugin.h" - -#include <QDebug> - -namespace DuSE -{ - -AcdcArchitectureRecoveryAlgorithmPlugin::AcdcArchitectureRecoveryAlgorithmPlugin(QObject *parent) - : IPlugin(parent), _dependencyRelationsTreeManager(new DependencyRelationsTreeManager), - _subgraphDominatorPattern(new SubgraphDominatorPattern) -{ - _name = "ACDC"; -} - -bool AcdcArchitectureRecoveryAlgorithmPlugin::initialize() -{ - return true; -} - -void AcdcArchitectureRecoveryAlgorithmPlugin::run() -{ - _dependencyRelationsTreeManager->fillNodesTable(_nodesTable, _dependencyRelations); - _dependencyRelationsTreeManager->orderNodes(_nodesTable, _orderedNodes); - _subgraphDominatorPattern->executePattern(_orderedNodes, _dependencyRelations); - _subgraphs = _subgraphDominatorPattern->subgraphs(); - _orphanNodes = _subgraphDominatorPattern->orphanNodes(_subgraphs, _dependencyRelations); - _subgraphs.append(_orphanNodes); -} - -void AcdcArchitectureRecoveryAlgorithmPlugin::setDependencyRelations(QMultiMap<QString, QString> m_dependencyRelations) -{ - _dependencyRelations = m_dependencyRelations; -} - -QList<QStringList> AcdcArchitectureRecoveryAlgorithmPlugin::subgraphs() -{ - return _subgraphs; -} - -void AcdcArchitectureRecoveryAlgorithmPlugin::setDevelopmentPlatform(IDevelopmentPlatform *m_developmentPlatform) -{ - _developmentPlatform = m_developmentPlatform; -} - -void AcdcArchitectureRecoveryAlgorithmPlugin::setModelingNotation(IModelingNotation *m_modelingNotation) -{ - _modelingNotation = m_modelingNotation; -} - -IDevelopmentPlatform *AcdcArchitectureRecoveryAlgorithmPlugin::developmentPlatform() -{ - return _developmentPlatform; -} - -IModelingNotation *AcdcArchitectureRecoveryAlgorithmPlugin::modelingNotation() -{ - return _modelingNotation; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.h b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.h deleted file mode 100644 index 719485e7..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef ACDCARCHITECTURERECOVERYALGORITHMPLUGIN_H -#define ACDCARCHITECTURERECOVERYALGORITHMPLUGIN_H - -#include <QMultiMap> -#include <QHash> - -#include <duseinterfaces/iplugin.h> -#include <architecturerecoverycore/iarchitecturerecoveryalgorithm.h> - -#include "dependencyrelationstreemanager.h" -#include "subgraphdominatorpattern.h" - -#include "acdcarchitecturerecoveryalgorithm_export.h" - -namespace DuSE -{ - -class ACDCARCHITECTURERECOVERYALGORITHM_EXPORT AcdcArchitectureRecoveryAlgorithmPlugin : public IPlugin, public IArchitectureRecoveryAlgorithm -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "acdcarchitecturerecoveryalgorithm.json") - -public: - AcdcArchitectureRecoveryAlgorithmPlugin(QObject *parent = 0); - - virtual bool initialize(); - - virtual void run(); - - void setDependencyRelations(QMultiMap<QString, QString> m_dependencyRelations); - QList<QStringList> subgraphs(); - - virtual void setDevelopmentPlatform(IDevelopmentPlatform *m_developmentPlatform); - virtual void setModelingNotation(IModelingNotation *m_modelingNotation); - - virtual IDevelopmentPlatform* developmentPlatform(); - virtual IModelingNotation* modelingNotation(); - -private: - IDevelopmentPlatform *_developmentPlatform; - IModelingNotation *_modelingNotation; - QMultiMap<QString, QString> _dependencyRelations; - DependencyRelationsTreeManager *_dependencyRelationsTreeManager; - QHash<QString, int> _nodesTable; - QStringList _orderedNodes; - SubgraphDominatorPattern *_subgraphDominatorPattern; - QList<QStringList> _subgraphs; - QStringList _orphanNodes; -}; - -} - -#endif // ACDCARCHITECTURERECOVERYALGORITHMPLUGIN_H diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.cpp b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.cpp deleted file mode 100644 index 237ed055..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "dependencyrelationstreemanager.h" - -namespace DuSE -{ - -DependencyRelationsTreeManager::DependencyRelationsTreeManager() -{ -} - -void DependencyRelationsTreeManager::fillNodesTable(QHash<QString, int> &nodesTable, const QMultiMap<QString, QString> &dependencies) -{ - foreach (QString key, dependencies.uniqueKeys()) { - nodesTable.insert(key, dependencies.values(key).count()); - } - - foreach (QString value, dependencies.values()) { - if (!nodesTable.keys().contains(value)) { - nodesTable.insert(value, 0); - } - } -} - -void DependencyRelationsTreeManager::orderNodes(const QHash<QString, int> &nodesTable, QStringList &nodeList) -{ - int max = findMax(nodesTable); - - for (int i = 1; i <= max; ++i) { - foreach (QString node, nodesTable.keys()) { - int count = nodesTable.value(node); - - if (i == count) { - nodeList.append(node); - } - } - } -} - -int DependencyRelationsTreeManager::findMax(const QHash<QString, int> &nodesTable) -{ - int max = 0; - foreach (int count, nodesTable.values()) { - if (count > max) { - max = count; - } - } - - return max; -} - -QStringList DependencyRelationsTreeManager::targets(const QStringList &nodesList, const QMultiMap<QString, QString> &dependencies) -{ - QStringList coveredNodes; - foreach (QString itemNode, nodesList) { - foreach (QString coveredNode, dependencies.values(itemNode)) { - if ((coveredNode != itemNode) && !coveredNodes.contains(coveredNode)) { - coveredNodes.append(coveredNode); - } - } - } - - return coveredNodes; -} - -QStringList DependencyRelationsTreeManager::sources(QString node, QMultiMap<QString, QString> dependencies) -{ - QStringList sourceList; - - foreach (QString key, dependencies.keys()) { - if (dependencies.values(key).contains(node)) { - sourceList.append(key); - } - } - - return sourceList; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.h b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.h deleted file mode 100644 index c17faee6..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/dependencyrelationstreemanager.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef DEPENDENCYRELATIONSTREEMANAGER_H -#define DEPENDENCYRELATIONSTREEMANAGER_H - -#include <QMultiMap> -#include <QHash> -#include <QStringList> - -namespace DuSE -{ - -class DependencyRelationsTreeManager -{ -public: - DependencyRelationsTreeManager(); - - void fillNodesTable(QHash<QString, int> &nodesTable, const QMultiMap<QString, QString> &dependencies); - void orderNodes(const QHash<QString, int> &nodesTable, QStringList &nodeList); - int findMax(const QHash<QString, int> &nodesTable); - QStringList targets(const QStringList &nodesList, const QMultiMap<QString, QString> &dependencies); - QStringList sources(QString node, QMultiMap<QString, QString> dependencies); -}; - -} - -#endif // DEPENDENCYRELATIONSTREEMANAGER_H diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.cpp b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.cpp deleted file mode 100644 index 17ebf6f9..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "subgraphdominatorpattern.h" - -namespace DuSE -{ - -SubgraphDominatorPattern::SubgraphDominatorPattern() -{ -} - -void SubgraphDominatorPattern::executePattern(const QStringList &orderedNodes, QMultiMap<QString, QString> dependencies) -{ - // Para cada nó da lista de nós ordenados - foreach (QString node, orderedNodes) { - - // Chamar coveredSet - QStringList coveredNodes = coveredSet(node, dependencies); - - if (coveredNodes.contains(node) && (coveredNodes.count() == 1)) { - } else { - // Um Subgraph Dominator foi descoberto. Ele será adicionado na lista e será removido do Hash de dependências. - _subgraphs.append(coveredNodes); - } - } -} - -QStringList SubgraphDominatorPattern::coveredSet(QString node, QMultiMap<QString, QString> dependencies) -{ - QStringList list; - QStringList covered; - - // Criar uma lista e colocar o nó lá dentro - list.append(node); - int currentListSize = 0; - int originalListSize = 0; - - do { - originalListSize = list.count(); - - // Guardar em covered os nós para os quais todos os nós da lista apontam, - // exceto os próprios nós (ou seja, não considera loops) da lista. - covered = _treeManager.targets(list, dependencies); - - // Cria uma lista falseOnes - QStringList falseOnes; - int currentCoveredSize = 0; - int originalCoveredSize = 0; - do { - originalCoveredSize = covered.count(); - - // Tirar uma cópia de covered e guardar em both - QStringList both = covered; - - // Adicionar a lista em both - foreach (QString itemNode, list) { - if (!both.contains(itemNode)) { - both.append(list); - } - } - - foreach (QString coveredNode, covered) { - bool nodeIsFalseOne = false; - QStringList sourceList = _treeManager.sources(coveredNode, dependencies); - foreach (QString source, sourceList) { - if (!both.contains(source)) { - nodeIsFalseOne = true; - break; - } - } - - if (nodeIsFalseOne == true) { - falseOnes.append(coveredNode); - } - } - - foreach (QString falseOne, falseOnes) { - covered.removeOne(falseOne); - } - currentCoveredSize = covered.count(); - } while (originalCoveredSize != currentCoveredSize); - - foreach (QString coveredNode, covered) { - if (!list.contains(coveredNode)) { - list.append(coveredNode); - } - } - currentListSize = list.count(); - } while (originalListSize != currentListSize); - - return list; -} - -QStringList SubgraphDominatorPattern::orphanNodes(const QList<QStringList> &subgraphs, QMultiMap<QString, QString> dependencies) -{ - QStringList orphanContainer; - QStringList allNodes; - - foreach (QString dependent, dependencies.uniqueKeys()) { - if (!allNodes.contains(dependent)) { - allNodes.append(dependent); - } - foreach (QString dependency, dependencies.values(dependent)) { - if (!allNodes.contains(dependency)) { - allNodes.append(dependency); - } - } - } - - foreach (QString node, allNodes) { - bool nodeIsOrphan = true; - - foreach (QStringList subgraph, subgraphs) { - if (subgraph.contains(node)) { - nodeIsOrphan = false; - break; - } - } - - if (nodeIsOrphan == true) { - if (!orphanContainer.contains(node)) { - orphanContainer.append(node); - } - } - } - - return orphanContainer; -} - -QList<QStringList> SubgraphDominatorPattern::subgraphs() -{ - return _subgraphs; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.h b/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.h deleted file mode 100644 index 3f4d3ba3..00000000 --- a/examples/uml/duse-mt/src/plugins/acdcarchitecturerecoveryalgorithm/subgraphdominatorpattern.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef SUBGRAPHDOMINATORPATTERN_H -#define SUBGRAPHDOMINATORPATTERN_H - -#include <QMultiMap> -#include <QStringList> - -#include "dependencyrelationstreemanager.h" - -namespace DuSE -{ - -class SubgraphDominatorPattern -{ -public: - SubgraphDominatorPattern(); - - void executePattern(const QStringList &orderedNodes, QMultiMap<QString, QString> dependencies); - QStringList coveredSet(QString node, QMultiMap<QString, QString> dependencies); - QStringList orphanNodes(const QList<QStringList> &subgraphs, QMultiMap<QString, QString> dependencies); - - QList<QStringList> subgraphs(); - -private: - QList<QStringList> _subgraphs; - DependencyRelationsTreeManager _treeManager; -}; - -} - -#endif // SUBGRAPHDOMINATORPATTERN_H diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.json b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.json deleted file mode 100644 index 24b56a79..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Architecture Recovery", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.pro b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.pro deleted file mode 100644 index 3044c484..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore.pro +++ /dev/null @@ -1,20 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-11-03T17:38:51 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT += gui widgets - -HEADERS += architecturerecoverycoreplugin.h \ - iarchitecturerecoverybackend.h \ - imodelingnotation.h \ - iarchitecturerecoveryalgorithm.h - -SOURCES += architecturerecoverycoreplugin.cpp - -OTHER_FILES += architecturerecoverycore.json - -FORMS += diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore_dependencies.pri b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore_dependencies.pri deleted file mode 100644 index 02a1c417..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycore_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = ArchitectureRecoveryCore diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp deleted file mode 100644 index 3a2b420b..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "architecturerecoverycoreplugin.h" - -#include <QtCore/QDebug> - -#include <duseinterfaces/iplugincontroller.h> -#include "iarchitecturerecoverybackend.h" - -namespace DuSE -{ - -ArchitectureRecoveryCorePlugin::ArchitectureRecoveryCorePlugin(QObject *parent) : - IPlugin(parent) -{ -} - -bool ArchitectureRecoveryCorePlugin::initialize() -{ - return true; -} - -void ArchitectureRecoveryCorePlugin::loadPluginsList() -{ -} - -void ArchitectureRecoveryCorePlugin::loadRecoveryBackends() -{ -} - -void ArchitectureRecoveryCorePlugin::loadRecoveryAlgorithms() -{ - -} - -void ArchitectureRecoveryCorePlugin::loadModelingNotations() -{ - -} - -QList<IArchitectureRecoveryBackend *> ArchitectureRecoveryCorePlugin::recoveryBackends() -{ - return _recoveryBackends; -} - -QList<IArchitectureRecoveryAlgorithm *> ArchitectureRecoveryCorePlugin::recoveryAlgorithms() -{ - return _recoveryAlgorithms; -} - -QList<IModelingNotation *> ArchitectureRecoveryCorePlugin::modelingNotations() -{ - return _modelingNotations; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.h b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.h deleted file mode 100644 index df439048..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/architecturerecoverycoreplugin.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef ARCHITECTURERECOVERYCOREPLUGIN_H -#define ARCHITECTURERECOVERYCOREPLUGIN_H - -#include <architecturerecoverycore/iarchitecturerecoverybackend.h> -#include <architecturerecoverycore/iarchitecturerecoveryalgorithm.h> -#include <architecturerecoverycore/imodelingnotation.h> -#include <duseinterfaces/iplugin.h> - -namespace DuSE -{ - -class ArchitectureRecoveryCorePlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "architecturerecoverycore.json") - -public: - ArchitectureRecoveryCorePlugin(QObject *parent = 0); - - virtual bool initialize(); - - void loadPluginsList(); - void loadRecoveryBackends(); - void loadRecoveryAlgorithms(); - void loadModelingNotations(); - QList<IArchitectureRecoveryBackend *> recoveryBackends(); - QList<IArchitectureRecoveryAlgorithm *> recoveryAlgorithms(); - QList<IModelingNotation *> modelingNotations(); - -private: - QList<const QMetaObject*> _metaObjects; - QList<IArchitectureRecoveryBackend *> _recoveryBackends; - QList<IArchitectureRecoveryAlgorithm *> _recoveryAlgorithms; - QList<IModelingNotation *> _modelingNotations; -}; - -} - -#endif // ARCHITECTURERECOVERYCOREPLUGIN - diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoveryalgorithm.h b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoveryalgorithm.h deleted file mode 100644 index 71498f4a..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoveryalgorithm.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtDuse 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$ -** -****************************************************************************/ -#ifndef IARCHITECTURERECOVERYALGORITHM_H -#define IARCHITECTURERECOVERYALGORITHM_H - -namespace DuSE -{ - -class IDevelopmentPlatform; -class IModelingNotation; - -class IArchitectureRecoveryAlgorithm -{ - -public: - virtual void run() = 0; - - virtual void setDevelopmentPlatform(IDevelopmentPlatform *m_developmentPlatform) = 0; - virtual void setModelingNotation(IModelingNotation *m_modelingNotation) = 0; - - virtual IDevelopmentPlatform* developmentPlatform() = 0; - virtual IModelingNotation* modelingNotation() = 0; -}; - -} - -#endif // IARCHITECTURERECOVERYALGORITHM_H - diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoverybackend.h b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoverybackend.h deleted file mode 100644 index 964c4de5..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/iarchitecturerecoverybackend.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtDuse 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$ -** -****************************************************************************/ -#ifndef IARCHITECTURERECOVERYBACKEND_H -#define IARCHITECTURERECOVERYBACKEND_H - -#include <QObjectList> -#include <QString> - -namespace DuSE -{ - -class IArchitectureRecoveryBackend -{ -public: - virtual QObjectList components() = 0; - virtual QObjectList connectors() = 0; -}; - -} - -#endif // IARCHITECTURERECOVERYBACKEND_H diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/imodelingnotation.h b/examples/uml/duse-mt/src/plugins/architecturerecoverycore/imodelingnotation.h deleted file mode 100644 index 504e1baa..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverycore/imodelingnotation.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtDuse 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$ -** -****************************************************************************/ -#ifndef IMODELINGNOTATION_H -#define IMODELINGNOTATION_H - -QT_BEGIN_NAMESPACE -class QString; -QT_END_NAMESPACE - -namespace DuSE -{ - -class IModelingNotation -{ - -public: - virtual void generateDiagram(const QString &name) = 0; -}; - -} - -#endif // IMODELINGNOTATION_H - diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.cpp b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.cpp deleted file mode 100644 index 457e03dd..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "architecturerecoverypanel.h" -#include "ui_architecturerecoverypanel.h" - -#include <QtCore/QDebug> - -#include <duseinterfaces/iplugincontroller.h> - -namespace DuSE -{ - -ArchitectureRecoveryPanel::ArchitectureRecoveryPanel(QWidget *parent) : - QDialog(parent), - ui(new Ui::ArchitectureRecoveryPanel) -{ - ui->setupUi(this); - - connect(ui->startPushButton, SIGNAL(clicked()), this, SLOT(run())); -} - -ArchitectureRecoveryPanel::~ArchitectureRecoveryPanel() -{ - delete ui; -} - -void ArchitectureRecoveryPanel::loadPanel() -{ - loadBackendPlugins(); - loadAlgorithmPlugins(); - loadNotationPlugins(); - show(); -} - -void ArchitectureRecoveryPanel::run() -{ - GccXmlArchitectureRecoveryBackendPlugin *gccXmlBackend = new GccXmlArchitectureRecoveryBackendPlugin; - AcdcArchitectureRecoveryAlgorithmPlugin *acdcAlgorithm = new AcdcArchitectureRecoveryAlgorithmPlugin; - UmlModelingNotationPlugin *umlNotation = new UmlModelingNotationPlugin; - - gccXmlBackend->run(); - DependencyRelations dependencyRelations = gccXmlBackend->components().at(0)->property("components").value<DependencyRelations>(); - QString systemDirectory = gccXmlBackend->components().at(0)->property("systemDirectory").toString(); - - acdcAlgorithm->setDependencyRelations(dependencyRelations); - acdcAlgorithm->run(); - QList<QStringList> subgraphs = acdcAlgorithm->subgraphs(); - - umlNotation->setClusterList(subgraphs); - umlNotation->loadSubsystems(); - umlNotation->generateDiagram(systemDirectory); -} - -void ArchitectureRecoveryPanel::loadBackendPlugins() -{ - ui->backendComboBox->addItem("GCC-XML"); -} - -void ArchitectureRecoveryPanel::loadAlgorithmPlugins() -{ - ui->algorithmComboBox->addItem("ACDC (Algorithm for Compreehension-Driven Clustering)"); -} - -void ArchitectureRecoveryPanel::loadNotationPlugins() -{ - ui->notationComboBox->addItem("UML (Unified Modeling Language)"); -} - -} diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.h b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.h deleted file mode 100644 index 4d59cca2..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef ARCHITECTURERECOVERYPANEL_H -#define ARCHITECTURERECOVERYPANEL_H - -#include <QtCore/QMap> -#include <QtWidgets/QDialog> - -#include <acdcarchitecturerecoveryalgorithm/acdcarchitecturerecoveryalgorithmplugin.h> -#include <architecturerecoverycore/architecturerecoverycoreplugin.h> -#include <architecturerecoverycore/iarchitecturerecoveryalgorithm.h> -#include <architecturerecoverycore/iarchitecturerecoverybackend.h> -#include <duseinterfaces/iplugin.h> -#include <gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.h> -#include <umlmodelingnotation/umlmodelingnotationplugin.h> - -namespace DuSE -{ - -namespace Ui { - class ArchitectureRecoveryPanel; -} - -class ArchitectureRecoveryPanel : public QDialog -{ - Q_OBJECT - -public: - explicit ArchitectureRecoveryPanel(QWidget *parent = 0); - ~ArchitectureRecoveryPanel(); - - void loadBackendPlugins(); - void loadAlgorithmPlugins(); - void loadNotationPlugins(); - -public Q_SLOTS: - void loadPanel(); - void run(); - -private: - Ui::ArchitectureRecoveryPanel *ui; - QMap<QString, IPlugin *> backendPluginsMap; - QMap<QString, IArchitectureRecoveryAlgorithm *> algorithmPluginsMap; - QMap<QString, IModelingNotation *> notationPluginsMap; - ArchitectureRecoveryCorePlugin *architectureRecoveryCore; -}; - -#endif // ARCHITECTURERECOVERYPANEL_H - -} - - diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.json b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.json deleted file mode 100644 index 3b9d9911..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Category": "Architecture Recovery", - "Vendor": "Qt Project", - "Version": "1.0", - "DependencyList": [ - "ArchitectureRecoveryCorePlugin", - "GccXmlArchitectureRecoveryBackendPlugin", - "AcdcArchitectureRecoveryAlgorithmPlugin", - "UmlModelingNotationPlugin" - ] - -} diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.pro b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.pro deleted file mode 100644 index f575d181..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.pro +++ /dev/null @@ -1,22 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-11-03T17:38:51 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT += gui widgets modeling - -HEADERS += \ - architecturerecoverypanel.h \ - architecturerecoverypanelplugin.h - -SOURCES += \ - architecturerecoverypanel.cpp \ - architecturerecoverypanelplugin.cpp - -OTHER_FILES += architecturerecoverypanel.json - -FORMS += \ - architecturerecoverypanel.ui diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.ui b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.ui deleted file mode 100644 index 627a06f2..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel.ui +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DuSE::ArchitectureRecoveryPanel</class> - <widget class="QDialog" name="DuSE::ArchitectureRecoveryPanel"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>393</width> - <height>265</height> - </rect> - </property> - <property name="windowTitle"> - <string>Dialog</string> - </property> - <widget class="QLabel" name="algorithmLabel"> - <property name="geometry"> - <rect> - <x>10</x> - <y>110</y> - <width>71</width> - <height>16</height> - </rect> - </property> - <property name="text"> - <string>Algoritmo:</string> - </property> - </widget> - <widget class="QComboBox" name="notationComboBox"> - <property name="geometry"> - <rect> - <x>90</x> - <y>170</y> - <width>291</width> - <height>23</height> - </rect> - </property> - </widget> - <widget class="QLabel" name="notationLabel"> - <property name="geometry"> - <rect> - <x>10</x> - <y>170</y> - <width>71</width> - <height>16</height> - </rect> - </property> - <property name="text"> - <string>Notação:</string> - </property> - </widget> - <widget class="QLabel" name="architectureProcessInformativeLabel"> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>381</width> - <height>16</height> - </rect> - </property> - <property name="text"> - <string>Defina as etapas do processo de recuperação arquitetural:</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - <widget class="QPushButton" name="startPushButton"> - <property name="geometry"> - <rect> - <x>279</x> - <y>220</y> - <width>101</width> - <height>23</height> - </rect> - </property> - <property name="text"> - <string>Iniciar</string> - </property> - </widget> - <widget class="QLabel" name="backendLabel"> - <property name="geometry"> - <rect> - <x>10</x> - <y>50</y> - <width>71</width> - <height>16</height> - </rect> - </property> - <property name="text"> - <string>Backend:</string> - </property> - </widget> - <widget class="QComboBox" name="backendComboBox"> - <property name="geometry"> - <rect> - <x>90</x> - <y>50</y> - <width>291</width> - <height>23</height> - </rect> - </property> - </widget> - <widget class="QComboBox" name="algorithmComboBox"> - <property name="geometry"> - <rect> - <x>90</x> - <y>110</y> - <width>291</width> - <height>23</height> - </rect> - </property> - </widget> - </widget> - <resources/> - <connections/> -</ui> diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel_dependencies.pri b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel_dependencies.pri deleted file mode 100644 index 40d209d3..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanel_dependencies.pri +++ /dev/null @@ -1,7 +0,0 @@ -DUSEMT_PLUGIN_NAME = ArchitectureRecoveryPanel - -DUSEMT_PLUGIN_DEPENDS += \ - architecturerecoverycore \ - gccxmlarchitecturerecoverybackend \ - acdcarchitecturerecoveryalgorithm \ - umlmodelingnotation diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.cpp b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.cpp deleted file mode 100644 index 9a8ee974..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "architecturerecoverypanelplugin.h" - -#include <QtCore/QDebug> -#include <QtWidgets/QAction> - -#include <duseinterfaces/iuicontroller.h> - -namespace DuSE -{ - -ArchitectureRecoveryPanelPlugin::ArchitectureRecoveryPanelPlugin(QObject *parent) - : IPlugin(parent), architectureRecoveryPanel(new ArchitectureRecoveryPanel) -{ -} - - -bool DuSE::ArchitectureRecoveryPanelPlugin::initialize() -{ - QAction *newArchitectureRecoveryProcessAction = new QAction(QIcon(), tr("New architecture recovery process"), this); - connect(newArchitectureRecoveryProcessAction, SIGNAL(triggered()), architectureRecoveryPanel, SLOT(loadPanel())); - ICore::self()->uiController()->addAction(newArchitectureRecoveryProcessAction, tr("menu_File")); - - return true; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.h b/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.h deleted file mode 100644 index a865f28b..00000000 --- a/examples/uml/duse-mt/src/plugins/architecturerecoverypanel/architecturerecoverypanelplugin.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef ARCHITECTURERECOVERYPANELPLUGIN_H -#define ARCHITECTURERECOVERYPANELPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -#include "architecturerecoverypanel.h" - -namespace DuSE -{ - -class ArchitectureRecoveryPanelPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "architecturerecoverypanel.json") - -public: - ArchitectureRecoveryPanelPlugin(QObject *parent = 0); - - virtual bool initialize(); - - void run(); - -private: - ArchitectureRecoveryPanel *architectureRecoveryPanel; -}; - -} - -#endif // ARCHITECTURERECOVERYPANELPLUGIN_H diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.json b/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.json deleted file mode 100644 index e845db64..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Concrete Syntax", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.pro b/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.pro deleted file mode 100644 index b6537f64..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview.pro +++ /dev/null @@ -1,17 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -QT += quick-private widgets - -include(../../duse-mt-plugin.pri) - -SOURCES += concretesyntaxviewplugin.cpp - -HEADERS += concretesyntaxviewplugin.h - -RESOURCES += qml/concretesyntaxview.qrc - -OTHER_FILES += concretesyntaxview.json diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview_dependencies.pri b/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview_dependencies.pri deleted file mode 100644 index 0acc930e..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxview_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = ConcreteSyntaxView diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.cpp b/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.cpp deleted file mode 100644 index 3e2dc1fb..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "concretesyntaxviewplugin.h" - -#include <duseinterfaces/iuicontroller.h> -#include <duseinterfaces/iprojectcontroller.h> - -#include <QtQuick/QQuickView> -#include <QtQuick/QQuickItem> - -#include "private/qquickflickable_p.h" - -#include <QtQml/QQmlEngine> -#include <QtQml/QQmlContext> - -#include <QtWidgets/QWidget> - -#include <QtCore/QDebug> -#include <QtCore/QRegularExpression> - -namespace DuSE -{ - -ConcreteSyntaxViewPlugin::ConcreteSyntaxViewPlugin(QObject *parent) : - IPlugin(parent), - _concreteSyntaxQuickView(new QQuickView) -{ -} - -bool ConcreteSyntaxViewPlugin::initialize() -{ - _concreteSyntaxQuickView->setResizeMode(QQuickView::SizeRootObjectToView); - ICore::self()->uiController()->addCentralWidgetTab(QWidget::createWindowContainer(_concreteSyntaxQuickView), "Concrete Syntax"); - initializeQuickView(); - - connect(ICore::self()->uiController(), &IUiController::addToView, this, &ConcreteSyntaxViewPlugin::addToView); - connect(ICore::self()->projectController(), SIGNAL(modelAboutToBeClosed(QList<QModelingObject *>)), this, SLOT(initializeQuickView())); - - return true; -} - -void ConcreteSyntaxViewPlugin::initializeQuickView() -{ - _concreteSyntaxQuickView->setSource(QUrl("qrc:/concretesyntaxview/concretesyntaxview.qml")); -} - -void ConcreteSyntaxViewPlugin::addToView(QObject *selectedModelingObject, QQuickItem *parent) -{ - QQmlContext *context = new QQmlContext(_concreteSyntaxQuickView->engine()->rootContext()); - context->setContextProperty("element", selectedModelingObject); - QQmlComponent *qmlComponent = new QQmlComponent(_concreteSyntaxQuickView->engine()); - int x = qrand() % 400; - int y = qrand() % 400; - qmlComponent->setData(QString("import QtQuick 2.0\nimport QtModeling.Uml 1.0\n\n%1 { x: %2; y: %3; objectName: \"%4\" }").arg(QString(selectedModelingObject->metaObject()->className()).remove(QRegularExpression("^Q")).remove(QRegularExpression("Object$"))).arg(x).arg(y).arg(selectedModelingObject->objectName()).toLatin1(), QUrl()); - - if (qmlComponent->isError()) { - qWarning() << qmlComponent->errors(); - } else { - QQuickItem *item = qobject_cast<QQuickItem *>(qmlComponent->beginCreate(context)); - if (item) { - item->setParentItem(parent ? parent:(qobject_cast<QQuickFlickable *>(_concreteSyntaxQuickView->rootObject()))->contentItem()); - qmlComponent->completeCreate(); - } - } - -// _concreteSyntaxQuickView->rootObject()->dumpObjectTree(); - qmlComponent->deleteLater(); -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.h b/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.h deleted file mode 100644 index df485f36..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/concretesyntaxviewplugin.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef CONCRETESYNTAXVIEWPLUGIN_H -#define CONCRETESYNTAXVIEWPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -QT_BEGIN_NAMESPACE -class QQuickView; -class QQuickItem; -QT_END_NAMESPACE - -namespace DuSE -{ - -class ConcreteSyntaxViewPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "concretesyntaxview.json") - -public: - ConcreteSyntaxViewPlugin(QObject *parent = 0); - - virtual bool initialize(); - -private Q_SLOTS: - void initializeQuickView(); - void addToView(QObject *selectedModelingObject, QQuickItem *parent = 0); - -private: - QQuickView *_concreteSyntaxQuickView; -}; - -} - -#endif // CONCRETESYNTAXVIEWPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qml b/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qml deleted file mode 100644 index c4f95246..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Flickable { - id: flickable - width: 200; height: 200 - contentHeight: 2890 - contentWidth: 1540 - rightMargin: 0; leftMargin: 0; topMargin: 0; bottomMargin: 0 - MouseArea { - anchors.fill: parent - onPressed: parent.focus = true; - } - Image { - anchors.fill: parent - fillMode: Image.Tile - source: "grid.png" - } -} diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qrc b/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qrc deleted file mode 100644 index dd25350d..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/concretesyntaxview.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/concretesyntaxview"> - <file>concretesyntaxview.qml</file> - <file>grid.png</file> - </qresource> -</RCC> diff --git a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/grid.png b/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/grid.png Binary files differdeleted file mode 100644 index 52162608..00000000 --- a/examples/uml/duse-mt/src/plugins/concretesyntaxview/qml/grid.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.json b/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.json deleted file mode 100644 index 901f0694..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Automated Architecture Design", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.pro b/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.pro deleted file mode 100644 index a234e8aa..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer.pro +++ /dev/null @@ -1,17 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -QT += quick widgets - -include(../../duse-mt-plugin.pri) - -SOURCES += designoptimizerplugin.cpp - -HEADERS += designoptimizerplugin.h - -RESOURCES += qml/designoptimizer.qrc - -OTHER_FILES += designoptimizer.json diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer_dependencies.pri b/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer_dependencies.pri deleted file mode 100644 index 31b2e66b..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizer_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = DesignOptimizer diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.cpp b/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.cpp deleted file mode 100644 index 43530a5f..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "designoptimizerplugin.h" - -#include <duseinterfaces/iuicontroller.h> - -#include <QtQuick/QQuickView> - -#include <QtWidgets/QWidget> - -namespace DuSE -{ - -DesignOptimizerPlugin::DesignOptimizerPlugin(QObject *parent) : - IPlugin(parent), - _paretoFrontQuickView(new QQuickView) -{ -} - -bool DesignOptimizerPlugin::initialize() -{ - _paretoFrontQuickView->setSource(QUrl("qrc:/designoptimizer/paretofront.qml")); - _paretoFrontQuickView->setResizeMode(QQuickView::SizeRootObjectToView); - - ICore::self()->uiController()->addCentralWidgetTab(QWidget::createWindowContainer(_paretoFrontQuickView), "Pareto Front"); - - return true; -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.h b/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.h deleted file mode 100644 index ab9d443f..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/designoptimizerplugin.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef DESIGNOPTIMIZERPLUGIN_H -#define DESIGNOPTIMIZERPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -QT_BEGIN_NAMESPACE -class QQuickView; -QT_END_NAMESPACE - -namespace DuSE -{ - -class DesignOptimizerPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "designoptimizer.json") - -public: - DesignOptimizerPlugin(QObject *parent = 0); - - virtual bool initialize(); - -private: - QQuickView *_paretoFrontQuickView; -}; - -} - -#endif // DESIGNOPTIMIZERPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/qml/designoptimizer.qrc b/examples/uml/duse-mt/src/plugins/designoptimizer/qml/designoptimizer.qrc deleted file mode 100644 index c9152415..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/qml/designoptimizer.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/designoptimizer"> - <file>paretofront.qml</file> - </qresource> -</RCC> diff --git a/examples/uml/duse-mt/src/plugins/designoptimizer/qml/paretofront.qml b/examples/uml/duse-mt/src/plugins/designoptimizer/qml/paretofront.qml deleted file mode 100644 index 69feb3dc..00000000 --- a/examples/uml/duse-mt/src/plugins/designoptimizer/qml/paretofront.qml +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - color: "lightgray" - width: 320 - height: 480 - property bool printDestruction: false - - VisualItemModel { - id: itemModel - - Rectangle { - width: view.width; height: view.height - color: "#FFFEF0" - } - Rectangle { - width: view.width; height: view.height - color: "#F0FFF7" - } - Rectangle { - width: view.width; height: view.height - color: "#F4F0FF" - } - } - - ListView { - id: view - anchors { fill: parent; bottomMargin: 30 } - model: itemModel - preferredHighlightBegin: 0; preferredHighlightEnd: 0 - highlightRangeMode: ListView.StrictlyEnforceRange - orientation: ListView.Horizontal - snapMode: ListView.SnapOneItem; flickDeceleration: 2000 - cacheBuffer: 200 - } - Rectangle { - width: root.width; height: 30 - anchors { top: view.bottom; bottom: parent.bottom } - color: "gray" - - Row { - anchors.centerIn: parent - spacing: 20 - - Repeater { - model: itemModel.count - - Rectangle { - width: 5; height: 5 - radius: 3 - color: view.currentIndex == index ? "blue" : "white" - - MouseArea { - width: 20; height: 20 - anchors.centerIn: parent - onClicked: view.currentIndex = index - } - } - } - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.json b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.json deleted file mode 100644 index 901f0694..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Automated Architecture Design", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.pro b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.pro deleted file mode 100644 index 56f99df5..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer.pro +++ /dev/null @@ -1,21 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -QT += widgets quick modeling modelingwidgets script uml duse - -include(../../duse-mt-plugin.pri) - -SOURCES += designspaceexplorerplugin.cpp \ - newdusedesigndialog.cpp - -HEADERS += designspaceexplorerplugin.h \ - newdusedesigndialog.h - -FORMS += newdusedesigndialog.ui - -RESOURCES += qml/designspaceexplorer.qrc - -OTHER_FILES += designspaceexplorer.json diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer_dependencies.pri b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer_dependencies.pri deleted file mode 100644 index 02490f2a..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorer_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = DesignSpaceExplorer diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp deleted file mode 100644 index 5c932725..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp +++ /dev/null @@ -1,404 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "designspaceexplorerplugin.h" - -#include <duseinterfaces/iuicontroller.h> -#include <duseinterfaces/iplugincontroller.h> -#include <duseinterfaces/iprojectcontroller.h> - -#include <QtQuick/QQuickView> - -#include <QtWidgets/QAction> -#include <QtWidgets/QComboBox> -#include <QtWidgets/QMessageBox> -#include <QtWidgets/QHeaderView> -#include <QtWidgets/QTableWidget> -#include <QtWidgets/QApplication> - -#include <QtCore/QFileInfo> - -#include <QtScript/QScriptValueIterator> - -#include <QtModeling/QXmiReader> -#include <QtModeling/QMetaModelPlugin> - -#include <QtModelingWidgets/QModelingObjectView> -#include <QtModelingWidgets/QModelingObjectModel> - -#include <QtUml/QUmlModel> -#include <QtUml/QUmlProfile> -#include <QtUml/QUmlProperty> -#include <QtUml/QUmlOpaqueExpression> -#include <QtUml/QUmlProfileApplication> - -#include <QtDuse/QDuseDesignSpace> -#include <QtDuse/QDuseModelChange> -#include <QtDuse/QDuseVariationPoint> -#include <QtDuse/QDuseDesignDimension> -#include <QtDuse/QDuseDesignDimensionInstance> - -#include "newdusedesigndialog.h" - -#include <QDebug> - -template <class T> -QScriptValue qSetToScriptValue(QScriptEngine *engine, const QSet<T *> &elements) -{ - QScriptValue array = engine->newArray(); - foreach (T *element, elements) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << engine->newQObject(element)); - return array; -} - -template <class T> -void scriptValueToQSet(const QScriptValue &obj, QSet<T *> &elements) -{ - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - elements.insert(qobject_cast<T *>(it.value().toQObject())); - } -} - -template <class T> -QScriptValue qListToScriptValue(QScriptEngine *engine, const QList<T *> &elements) -{ - QScriptValue array = engine->newArray(); - foreach (T *element, elements) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << engine->newQObject(element)); - return array; -} - -template <class T> -void scriptValueToQList(const QScriptValue &obj, QList<T *> &elements) -{ - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - elements.append(qobject_cast<T *>(it.value().toQObject())); - } -} - -namespace DuSE -{ - -DesignSpaceExplorerPlugin::DesignSpaceExplorerPlugin(QObject *parent) : - IPlugin(parent), - _currentDesignSpaceLocationQuickView(new QQuickView), - _metricsQuickView(new QQuickView), - _designSpaceExplorer(new QTableWidget), - _currentDesignSpaceLocationView(new QModelingObjectView), - _currentDesignSpaceLocationQtModel(new QModelingObjectModel), - _newDuseDesignDialog(new DuSE::NewDuseDesignDialog), - _engine(0) -{ - _currentDesignSpaceLocationView->setModel(_currentDesignSpaceLocationQtModel); -} - -DesignSpaceExplorerPlugin::~DesignSpaceExplorerPlugin() -{ - delete _newDuseDesignDialog; - delete _engine; -} - -bool DesignSpaceExplorerPlugin::initialize() -{ - _currentDesignSpaceLocationQuickView->setSource(QUrl("qrc:/designspaceexplorer/currentdesignspacelocation.qml")); - _currentDesignSpaceLocationQuickView->setResizeMode(QQuickView::SizeRootObjectToView); - - ICore::self()->uiController()->addCentralWidgetTab(QWidget::createWindowContainer(_currentDesignSpaceLocationQuickView), "Current Design Space Location"); - - _metricsQuickView->setSource(QUrl("qrc:/designspaceexplorer/qualitymetrics/qualitymetrics.qml")); - _metricsQuickView->setResizeMode(QQuickView::SizeRootObjectToView); - - ICore::self()->uiController()->addDockWidget(Qt::LeftDockWidgetArea, tr("Quality Metrics"), QWidget::createWindowContainer(_metricsQuickView)); - - ICore::self()->uiController()->addDockWidget(Qt::LeftDockWidgetArea, tr("Current Location Inspector"), _currentDesignSpaceLocationView); - - _designSpaceExplorer->setAlternatingRowColors(true); - _designSpaceExplorer->horizontalHeader()->setStretchLastSection(true); - _designSpaceExplorer->verticalHeader()->setVisible(false); - _designSpaceExplorer->setRowCount(0); - _designSpaceExplorer->setColumnCount(3); - _designSpaceExplorer->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Design Dimension"))); - _designSpaceExplorer->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Dimension Instance Target"))); - _designSpaceExplorer->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Variation Point"))); - _designSpaceExplorer->resizeColumnToContents(0); - _designSpaceExplorer->resizeColumnToContents(1); - _designSpaceExplorer->resizeColumnToContents(2); - - ICore::self()->uiController()->addDockWidget(Qt::RightDockWidgetArea, "Design Space Explorer", _designSpaceExplorer); - - QString iconThemeName; - - QAction *_actionFileNewDuseDesign = new QAction(0); - _actionFileNewDuseDesign->setText(QApplication::translate("MainWindow", "New &DuSE Design ...", 0)); - _actionFileNewDuseDesign->setShortcut(QApplication::translate("MainWindow", "Ctrl+D", 0)); - _actionFileNewDuseDesign->setObjectName(QStringLiteral("actionFileNewDuseDesign")); - QIcon icon8; - iconThemeName = QStringLiteral("document-new"); - if (QIcon::hasThemeIcon(iconThemeName)) { - icon8 = QIcon::fromTheme(iconThemeName); - } else { - icon8.addFile(QStringLiteral(""), QSize(), QIcon::Normal, QIcon::Off); - } - _actionFileNewDuseDesign->setIcon(icon8); - connect(_actionFileNewDuseDesign, &QAction::triggered, this, &DesignSpaceExplorerPlugin::newDuseDesign); - ICore::self()->uiController()->addAction(_actionFileNewDuseDesign, "menu_File"); - - QAction *_actionFileOpenDuseDesign = new QAction(0); - _actionFileOpenDuseDesign->setText(QApplication::translate("MainWindow", "Open DuSE Design ...", 0)); - _actionFileOpenDuseDesign->setShortcut(QApplication::translate("MainWindow", "Ctrl+U", 0)); - _actionFileOpenDuseDesign->setObjectName(QStringLiteral("actionFileOpenDuseDesign")); - QIcon icon9; - iconThemeName = QStringLiteral("document-open"); - if (QIcon::hasThemeIcon(iconThemeName)) { - icon9 = QIcon::fromTheme(iconThemeName); - } else { - icon9.addFile(QStringLiteral(""), QSize(), QIcon::Normal, QIcon::Off); - } - _actionFileOpenDuseDesign->setIcon(icon9); - connect(_actionFileOpenDuseDesign, &QAction::triggered, this, &DesignSpaceExplorerPlugin::openDuseDesign); - ICore::self()->uiController()->addAction(_actionFileOpenDuseDesign, "menu_File"); - - connect(ICore::self()->projectController(), SIGNAL(modelOpened(QList<QModelingObject*>)), this, SLOT(initializeEngine(QList<QModelingObject*>))); - connect(ICore::self()->projectController(), SIGNAL(modelAboutToBeClosed(QList<QModelingObject*>)), this, SLOT(destroyEngine())); - connect(ICore::self()->projectController(), SIGNAL(modelClosed()), _currentDesignSpaceLocationQtModel, SLOT(clear())); - connect(ICore::self()->projectController(), SIGNAL(modelClosed()), this, SLOT(resetDesignSpaceExplorer())); - - return true; -} - -void DesignSpaceExplorerPlugin::initializeEngine(QList<QModelingObject *> modelingObjects) -{ - Q_UNUSED(modelingObjects); - _engine = new QScriptEngine; - qScriptRegisterMetaType(_engine, qSetToScriptValue<QObject>, scriptValueToQSet<QObject>); - qScriptRegisterMetaType(_engine, qListToScriptValue<QObject>, scriptValueToQList<QObject>); - currentDesignSpaceLocationChanged(); -} - -void DesignSpaceExplorerPlugin::destroyEngine() -{ - delete _engine; - _engine = 0; -} - -void DesignSpaceExplorerPlugin::resetDesignSpaceExplorer() -{ - qDeleteAll(_duseInstance); - _duseInstance.clear(); - qDeleteAll(_currentDesignSpaceLocationMofModel); - _currentDesignSpaceLocationMofModel.clear(); - - _designSpaceExplorer->setRowCount(0); - _designSpaceExplorer->clearContents(); -} - -void DesignSpaceExplorerPlugin::newDuseDesign() -{ - ICore::self()->projectController()->closeModel(); - resetDesignSpaceExplorer(); - do { - if (_newDuseDesignDialog->exec() == QDialog::Accepted) { - if (_newDuseDesignDialog->_inputModelFileName.isEmpty() || _newDuseDesignDialog->_duseInstanceModelFileName.isEmpty()) { - QMessageBox::critical(0, tr("Create new DuSE design"), tr("You should select an input model and a DuSE instance model !")); - } - else { - QFile file(_newDuseDesignDialog->_duseInstanceModelFileName); - if (!file.open(QFile::ReadOnly | QFile::Text)) { - QMessageBox::critical(0, tr("Create new DuSE design"), tr("Cannot read DuSE instance file !")); - return; - } - QXmiReader reader; - _duseInstance = reader.readFile(&file); - if (QString::fromLatin1(_duseInstance.first()->asQModelingObject()->metaObject()->className()) != QStringLiteral("QDuseDesignSpaceObject")) { - QMessageBox::critical(0, tr("Create new DuSE design"), QStringLiteral("%1 is not a valid DuSE instance !").arg(QFileInfo(file).fileName())); - return; - } - if (!ICore::self()->projectController()->openModel(_newDuseDesignDialog->_inputModelFileName)) { - QMessageBox::critical(0, tr("Create new DuSE design"), QStringLiteral("Error loading input file %1 !").arg(_newDuseDesignDialog->_inputModelFileName)); - return; - } - - bool found = false; - QUmlModel *package = dynamic_cast<QUmlModel *>(ICore::self()->projectController()->currentModelElements().first()); - QDuseDesignSpace *designSpace = dynamic_cast<QDuseDesignSpace *>(_duseInstance.first()); - foreach (QUmlProfileApplication *profileApplication, package->profileApplications()) { - if (profileApplication->appliedProfile()->name() == designSpace->requiredProfile()) { - found = true; - break; - } - } - - if (!found) { - QMessageBox::critical(0, tr("Create new DuSE design"), QStringLiteral("Input model does not contain the required %1Profile profile application !").arg(_duseInstance.first()->asQModelingObject()->objectName())); - return; - } - - QScriptValue array = _engine->newArray(); - foreach (QObject *modelingObject, ICore::self()->projectController()->currentModelObjects()) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << _engine->newQObject(modelingObject)); - _engine->globalObject().setProperty("input", array); - - foreach (QDuseDesignDimension *designDimension, designSpace->designDimensions()) { - foreach (const QString &body, designDimension->instanceSelectionRule()->bodies()) { - QScriptValue value = _engine->evaluate(body); - if (value.toVariant().canConvert(QMetaType::type("QVariantList"))) { - foreach (const QVariant &variant, value.toVariant().value<QVariantList>()) { - if (variant.canConvert(QMetaType::type("QObject*"))) { - QDuseDesignDimensionInstance *designDimensionInstance = new QDuseDesignDimensionInstance; - designDimensionInstance->setTargetInstance(qmodelingelementproperty_cast<QUmlElement *>(variant.value<QObject *>())); - designDimension->addDesignDimensionInstance(designDimensionInstance); - } - } - } - else if (value.toVariant().canConvert(QMetaType::type("QObject*"))) { - QDuseDesignDimensionInstance *designDimensionInstance = new QDuseDesignDimensionInstance; - designDimensionInstance->setTargetInstance(qmodelingelementproperty_cast<QUmlElement *>(value.toVariant().value<QObject *>())); - designDimension->addDesignDimensionInstance(designDimensionInstance); - } - } - } - -// evaluateQualityMetrics(); - populateDesignSpaceExplorer(); - } - } - else - return; - } while (_newDuseDesignDialog->_inputModelFileName.isEmpty() || _newDuseDesignDialog->_duseInstanceModelFileName.isEmpty()); -} - -void DesignSpaceExplorerPlugin::populateDesignSpaceExplorer() -{ - QDuseDesignSpace *designSpace = dynamic_cast<QDuseDesignSpace *>(_duseInstance.first()); - _designSpaceExplorer->setRowCount(0); - int row = 0; - foreach (QDuseDesignDimension *dimension, designSpace->designDimensions()) { - _designSpaceExplorer->setRowCount(_designSpaceExplorer->rowCount() + dimension->designDimensionInstances().count()); - foreach (QDuseDesignDimensionInstance *instance, dimension->designDimensionInstances()) { - _designSpaceExplorer->setItem(row, 0, new QTableWidgetItem(dimension->name())); - _designSpaceExplorer->setItem(row, 1, new QTableWidgetItem(instance->targetInstance()->asQModelingObject()->objectName())); - QComboBox *comboBox = new QComboBox; - foreach (QDuseVariationPoint *variationPoint, dimension->variationPoints()) { - comboBox->addItem(variationPoint->asQModelingObject()->objectName()); - } - _designSpaceExplorer->setCellWidget(row, 2, comboBox); - connect(comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentDesignSpaceLocationChanged())); - ++row; - } - } - _designSpaceExplorer->resizeRowsToContents(); - currentDesignSpaceLocationChanged(); -} - -void DesignSpaceExplorerPlugin::openDuseDesign() -{ -} - -void DesignSpaceExplorerPlugin::currentDesignSpaceLocationChanged() -{ - qDeleteAll(_currentDesignSpaceLocationMofModel); - _currentDesignSpaceLocationMofModel.clear(); - - _currentDesignSpaceLocation.clear(); - - if (_duseInstance.size() == 0) - return; - - QModelingObject *designSpaceObject = _duseInstance.first()->asQModelingObject(); - int rowCount = _designSpaceExplorer->rowCount(); - for (int i = 0; i < rowCount; ++i) - _currentDesignSpaceLocation[_designSpaceExplorer->item(i, 1)->text()][qmodelingelementproperty_cast<QDuseDesignDimension *>(designSpaceObject->findChild<QModelingObject *>(_designSpaceExplorer->item(i, 0)->text()))] = qmodelingelementproperty_cast<QDuseVariationPoint *>(designSpaceObject->findChild<QModelingObject *>((dynamic_cast<QComboBox *>(_designSpaceExplorer->cellWidget(i, 2)))->currentText())); - - foreach (QModelingElement *element, ICore::self()->projectController()->currentModelElements()) - _currentDesignSpaceLocationMofModel << element->clone(); - - QList<QModelingObject *> currentModelObjects; - foreach (QModelingElement *element, _currentDesignSpaceLocationMofModel) - currentModelObjects << element->asQModelingObject(); - - QDuseDesignSpace *designSpace = dynamic_cast<QDuseDesignSpace *>(_duseInstance.first()); - QUmlModel *topModel = dynamic_cast<QUmlModel *>(_currentDesignSpaceLocationMofModel.first()); - foreach (QDuseDesignDimension *designDimension, designSpace->designDimensions()) { - foreach (QDuseDesignDimensionInstance *designDimensionInstance, designDimension->designDimensionInstances()) { - QDuseVariationPoint *variationPoint = _currentDesignSpaceLocation[designDimensionInstance->targetInstance()->asQModelingObject()->objectName()][designDimension]; - foreach (QModelingElement *addedElement, variationPoint->addedElements()) { - QObject *modelingObject = addedElement->asQModelingObject(); - QMetaModelPlugin *plugin = ICore::self()->pluginController()->metamodelPlugins()[modelingObject->property("namespaceUri").toString()]; - QModelingElement *newAddedElement = plugin->createModelingElement(modelingObject->property("factoryType").toString()); - newAddedElement->asQModelingObject()->setObjectName(QStringLiteral("%1-%2").arg(designDimensionInstance->targetInstance()->asQModelingObject()->objectName()).arg(modelingObject->property("factoryType").toString())); - topModel->addPackagedElement(dynamic_cast<QUmlPackageableElement *>(newAddedElement)); - } - } - } - - foreach (QDuseDesignDimension *designDimension, designSpace->designDimensions()) { - foreach (QDuseDesignDimensionInstance *designDimensionInstance, designDimension->designDimensionInstances()) { - QDuseVariationPoint *variationPoint = _currentDesignSpaceLocation[designDimensionInstance->targetInstance()->asQModelingObject()->objectName()][designDimension]; - foreach (QDuseModelChange *modelChange, variationPoint->modelChanges()) { - QScriptValue target = _engine->evaluate(modelChange->targetSelectionRule()->bodies().first()); - if (target.toVariant().canConvert(QMetaType::type("QObject*"))) { - QObject *targetObject = target.toVariant().value<QObject *>(); - QString propertyName = modelChange->targetProperty()->name(); - QScriptValue value = _engine->evaluate(modelChange->valueSelectionRule()->bodies().first()); - QMetaProperty metaProperty = targetObject->metaObject()->property(targetObject->metaObject()->indexOfProperty(propertyName.toLatin1())); - QString typeName = QString::fromLatin1(metaProperty.typeName()); - if (metaProperty.type() == QVariant::String) { - targetObject->setProperty(propertyName.toLatin1(), value.toVariant().toString()); - } - else if (metaProperty.type() == QVariant::Int || metaProperty.isEnumType()) { - targetObject->setProperty(propertyName.toLatin1(), value.toVariant().toInt()); - } - else if (typeName.endsWith('*')) { - targetObject->setProperty(propertyName.toLatin1(), QVariant::fromValue(qmodelingelementproperty_cast<QUmlElement *>(value.toVariant().value<QObject *>()))); - } - } - } - } - } - - _currentDesignSpaceLocationQtModel->setModelingObjects(currentModelObjects); -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.h b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.h deleted file mode 100644 index 66dfdd42..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.h +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef DESIGNSPACEEXPLORERPLUGIN_H -#define DESIGNSPACEEXPLORERPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -#include <QtScript/QScriptEngine> - -QT_BEGIN_NAMESPACE -class QQuickView; -class QTableWidget; - -class QModelingObject; -class QModelingElement; - -class QModelingObjectModel; -class QModelingObjectView; - -class QDuseDesignDimension; -class QDuseVariationPoint; -QT_END_NAMESPACE - -namespace DuSE { - -class ICore; -class NewDuseDesignDialog; - -class DesignSpaceExplorerPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "designspaceexplorer.json") - -public: - DesignSpaceExplorerPlugin(QObject *parent = 0); - virtual ~DesignSpaceExplorerPlugin(); - - virtual bool initialize(); - -private Q_SLOTS: - void initializeEngine(QList<QModelingObject *> modelingObjects); - void destroyEngine(); - void resetDesignSpaceExplorer(); - void newDuseDesign(); - void openDuseDesign(); - void currentDesignSpaceLocationChanged(); - -private: - QQuickView *_currentDesignSpaceLocationQuickView; - QQuickView *_metricsQuickView; - QTableWidget *_designSpaceExplorer; - QModelingObjectView *_currentDesignSpaceLocationView; - QModelingObjectModel *_currentDesignSpaceLocationQtModel; - - DuSE::NewDuseDesignDialog *_newDuseDesignDialog; - QList<QModelingElement *> _duseInstance; - QList<QModelingElement *> _currentDesignSpaceLocationMofModel; - QHash<QString, QHash<QDuseDesignDimension *, QDuseVariationPoint *> > _currentDesignSpaceLocation; - - QScriptEngine *_engine; - - void populateDesignSpaceExplorer(); -}; - -} - -#endif // DESIGNSPACEEXPLORERPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.cpp b/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.cpp deleted file mode 100644 index a0166669..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "newdusedesigndialog.h" -#include "ui_newdusedesigndialog.h" - -#include <QtWidgets/QFileDialog> - -namespace DuSE -{ - -NewDuseDesignDialog::NewDuseDesignDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::NewDuseDesignDialog) -{ - ui->setupUi(this); -} - -NewDuseDesignDialog::~NewDuseDesignDialog() -{ - delete ui; -} - -void NewDuseDesignDialog::on_tbtInputModel_clicked() -{ - _inputModelFileName = QFileDialog::getOpenFileName(this, tr("Open input model"), QDir::currentPath(), "XMI files (*.xmi)"); - ui->lneInputModel->setText(_inputModelFileName); -} - -void NewDuseDesignDialog::on_tbtDuseInstanceModel_clicked() -{ - _duseInstanceModelFileName = QFileDialog::getOpenFileName(this, tr("Open DuSE instance model"), QDir::currentPath(), "XMI files (*.xmi)"); - ui->lneDuseInstanceModel->setText(_duseInstanceModelFileName); -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.h b/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.h deleted file mode 100644 index 6bbddb94..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef NEWDUSEDESIGNDIALOG_H -#define NEWDUSEDESIGNDIALOG_H - -#include <QtWidgets/QDialog> - -namespace DuSE -{ - -namespace Ui { - class NewDuseDesignDialog; -} - -class NewDuseDesignDialog : public QDialog -{ - Q_OBJECT - -public: - explicit NewDuseDesignDialog(QWidget *parent = 0); - ~NewDuseDesignDialog(); - - QString _inputModelFileName; - QString _duseInstanceModelFileName; -private Q_SLOTS: - void on_tbtInputModel_clicked(); - void on_tbtDuseInstanceModel_clicked(); - -private: - Ui::NewDuseDesignDialog *ui; -}; - -} - -#endif // NEWDUSEDESIGNDIALOG_H - diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.ui b/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.ui deleted file mode 100644 index e802b0f4..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/newdusedesigndialog.ui +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DuSE::NewDuseDesignDialog</class> - <widget class="QDialog" name="DuSE::NewDuseDesignDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>453</width> - <height>127</height> - </rect> - </property> - <property name="windowTitle"> - <string>Create new DuSE design</string> - </property> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QLabel" name="lblInputModel"> - <property name="text"> - <string>Input model:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLineEdit" name="lneInputModel"/> - </item> - <item row="0" column="2"> - <widget class="QToolButton" name="tbtInputModel"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="lblDuseInstanceModel"> - <property name="text"> - <string>DuSE instance model:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="lneDuseInstanceModel"/> - </item> - <item row="1" column="2"> - <widget class="QToolButton" name="tbtDuseInstanceModel"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0"> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>DuSE::NewDuseDesignDialog</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>DuSE::NewDuseDesignDialog</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel"> - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel"> - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui> diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/currentdesignspacelocation.qml b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/currentdesignspacelocation.qml deleted file mode 100644 index c4f95246..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/currentdesignspacelocation.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Flickable { - id: flickable - width: 200; height: 200 - contentHeight: 2890 - contentWidth: 1540 - rightMargin: 0; leftMargin: 0; topMargin: 0; bottomMargin: 0 - MouseArea { - anchors.fill: parent - onPressed: parent.focus = true; - } - Image { - anchors.fill: parent - fillMode: Image.Tile - source: "grid.png" - } -} diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/designspaceexplorer.qrc b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/designspaceexplorer.qrc deleted file mode 100644 index 5709d182..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/designspaceexplorer.qrc +++ /dev/null @@ -1,12 +0,0 @@ -<RCC> - <qresource prefix="/designspaceexplorer"> - <file>qualitymetrics/qualitymetrics.qml</file> - <file>qualitymetrics/content/background.png</file> - <file>qualitymetrics/content/Dial.qml</file> - <file>qualitymetrics/content/needle_shadow.png</file> - <file>qualitymetrics/content/needle.png</file> - <file>qualitymetrics/content/overlay.png</file> - <file>currentdesignspacelocation.qml</file> - <file>grid.png</file> - </qresource> -</RCC> diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/grid.png b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/grid.png Binary files differdeleted file mode 100644 index 52162608..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/grid.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/Dial.qml b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/Dial.qml deleted file mode 100644 index 12a24f1d..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/Dial.qml +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - width: view.width; height: 188 - property alias label: label.text - property alias value: root.value - Item { - id: root - property real value : 0 - - width: 210; height: 210 - anchors.centerIn: parent - scale: 0.75 - - Image { source: "background.png" } - - Image { - x: 96 - y: 35 - source: "needle_shadow.png" - transform: Rotation { - origin.x: 9; origin.y: 67 - angle: needleRotation.angle - } - } - Image { - id: needle - x: 98; y: 33 - antialiasing: true - source: "needle.png" - transform: Rotation { - id: needleRotation - origin.x: 5; origin.y: 65 - angle: Math.min(Math.max(-130, root.value*2.6 - 130), 133) - Behavior on angle { - SpringAnimation { - spring: 1.4 - damping: .15 - } - } - } - } - Image { x: 21; y: 18; source: "overlay.png" } - } - Text { - anchors.top: root.bottom - anchors.topMargin: -30 - anchors.horizontalCenter: parent.horizontalCenter - id: label - color: "white" - font { family: "Korolev" } - } -} diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/background.png b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/background.png Binary files differdeleted file mode 100644 index 75d555d7..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/background.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle.png b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle.png Binary files differdeleted file mode 100644 index 2d19f750..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle_shadow.png b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle_shadow.png Binary files differdeleted file mode 100644 index 8d8a928c..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/needle_shadow.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/overlay.png b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/overlay.png Binary files differdeleted file mode 100644 index 3860a7b5..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/content/overlay.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/qualitymetrics.qml b/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/qualitymetrics.qml deleted file mode 100644 index ff13b340..00000000 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/qml/qualitymetrics/qualitymetrics.qml +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 -import "content" - -Rectangle { - id: root - color: "#545454" - - ListView { - id: view - anchors { fill: parent; bottomMargin: 30 } - model: metrics - preferredHighlightBegin: 0; preferredHighlightEnd: 0 - highlightRangeMode: ListView.StrictlyEnforceRange - orientation: ListView.Vertical - snapMode: ListView.SnapOneItem; - delegate: Dial { - label: modelData.name; - value: modelData.value; - } - } - Rectangle { - width: root.width; height: 30 - anchors { top: view.bottom; bottom: parent.bottom } - color: "gray" - - Row { - anchors.centerIn: parent - spacing: 20 - - Repeater { - model: metrics ? metrics.length:0 - - Rectangle { - width: 5; height: 5 - radius: 3 - color: view.currentIndex == index ? "blue" : "white" - - MouseArea { - width: 20; height: 20 - anchors.centerIn: parent - onClicked: view.currentIndex = index - } - } - } - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.json b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.json deleted file mode 100644 index 1952997f..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Category": "Architecture Recovery", - "Vendor": "Qt Project", - "Version": "1.0", - "DependencyList": [ - "ArchitectureRecoveryCorePlugin" - ] -} diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.pro b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.pro deleted file mode 100644 index 9c4cf0ab..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend.pro +++ /dev/null @@ -1,22 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-11-03T17:38:51 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT += widgets gui - -DEFINES += GCCXMLARCHITECTURERECOVERYBACKEND_LIBRARY - -HEADERS += gccxmlarchitecturerecoverybackend_export.h \ - gccxmlarchitecturerecoverybackendplugin.h \ - xmlfilemanager.h \ - xmlfilereader.h - -SOURCES += gccxmlarchitecturerecoverybackendplugin.cpp \ - xmlfilemanager.cpp \ - xmlfilereader.cpp - -OTHER_FILES += gccxmlarchitecturerecoverybackend.json diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_dependencies.pri b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_dependencies.pri deleted file mode 100644 index 2762fc82..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_dependencies.pri +++ /dev/null @@ -1,4 +0,0 @@ -DUSEMT_PLUGIN_NAME = GccXmlArchitectureRecoveryBackend - -DUSEMT_PLUGIN_DEPENDS += \ - architecturerecoverycore diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_export.h b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_export.h deleted file mode 100644 index e96b5845..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackend_export.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ - -#ifndef GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT_H -#define GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT_H - -#include <qglobal.h> - -#if defined(GCCXMLARCHITECTURERECOVERYBACKEND_LIBRARY) -# define GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT Q_DECL_EXPORT -#else -# define GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT Q_DECL_IMPORT -#endif - -#endif // GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT_H diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.cpp b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.cpp deleted file mode 100644 index 220bf417..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.cpp +++ /dev/null @@ -1,302 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "gccxmlarchitecturerecoverybackendplugin.h" - -#include <QtWidgets/QAction> -#include <QtWidgets/QFileDialog> -#include <QtWidgets/QMessageBox> - -#include <QtCore/QDebug> -#include <QtCore/QProcess> -#include <QtCore/QXmlStreamReader> - -#include <duseinterfaces/iuicontroller.h> - -namespace DuSE -{ - -GccXmlArchitectureRecoveryBackendPlugin::GccXmlArchitectureRecoveryBackendPlugin(QObject *parent) : - IPlugin(parent) -{ - _name = "C++ (GCC-XML)"; - qRegisterMetaType<DependencyRelations>("DependencyRelations"); -} - -bool GccXmlArchitectureRecoveryBackendPlugin::initialize() -{ - return true; -} - - -QObjectList GccXmlArchitectureRecoveryBackendPlugin::components() -{ - QObjectList components; - - QObject *componentsDependencyRelations = new QObject; - componentsDependencyRelations->setProperty("components", QVariant::fromValue(_dependencyRelations)); - componentsDependencyRelations->setProperty("systemDirectory", QVariant::fromValue(_rootProjectDirectoryString)); - components.append(componentsDependencyRelations); - - return components; -} - -QObjectList GccXmlArchitectureRecoveryBackendPlugin::connectors() -{ - QObjectList connectors; - - return connectors; -} - -void GccXmlArchitectureRecoveryBackendPlugin::run() -{ - runGccXml(); - recoverDependencyRelations(); -} - -void GccXmlArchitectureRecoveryBackendPlugin::runGccXml() -{ - _rootProjectDirectoryString = QFileDialog::getExistingDirectory(0, "Escolha o diretório raíz do projeto", QDir::currentPath()); - - if (_rootProjectDirectoryString.isEmpty()) { - QMessageBox errorMessage; - errorMessage.setInformativeText("Diretório inválido."); - errorMessage.show(); - } else { - _rootProjectDirectory = QDir(_rootProjectDirectoryString); - _xmlFilesList = _xmlFileManager->generateXmlFiles(_rootProjectDirectory); - _xmlCount = _xmlFilesList.count(); - } -} - -void GccXmlArchitectureRecoveryBackendPlugin::recoverDependencyRelations() -{ - QString fileName; - - for (int i = 0; i < _xmlCount; ++i) { - fileName = _xmlFilesList.at(i).toLocal8Bit().constData(); - - _reader = new XmlFileReader(_rootProjectDirectory.absolutePath(), fileName); - - _reader->fillTagContainers(); - - _fileClasses.insert(fileName, _reader->fileClasses()); - _fileFields.insert(fileName, _reader->fileFields()); - _filePointers.insert(fileName, _reader->filePointers()); - _fileBases.insert(fileName, _reader->fileBases()); - _fileArguments.insert(fileName, _reader->fileArguments()); - - fieldAdjacencies(); - baseAdjacencies(); - argumentsAdjacencies(); - - qDebug() << "Tamanho de dependencyRelations: " << _dependencyRelations.count(); - } -} - -void GccXmlArchitectureRecoveryBackendPlugin::fieldAdjacencies() -{ - QString fileName; - - for (int i = 0; i < _xmlCount; ++i) { - - fileName = _xmlFilesList.at(i).toLocal8Bit().constData(); - - QMap<QString, QString> classes = _fileClasses.value(fileName); - QList<QPair<QString, QString> > fields = _fileFields.value(fileName); - QMap<QString, QString> pointers = _filePointers.value(fileName); - - QString dependent; - QString dependency; - - QStringList classIds = classes.keys(); - foreach (QString classId, classIds) { - dependent = classes.value(classId); - for (int i = 0; i < fields.size(); ++i) { - QPair<QString, QString> field = fields.at(i); - if (classId == field.first) { - if (classes.value(field.second).isEmpty()) { - QStringList pointersId = pointers.keys(); - foreach (QString pointerId, pointersId) { - if (field.second == pointerId) { - if (!classes.value(pointers.value(pointerId)).isEmpty()) { - dependency = classes.value(pointers.value(pointerId)); - } - } - } - } else { - dependency = classes.value(field.second); - } - } - - if (!_dependencyRelations.keys().contains(dependent)) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } else { - bool isNewDependencie = false; - QStringList dependencies = _dependencyRelations.values(dependent); - foreach (QString d, dependencies) { - if (dependency == d) { - isNewDependencie = true; - } - } - if (isNewDependencie == false) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } - } - - dependency = ""; - } - } - } -} - -void GccXmlArchitectureRecoveryBackendPlugin::baseAdjacencies() -{ - QString fileName; - - for (int i = 0; i < _xmlCount; ++i) { - - fileName = _xmlFilesList.at(i).toLocal8Bit().constData(); - - QMap<QString, QString> classes = _fileClasses.value(fileName); - QList<QPair<QString, QString> > bases = _fileBases.value(fileName); - - QString dependent; - QString dependency; - - QStringList classIds = classes.keys(); - foreach (QString classId, classIds) { - dependent = classes.value(classId); - for (int i = 0; i < bases.size(); ++i) { - QPair<QString, QString> base = bases.at(i); - if (classId == base.first) { - dependency = classes.value(base.second); - } - } - - if (!_dependencyRelations.keys().contains(dependent)) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } else { - bool isNewDependencie = false; - QStringList dependencies = _dependencyRelations.values(dependent); - foreach (QString d, dependencies) { - if (dependency == d) { - isNewDependencie = true; - } - } - if (isNewDependencie == false) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } - } - - dependency = ""; - } - } -} - -void GccXmlArchitectureRecoveryBackendPlugin::argumentsAdjacencies() -{ - QString fileName; - - for (int i = 0; i < _xmlCount; ++i) { - - fileName = _xmlFilesList.at(i).toLocal8Bit().constData(); - - QMap<QString, QString> classes = _fileClasses.value(fileName); - QList<QPair<QString, QString> > arguments = _fileArguments.value(fileName); - QMap<QString, QString> pointers = _filePointers.value(fileName); - - QString dependent; - QString dependency; - - QStringList classIds = classes.keys(); - foreach (QString classId, classIds) { - dependent = classes.value(classId); - for (int i = 0; i < arguments.size(); ++i) { - QPair<QString, QString> argument = arguments.at(i); - if (classId == argument.first) { - if (classes.value(argument.second).isEmpty()) { - QStringList pointersId = pointers.keys(); - foreach (QString pointerId, pointersId) { - if (argument.second == pointerId) { - if (!classes.value(pointers.value(pointerId)).isEmpty()) { - dependency = classes.value(pointers.value(pointerId)); - } - } - } - } else { - dependency = classes.value(argument.second); - } - } - } - - if (!_dependencyRelations.keys().contains(dependent)) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } else { - bool isNewDependencie = false; - QStringList dependencies = _dependencyRelations.values(dependent); - foreach (QString d, dependencies) { - if (dependency == d) { - isNewDependencie = true; - } - } - if (isNewDependencie == false) { - if (!dependent.isEmpty() && !dependency.isEmpty()) { - _dependencyRelations.insert(dependent, dependency); - } - } - } - - dependency = ""; - } - } -} - -} diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.h b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.h deleted file mode 100644 index e83efce8..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/gccxmlarchitecturerecoverybackendplugin.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef GCCXMLARCHITECTURERECOVERYBACKENDPLUGIN_H -#define GCCXMLARCHITECTURERECOVERYBACKENDPLUGIN_H - -#include <duseinterfaces/iplugin.h> -#include <architecturerecoverycore/iarchitecturerecoverybackend.h> - -#include <QtCore/QDir> -#include <QtCore/QHash> -#include <QtCore/QObjectList> -#include <QtCore/QObject> -#include <QtCore/QStringList> -#include <QtCore/QMetaType> -#include <QtCore/QVariant> - -#include "xmlfilemanager.h" -#include "xmlfilereader.h" - -#include "gccxmlarchitecturerecoverybackend_export.h" - -QT_BEGIN_NAMESPACE -class QXmlStreamReader; -QT_END_NAMESPACE - -namespace DuSE -{ - -class GCCXMLARCHITECTURERECOVERYBACKEND_EXPORT GccXmlArchitectureRecoveryBackendPlugin : public IPlugin, public IArchitectureRecoveryBackend -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "gccxmlarchitecturerecoverybackend.json") - -public: - GccXmlArchitectureRecoveryBackendPlugin(QObject *parent = 0); - - virtual bool initialize(); - - virtual QObjectList components(); - virtual QObjectList connectors(); - void run(); - void runGccXml(); - void recoverDependencyRelations(); - void fieldAdjacencies(); - void baseAdjacencies(); - void argumentsAdjacencies(); - -private Q_SLOTS: - -private: - int _xmlCount; - QDir _rootProjectDirectory; - QString _rootProjectDirectoryString; - QStringList _xmlFilesList; - XmlFileManager *_xmlFileManager; - XmlFileReader *_reader; - QMap<QString, QMap<QString, QString> > _fileClasses; - QMap<QString, QList<QPair<QString, QString> > > _fileFields; - QMap<QString, QMap<QString, QString> > _filePointers; - QMap<QString, QList<QPair<QString, QString> > > _fileBases; - QMap<QString, QList<QPair<QString, QString> > > _fileArguments; - QMultiMap<QString, QString> _dependencyRelations; -}; - -typedef QMultiMap<QString, QString> DependencyRelations; - -#endif // GCCXMLARCHITECTURERECOVERYBACKENDPLUGIN - -} - -Q_DECLARE_METATYPE(DuSE::DependencyRelations); diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.cpp b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.cpp deleted file mode 100644 index fee7f8d5..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "xmlfilemanager.h" - -#include <QtCore/QDir> -#include <QtCore/QProcess> -#include <QtCore/QXmlStreamReader> - -namespace DuSE -{ - -XmlFileManager::XmlFileManager() -{ -} - -QStringList XmlFileManager::generateXmlFiles(const QDir &rootProjectDir) const -{ - QStringList headers = rootProjectDir.entryList(QStringList("*.h"), QDir::Files | QDir::NoSymLinks); - - int codeFilesSize = headers.size(); - - for (int i = 0; i < codeFilesSize; ++i) { - QString file = headers.at(i).toLocal8Bit().constData(); - QString fileDir = rootProjectDir.absolutePath() + "/" + file; - QString xmlFileDir = rootProjectDir.absolutePath() + "/" + file.replace(".h", ".xml"); - - QProcess process; - process.start("gccxml " + fileDir + " -fxml=" + xmlFileDir); - process.waitForFinished(); - } - - return rootProjectDir.entryList(QStringList("*.xml"), QDir::Files | QDir::NoSymLinks); -} - -QXmlStreamReader *XmlFileManager::openXmlFile(const QString &filePath) -{ - _xmlFile.setFileName(filePath); - _xmlReader = new QXmlStreamReader(&_xmlFile); - - if (!_xmlFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - return new QXmlStreamReader; - } - - return _xmlReader; -} - -void XmlFileManager::closeXmlFile() -{ - if (_xmlFile.isOpen()) { - _xmlFile.close(); - } -} - -} diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.h b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.h deleted file mode 100644 index cad93994..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilemanager.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef XMLFILEMANAGER_H -#define XMLFILEMANAGER_H - -#include <QtCore/QFile> -#include <QtCore/QStringList> - -QT_BEGIN_NAMESPACE -class QDir; -class QXmlStreamReader; -QT_END_NAMESPACE - -namespace DuSE -{ - -class XmlFileManager -{ -public: - XmlFileManager(); - - ~XmlFileManager(); - - QStringList generateXmlFiles(const QDir &rootProjectDir) const; - QXmlStreamReader* openXmlFile(const QString &filePath); - void closeXmlFile(); - -private: - QFile _xmlFile; - QXmlStreamReader *_xmlReader; -}; - -} - -#endif // XMLFILEMANAGER_H diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.cpp b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.cpp deleted file mode 100644 index 79ce4297..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "xmlfilereader.h" - -#include <QXmlStreamAttributes> - -namespace DuSE -{ - -XmlFileReader::XmlFileReader(QString rootDirectory, QString fileName) - : _rootProjectDir(rootDirectory), _fileName(fileName) -{ - _xmlFileManager = new XmlFileManager; -} - -void XmlFileReader::fillTagContainers() -{ - _xmlReader = _xmlFileManager->openXmlFile(_rootProjectDir + "/" + _fileName); - - while (!_xmlReader->atEnd() & !_xmlReader->hasError()) { - QXmlStreamReader::TokenType token = _xmlReader->readNext(); - QPair<QString, QString> auxPair; - - if (token == QXmlStreamReader::StartElement) { - QXmlStreamAttributes attributes; - - if (_xmlReader->name() == "Class") { - attributes = _xmlReader->attributes(); - QString classId = attributes.value("id").toString(); - QString className = attributes.value("name").toString(); - if (!_fileClasses.values().contains(className)) { - _fileClasses.insert(classId, className); - } - - do { - if (_xmlReader->readNextStartElement()) { - if (_xmlReader->name() == "Base") { - attributes = _xmlReader->attributes(); - QString baseType = attributes.value("type").toString(); - auxPair.first = classId; - auxPair.second = baseType; - _fileBases.append(auxPair); - } - } - } while (_xmlReader->name() == "Base"); - } - - if (_xmlReader->name() == "Field") { - attributes = _xmlReader->attributes(); - QString fieldContext = attributes.value("context").toString(); - QString fieldType = attributes.value("type").toString(); - auxPair.first = fieldContext; - auxPair.second = fieldType; - _fileFields.append(auxPair); - } - - if (_xmlReader->name() == "PointerType") { - attributes = _xmlReader->attributes(); - QString pointerId = attributes.value("id").toString(); - QString pointerType = attributes.value("type").toString(); - auxPair.first = pointerId; - auxPair.second = pointerType; - _filePointers.insert(pointerId, pointerType); - } - - - if (_xmlReader->name() == "Method") { - attributes = _xmlReader->attributes(); - QString methodContext = attributes.value("context").toString(); - - do { - if (_xmlReader->readNextStartElement()) { - if (_xmlReader->name() == "Argument") { - attributes = _xmlReader->attributes(); - QString argumentType = attributes.value("type").toString(); - auxPair.first = methodContext; - auxPair.second = argumentType; - _fileArguments.append(auxPair); - } - } - } while (_xmlReader->name() == "Argument"); - } - } - } _xmlFileManager->closeXmlFile(); -} - -QMap<QString, QString> XmlFileReader::fileClasses() -{ - return _fileClasses; -} - -QList<QPair<QString, QString> > XmlFileReader::fileFields() -{ - return _fileFields; -} - -QMap<QString, QString> XmlFileReader::filePointers() -{ - return _filePointers; -} - -QList<QPair<QString, QString> > XmlFileReader::fileBases() -{ - return _fileBases; -} - -QList<QPair<QString, QString> > XmlFileReader::fileArguments() -{ - return _fileArguments; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.h b/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.h deleted file mode 100644 index 6059c8f5..00000000 --- a/examples/uml/duse-mt/src/plugins/gccxmlarchitecturerecoverybackend/xmlfilereader.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef XMLFILEREADER_H -#define XMLFILEREADER_H - -#include <QHash> -#include <QList> -#include <QMultiMap> -#include <QtCore/QStringList> - -QT_BEGIN_NAMESPACE -class QXmlStreamReader; -QT_END_NAMESPACE - -#include "xmlfilemanager.h" - -namespace DuSE -{ - -class XmlFileReader -{ -public: - XmlFileReader(QString rootDirectory, QString fileName); - ~XmlFileReader(); - - void fillTagContainers(); - QMap<QString, QString> fileClasses(); - QList<QPair<QString, QString> > fileFields(); - QMap<QString, QString> filePointers(); - QList<QPair<QString, QString> > fileBases(); - QList<QPair<QString, QString> > fileArguments(); - -private: - QString _rootProjectDir; - QString _fileName; - QXmlStreamReader *_xmlReader; - XmlFileManager *_xmlFileManager; - QMap<QString, QString> _fileClasses; - QList<QPair<QString, QString> > _fileFields; - QMap<QString, QString> _filePointers; - QList<QPair<QString, QString> > _fileBases; - QList<QPair<QString, QString> > _fileArguments; -}; - -} - -#endif // XMLFILEREADER_H diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.json b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.json deleted file mode 100644 index df4b8dbe..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Scripting", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.pro b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.pro deleted file mode 100644 index f2c9781f..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.pro +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT += widgets script modeling - -SOURCES += javascriptconsoleplugin.cpp - -HEADERS += javascriptconsoleplugin.h - -OTHER_FILES += javascriptconsole.json - -FORMS += \ - javascriptconsole.ui diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.ui b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.ui deleted file mode 100644 index 2268dae8..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole.ui +++ /dev/null @@ -1,166 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DuSE::JavaScriptConsole</class> - <widget class="QWidget" name="DuSE::JavaScriptConsole"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>638</width> - <height>160</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item row="0" column="0"> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>JavaScript Editor</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item row="0" column="0"> - <widget class="QTextEdit" name="txeJavaScript"> - <property name="acceptRichText"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QToolButton" name="tbtJSEvaluate"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Run (CTRL-R)</string> - </property> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset theme="system-run"> - <normaloff/> - </iconset> - </property> - <property name="shortcut"> - <string>Ctrl+R</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="tbtSaveScript"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Save script as</string> - </property> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset theme="document-save"> - <normaloff/> - </iconset> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="tbtOpenScript"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Open script</string> - </property> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset theme="document-open"> - <normaloff/> - </iconset> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item row="0" column="1"> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string>JavaScript Output</string> - </property> - <layout class="QGridLayout" name="gridLayout_2"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item row="0" column="0"> - <widget class="QTextEdit" name="txeJavaScriptEvaluation"> - <property name="readOnly"> - <bool>true</bool> - </property> - <property name="acceptRichText"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections/> -</ui> diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole_dependencies.pri b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole_dependencies.pri deleted file mode 100644 index a118d0f6..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsole_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = JavaScriptConsole diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.cpp b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.cpp deleted file mode 100644 index f38b5c2f..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "javascriptconsoleplugin.h" - -#include "ui_javascriptconsole.h" - -#include <duseinterfaces/iuicontroller.h> -#include <duseinterfaces/iprojectcontroller.h> - -#include <QtModeling/QModelingObject> - -#include <QtScript/QScriptEngine> -#include <QtScript/QScriptValueIterator> - -#include <QtGui/QKeyEvent> - -#include <QtWidgets/QListView> -#include <QtWidgets/QMessageBox> -#include <QtWidgets/QFileDialog> - -#include <QtCore/QTimer> -#include <QtCore/QTextStream> -#include <QtCore/QStringListModel> - -template <class T> -QScriptValue qSetToScriptValue(QScriptEngine *engine, const QSet<T *> &elements) -{ - QScriptValue array = engine->newArray(); - foreach (T *element, elements) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << engine->newQObject(element)); - return array; -} - -template <class T> -void scriptValueToQSet(const QScriptValue &obj, QSet<T *> &elements) -{ - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - elements.insert(qobject_cast<T *>(it.value().toQObject())); - } -} - -template <class T> -QScriptValue qListToScriptValue(QScriptEngine *engine, const QList<T *> &elements) -{ - QScriptValue array = engine->newArray(); - foreach (T *element, elements) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << engine->newQObject(element)); - return array; -} - -template <class T> -void scriptValueToQList(const QScriptValue &obj, QList<T *> &elements) -{ - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - elements.append(qobject_cast<T *>(it.value().toQObject())); - } -} - -namespace DuSE -{ - -JavaScriptConsolePlugin::JavaScriptConsolePlugin(QObject *parent) : - IPlugin(parent), - _javaScriptConsole(new Ui::JavaScriptConsole), - _codeCompletionView(new QListView), - _engine(0) -{ -} - -JavaScriptConsolePlugin::~JavaScriptConsolePlugin() -{ - delete _javaScriptConsole; - delete _engine; -} - -bool JavaScriptConsolePlugin::initialize() -{ - QWidget *javaScriptConsoleWidget = new QWidget; - _javaScriptConsole->setupUi(javaScriptConsoleWidget); - ICore::self()->uiController()->addDockWidget(Qt::BottomDockWidgetArea, tr("JavaScript Console"), javaScriptConsoleWidget); - - _javaScriptConsole->txeJavaScript->installEventFilter(this); - _codeCompletionView->installEventFilter(this); - - _codeCompletionView->setParent(_javaScriptConsole->txeJavaScript); - _codeCompletionView->hide(); - - connect(_javaScriptConsole->tbtJSEvaluate, &QToolButton::clicked, this, &JavaScriptConsolePlugin::evaluate); - connect(_javaScriptConsole->tbtJSEvaluate, SIGNAL(clicked()), ICore::self()->uiController(), SIGNAL(updateCurrentModelingObject())); - - connect(_javaScriptConsole->tbtSaveScript, &QToolButton::clicked, this, &JavaScriptConsolePlugin::saveScript); - connect(_javaScriptConsole->tbtOpenScript, &QToolButton::clicked, this, &JavaScriptConsolePlugin::openScript); - - connect(ICore::self()->uiController(), &IUiController::currentModelingObjectChanged, this, &JavaScriptConsolePlugin::setSelfProperty); - connect(ICore::self()->projectController(), SIGNAL(modelOpened(QList<QModelingObject*>)), this, SLOT(initializeEngine(QList<QModelingObject*>))); - connect(ICore::self()->projectController(), SIGNAL(modelAboutToBeClosed(QList<QModelingObject*>)), this, SLOT(destroyEngine())); - - return true; -} - -void JavaScriptConsolePlugin::setSelfProperty(QModelingObject *modelingObject) -{ - _engine->globalObject().setProperty("self", _engine->newQObject(modelingObject)); -} - -void JavaScriptConsolePlugin::initializeEngine(QList<QModelingObject *> modelingObjects) -{ - if (modelingObjects.size() == 0) - return; - - _engine = new QScriptEngine; - qScriptRegisterMetaType(_engine, qSetToScriptValue<QObject>, scriptValueToQSet<QObject>); - qScriptRegisterMetaType(_engine, qListToScriptValue<QObject>, scriptValueToQList<QObject>); - - QModelingObject *modelingObject = modelingObjects.at(0); - _engine->globalObject().setProperty(modelingObject->objectName(), _engine->newQObject(modelingObject)); - - QScriptValue array = _engine->newArray(); - foreach (QModelingObject *modelingObject, modelingObjects) - array.property(QString::fromLatin1("push")).call(array, QScriptValueList() << _engine->newQObject(modelingObject)); - _engine->globalObject().setProperty("input", array); - - _javaScriptConsole->txeJavaScript->setText("self"); - _javaScriptConsole->tbtJSEvaluate->setEnabled(true); - _javaScriptConsole->tbtSaveScript->setEnabled(true); - _javaScriptConsole->tbtOpenScript->setEnabled(true); - QTimer::singleShot(0, this, SLOT(evaluate())); -} - -void JavaScriptConsolePlugin::destroyEngine() -{ - delete _engine; - _engine = 0; - _javaScriptConsole->txeJavaScript->clear(); - _javaScriptConsole->txeJavaScriptEvaluation->clear(); - _javaScriptConsole->tbtJSEvaluate->setEnabled(false); - _javaScriptConsole->tbtSaveScript->setEnabled(false); - _javaScriptConsole->tbtOpenScript->setEnabled(false); -} - -bool JavaScriptConsolePlugin::eventFilter(QObject *obj, QEvent *event) -{ - if (event->type() == QEvent::KeyPress && obj == _javaScriptConsole->txeJavaScript) { - QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); - if (keyEvent->key() == 46) { - QModelingObject *modelingObject = dynamic_cast<QModelingObject *>(_engine->evaluate(_javaScriptConsole->txeJavaScript->toPlainText()).toQObject()); - if (modelingObject) { - const QMetaObject *metaObject = modelingObject->metaObject(); - int propertyCount = metaObject->propertyCount(); - QStringList propertyList; - for (int i = 0; i < propertyCount; ++i) - propertyList << metaObject->property(i).name(); - _codeCompletionView->setModel(new QStringListModel(propertyList)); - QFont font; - QFontMetrics fm(font); - _codeCompletionView->setGeometry(_javaScriptConsole->txeJavaScript->cursorRect().x(), _javaScriptConsole->txeJavaScript->cursorRect().y()+fm.height(), 200, 100); - _codeCompletionView->show(); - _codeCompletionView->setFocus(); - } - } - return QObject::eventFilter(obj, event); - } else if (event->type() == QEvent::KeyPress && obj == _codeCompletionView) { - QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); - if (keyEvent->key() == 16777220 || keyEvent->key() == 32) { // spacebar or enter - _javaScriptConsole->txeJavaScript->insertPlainText(_codeCompletionView->model()->data(_codeCompletionView->selectionModel()->selectedIndexes().first()).toString()); - _codeCompletionView->hide(); - _javaScriptConsole->txeJavaScript->setFocus(); - return true; - } - else if (keyEvent->key() == 16777235 || keyEvent->key() == 16777237 || keyEvent->key() == 16777239 || keyEvent->key() == 16777238) { // uparrow and downarrow, pageup, pagedown - return QObject::eventFilter(obj, event); - } - else { - _codeCompletionView->hide(); - _javaScriptConsole->txeJavaScript->setFocus(); - return true; - } - } - // standard event processing - return QObject::eventFilter(obj, event); -} - -void JavaScriptConsolePlugin::evaluate() -{ - _javaScriptConsole->txeJavaScriptEvaluation->setText(_engine->evaluate(_javaScriptConsole->txeJavaScript->toPlainText()).toString()); -} - -void JavaScriptConsolePlugin::saveScript() -{ - QString fileName = QFileDialog::getSaveFileName(0, tr("Save script"), QDir::currentPath(), "*.js"); - if (!fileName.isEmpty()) { - QFile file(fileName); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - QMessageBox::critical(0, tr("Save script"), tr("Error when saving script as %1").arg(fileName)); - return; - } - QTextStream out(&file); - out << _javaScriptConsole->txeJavaScript->toPlainText(); - file.close(); - } -} - -void JavaScriptConsolePlugin::openScript() -{ - QString fileName = QFileDialog::getOpenFileName(0, tr("Open script"), QDir::currentPath(), "*.js"); - if (!fileName.isEmpty()) { - QFile file(fileName); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QMessageBox::critical(0, tr("Open script"), tr("Error when opening script %1").arg(fileName)); - return; - } - QTextStream in(&file); - _javaScriptConsole->txeJavaScript->setPlainText(in.readAll()); - file.close(); - } -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.h b/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.h deleted file mode 100644 index 6b704f50..00000000 --- a/examples/uml/duse-mt/src/plugins/javascriptconsole/javascriptconsoleplugin.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef JAVASCRIPTCONSOLEPLUGIN_H -#define JAVASCRIPTCONSOLEPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -QT_BEGIN_NAMESPACE -class QListView; -class QScriptEngine; - -class QModelingObject; -class QModelingObjectView; -class QModelingObjectModel; -class QModelingObjectPropertyEditor; -class QModelingObjectPropertyModel; -QT_END_NAMESPACE - -namespace DuSE -{ - -namespace Ui { - class JavaScriptConsole; -} - -class JavaScriptConsolePlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "javascriptconsole.json") - -public: - JavaScriptConsolePlugin(QObject *parent = 0); - virtual ~JavaScriptConsolePlugin(); - - virtual bool initialize(); - -protected: - bool eventFilter(QObject *obj, QEvent *event); - -private Q_SLOTS: - void setSelfProperty(QModelingObject *modelingObject); - void initializeEngine(QList<QModelingObject *> modelingObjects); - void destroyEngine(); - void evaluate(); - void saveScript(); - void openScript(); - -private: - Ui::JavaScriptConsole *_javaScriptConsole; - QListView *_codeCompletionView; - QScriptEngine *_engine; -}; - -} - -#endif // JAVASCRIPTCONSOLEPLUGIN_H diff --git a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.json b/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.json deleted file mode 100644 index d4090ad6..00000000 --- a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Project Management", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.pro b/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.pro deleted file mode 100644 index d57a73ae..00000000 --- a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector.pro +++ /dev/null @@ -1,15 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -QT += widgets modelingwidgets - -include(../../duse-mt-plugin.pri) - -SOURCES += modelinspectorplugin.cpp - -HEADERS += modelinspectorplugin.h - -OTHER_FILES += modelinspector.json diff --git a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector_dependencies.pri b/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector_dependencies.pri deleted file mode 100644 index 9e0b32df..00000000 --- a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspector_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = ModelInspector diff --git a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.cpp b/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.cpp deleted file mode 100644 index bc6465a3..00000000 --- a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "modelinspectorplugin.h" - -#include <duseinterfaces/iuicontroller.h> -#include <duseinterfaces/iprojectcontroller.h> - -#include <QtModelingWidgets/QModelingObjectView> -#include <QtModelingWidgets/QModelingObjectModel> -#include <QtModelingWidgets/QModelingObjectPropertyEditor> -#include <QtModelingWidgets/QModelingObjectPropertyModel> - -#include <QtModeling/QModelingObject> - -#include <QtWidgets/QListView> - -#include <QtCore/QStringListModel> - -namespace DuSE -{ - -ModelInspectorPlugin::ModelInspectorPlugin(QObject *parent) : - IPlugin(parent), - _modelingObjectView(new QModelingObjectView), - _modelingObjectModel(new QModelingObjectModel), - _propertyEditor(new QModelingObjectPropertyEditor), - _propertyModel(new QModelingObjectPropertyModel(_modelingObjectModel)), - _outputIssues(new QListView) -{ - _modelingObjectView->setModel(_modelingObjectModel); - _propertyEditor->setModel(_propertyModel); - - _outputIssues->setAlternatingRowColors(true); - QPalette outputIssuesPallete = _outputIssues->palette(); - outputIssuesPallete.setColor(QPalette::Active, QPalette::Base, QColor(255, 255, 255)); - outputIssuesPallete.setColor(QPalette::Inactive, QPalette::Base, QColor(255, 255, 255)); - outputIssuesPallete.setColor(QPalette::Active, QPalette::AlternateBase, QColor(225, 225, 225)); - outputIssuesPallete.setColor(QPalette::Inactive, QPalette::AlternateBase, QColor(225, 225, 225)); - _outputIssues->setPalette(outputIssuesPallete); -} - -ModelInspectorPlugin::~ModelInspectorPlugin() -{ - delete _outputIssues->model(); - delete _outputIssues; -} - -bool ModelInspectorPlugin::initialize() -{ - ICore::self()->uiController()->addDockWidget(Qt::LeftDockWidgetArea, tr("Model Inspector"), _modelingObjectView); - ICore::self()->uiController()->addDockWidget(Qt::RightDockWidgetArea, tr("Property Editor"), _propertyEditor); - ICore::self()->uiController()->addDockWidget(Qt::BottomDockWidgetArea, tr("Issues"), _outputIssues); - - connect(ICore::self()->projectController(), SIGNAL(modelOpened(QList<QModelingObject*>)), _modelingObjectModel, SLOT(setModelingObjects(QList<QModelingObject*>))); - connect(ICore::self()->projectController(), SIGNAL(modelOpened(QList<QModelingObject*>)), this, SLOT(populateOutputIssues())); - - connect(ICore::self()->projectController(), SIGNAL(modelClosed()), _modelingObjectModel, SLOT(clear())); - connect(ICore::self()->projectController(), SIGNAL(modelClosed()), _propertyModel, SLOT(clear())); - connect(ICore::self()->projectController(), SIGNAL(modelClosed()), this, SLOT(populateOutputIssues())); - - connect(_modelingObjectView, &QModelingObjectView::modelingObjectChanged, _propertyModel, &QModelingObjectPropertyModel::setModelingObject); - connect(_modelingObjectView, SIGNAL(modelingObjectChanged(QModelingObject*)), ICore::self()->uiController(), SIGNAL(currentModelingObjectChanged(QModelingObject*))); - - connect(_propertyModel, &QModelingObjectPropertyModel::indexChanged, _modelingObjectModel, &QModelingObjectModel::updateIndex); - connect(ICore::self()->uiController(), SIGNAL(updateCurrentModelingObject()), _modelingObjectView, SLOT(updateSelected())); - connect(_modelingObjectView, SIGNAL(addToView(QObject*,QQuickItem*)), ICore::self()->uiController(), SIGNAL(addToView(QObject*,QQuickItem*))); - - return true; -} - -void ModelInspectorPlugin::populateOutputIssues() -{ - delete _outputIssues->model(); - _outputIssues->setModel(new QStringListModel(ICore::self()->projectController()->errorStrings())); -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.h b/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.h deleted file mode 100644 index 3ec87a94..00000000 --- a/examples/uml/duse-mt/src/plugins/modelinspector/modelinspectorplugin.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef MODELINSPECTORPLUGIN_H -#define MODELINSPECTORPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -QT_BEGIN_NAMESPACE -class QListView; - -class QModelingObjectView; -class QModelingObjectModel; -class QModelingObjectPropertyEditor; -class QModelingObjectPropertyModel; -QT_END_NAMESPACE - -namespace DuSE -{ - -class ModelInspectorPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "modelinspector.json") - -public: - ModelInspectorPlugin(QObject *parent = 0); - virtual ~ModelInspectorPlugin(); - - virtual bool initialize(); - -private Q_SLOTS: - void populateOutputIssues(); - -private: - QModelingObjectView *_modelingObjectView; - QModelingObjectModel *_modelingObjectModel; - QModelingObjectPropertyEditor *_propertyEditor; - QModelingObjectPropertyModel *_propertyModel; - QListView *_outputIssues; -}; - -} - -#endif // MODELINSPECTORPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/plugins.pro b/examples/uml/duse-mt/src/plugins/plugins.pro deleted file mode 100644 index 288a90aa..00000000 --- a/examples/uml/duse-mt/src/plugins/plugins.pro +++ /dev/null @@ -1,20 +0,0 @@ -TEMPLATE = subdirs -CONFIG += ordered - -SUBDIRS = \ - modelinspector \ - -qtHaveModule(script): SUBDIRS += javascriptconsole - -qtHaveModule(quick): SUBDIRS += welcomedashboard \ - designoptimizer \ - concretesyntaxview \ - umlconcretesyntax - -qtHaveModule(script):qtHaveModule(quick): SUBDIRS += designspaceexplorer - -SUBDIRS += architecturerecoverycore \ - gccxmlarchitecturerecoverybackend \ - acdcarchitecturerecoveryalgorithm \ - umlmodelingnotation \ - architecturerecoverypanel diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin.pro b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin.pro deleted file mode 100644 index 25a1eae0..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin.pro +++ /dev/null @@ -1,13 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -include(../../../duse-mt-plugin.pri) - -HEADERS += umlconcretesyntaxplugin.h - -SOURCES += umlconcretesyntaxplugin.cpp - -OTHER_FILES += umlconcretesyntax.json diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin_dependencies.pri b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin_dependencies.pri deleted file mode 100644 index 21ac3ba6..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/duseplugin_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = UmlConcreteSyntax diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntax.json b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntax.json deleted file mode 100644 index a28ac84a..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntax.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Category": "Concrete Syntax", - "Vendor": "Qt Project", - "Version": "1.0", - "DependencyList": [ - "ConcreteSyntaxViewPlugin" - ] -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.cpp b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.cpp deleted file mode 100644 index 8541196b..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "umlconcretesyntaxplugin.h" - -UmlConcreteSyntaxPlugin::UmlConcreteSyntaxPlugin(QObject *parent) : - DuSE::IPlugin(parent) -{ -} - -bool UmlConcreteSyntaxPlugin::initialize() -{ - return true; -} - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.h b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.h deleted file mode 100644 index 44662f8d..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/duseplugin/umlconcretesyntaxplugin.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef UMLCONCRETESYNTAXPLUGIN_H -#define UMLCONCRETESYNTAXPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -class UmlConcreteSyntaxPlugin : public DuSE::IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "umlconcretesyntax.json") - -public: - UmlConcreteSyntaxPlugin(QObject *parent = 0); - - virtual bool initialize(); -}; - -#endif // UMLCONCRETESYNTAXPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlAssociation.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlAssociation.qml deleted file mode 100644 index fe3468fe..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlAssociation.qml +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtModeling.Uml 1.0 -import "util.js" as Util - -Relationship { - name: element.name - relationshipType: "association" - source: Util.findQuickItem(parent, element.memberEnds[0].class_.name) - target: Util.findQuickItem(parent, element.memberEnds[0].type.name) - sourceAggregation: aggregation(element.memberEnds[0].aggregation); - targetAggregation: aggregation(element.memberEnds[1].aggregation); - sourceMultiplicity: element.memberEnds[0].lowerValue.value + ".." + element.memberEnds[0].upperValue.value - targetMultiplicity: element.memberEnds[1].lowerValue.value + ".." + element.memberEnds[1].upperValue.value - function aggregation(aggregationEnum) - { - switch (aggregationEnum) { - case 0: return "none" - case 1: return "shared" - case 2: return "composite" - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlClass.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlClass.qml deleted file mode 100644 index bb85764a..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlClass.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -UmlElement { - UmlSlot { - id: nameSlot - anchors.top: parent.top - Text { - id: label - text: element.name - anchors.centerIn: parent - font { family: "Korolev"; italic: element.isAbstract } - } - } - UmlSlot { - id: attributeSlot - anchors { top: nameSlot.bottom; topMargin: -1 } - height: (parent.height - nameSlot.height)/2 - ListView { - model: element.ownedAttributes - anchors { fill: parent; margins: 4 } - delegate: Text { - text: visibility(modelData.visibility) + modelData.name + ": " + (modelData.type ? modelData.type.name:"<no type>") - font { family: "Korolev" } - } - } - } - UmlSlot { - anchors { top: attributeSlot.bottom; topMargin: -1; bottom: parent.bottom } - ListView { - model: element.ownedOperations - anchors { fill: parent; margins: 4 } - delegate: Text { - text: visibility(modelData.visibility) + modelData.name + operationSignature(model) - font { family: "Korolev" } - } - } - } - function visibility(visibilityEnum) - { - switch (visibilityEnum) { - case 0: return " " - case 1: return "+" - case 2: return "-" - case 3: return "#" - case 4: return "~" - } - } - function operationSignature(model) - { - var generalString = "("; - var returnString = ": "; - var list = element.ownedOperations[model.index].ownedParameters; - var count = list.length; - for (var i = 0; i < count ; ++i) - { - if (list[i].direction === 4) - returnString = returnString + list[i].type.name; - else - generalString = generalString + list[i].type.name + ", "; - } - if (returnString == ": ") - returnString = returnString + "void"; - generalString = generalString + ")" + returnString; - generalString = generalString.replace(', )',')'); - return generalString; - } -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlComponent.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlComponent.qml deleted file mode 100644 index a0639d5b..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlComponent.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -UmlElement { - UmlSlot { - id: nameSlot - anchors.top: parent.top - Text { - text: element.name - anchors.centerIn: parent - font { family: "Korolev"; italic: element.isAbstract } - } - Rectangle { - border.width: 1 - width: 18; height: 18 - anchors { right: parent.right; rightMargin: 6; verticalCenter: parent.verticalCenter } - Rectangle { border.width: 1; width: 12; height: 5; x: -6; y: 3 } - Rectangle { border.width: 1; width: 12; height: 5; x: -6; y: 10 } - } - } - UmlSlot { - id: partSlot - anchors { top: nameSlot.bottom; topMargin: -1; bottom: parent.bottom } - } - Row { - width: parent.width - spacing: (parent.width - 14*ports.length)/(ports.length-1) - anchors { bottom: parent.bottom; bottomMargin: -7 } - Repeater { - model: ports.length - Rectangle { - border.width: 1 - width: 14; height: 14 - } - } - } - Component.onCompleted: { - var component = Qt.createComponent("UmlProperty.qml") - if (component.status == Component.Ready) { - var partLength = parts.length - for (var i = 0; i < partLength; ++i) { - component.createObject(partSlot, { name: parts[i].name + ":" + parts[i].type.name }) - } - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlElement.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlElement.qml deleted file mode 100644 index 3d7bce0b..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlElement.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: element - - width: 120 - height: 80 - - // Drag area - MouseArea { - anchors.fill: parent - drag { target: parent; minimumX: 0; minimumY: 0 } - onPressed: parent.focus = true - } - - // Selection marks (begin) - Rectangle { - visible: parent.focus; color: "black"; width: 6; height: 6; z: 2 - anchors { right: parent.right; top: parent.top; rightMargin: -2; topMargin: -2 } - } - Rectangle { - visible: parent.focus; color: "black"; width: 6; height: 6; z: 2 - anchors { right: parent.right; bottom: parent.bottom; rightMargin: -2; bottomMargin: -2 } - } - Rectangle { - visible: parent.focus; color: "black"; width: 6; height: 6; z: 2 - anchors { left: parent.left; top: parent.top; leftMargin: -2; topMargin: -2 } - } - Rectangle { - visible: parent.focus; color: "black"; width: 6; height: 6; z: 2 - anchors { left: parent.left; bottom: parent.bottom; leftMargin: -2; bottomMargin: -2 } - } - // Selection marks (end) - - // Resize mark - Image { - id: resizeMark - visible: parent.focus - source: "images/resize-mark.png" - anchors { right: parent.right; bottom: parent.bottom } - z: 1 - MouseArea { - enabled: element.focus - - anchors.fill: parent - drag.target: resizeMark - - property int oldMouseX - property int oldMouseY - - hoverEnabled: true - - onPressed: { - element.focus = true; - oldMouseX = mouseX - oldMouseY = mouseY - } - - onPositionChanged: { - if (pressed) { - element.width = Math.max(element.width + (mouseX - oldMouseX), 80) - element.height = Math.max(element.height + (mouseY - oldMouseY), 50) - } - } - } - } - gradient: Gradient { - GradientStop { position: 0.0; color: "#FFFFF5" } - GradientStop { position: 1.0; color: "#FFFFE1" } - } -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlGeneralization.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlGeneralization.qml deleted file mode 100644 index 4928a5ca..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlGeneralization.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtModeling.Uml 1.0 -import "util.js" as Util - -Relationship { - relationshipType: "generalization" - source: Util.findQuickItem(parent, element.specific.name) - target: Util.findQuickItem(parent, element.general.name) -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlProperty.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlProperty.qml deleted file mode 100644 index 1972afa8..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlProperty.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -UmlElement { - width: 60 - height: 40 - property alias name: label.text - property alias portsLength: repeater.model - UmlSlot { - anchors { top: parent.top; bottom: parent.bottom } - Text { - id: label - anchors.centerIn: parent - font { family: "Korolev"; italic: element.isAbstract } - } - Rectangle { - border.width: 1 - width: 18; height: 18 - anchors { right: parent.right; rightMargin: 6; verticalCenter: parent.verticalCenter } - Rectangle { border.width: 1; width: 12; height: 5; x: -6; y: 3 } - Rectangle { border.width: 1; width: 12; height: 5; x: -6; y: 10 } - } - } - Row { - width: parent.width - spacing: (parent.width - 14*ports.length)/(ports.length-1) - anchors { bottom: parent.bottom; bottomMargin: -7 } - Repeater { - id: repeater - Rectangle { - border.width: 1 - width: 14; height: 14 - } - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlSlot.qml b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlSlot.qml deleted file mode 100644 index 23f22ded..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/UmlSlot.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - width: parent.width - height: childrenRect.height + 10 - border { width: 1; color: "black" } - clip: true - color: "transparent" -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/images/resize-mark.png b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/images/resize-mark.png Binary files differdeleted file mode 100644 index b3697697..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/images/resize-mark.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmldir b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmldir deleted file mode 100644 index a344dd61..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmldir +++ /dev/null @@ -1,9 +0,0 @@ -module QtModeling.Uml -internal UmlElement UmlElement.qml -internal UmlSlot UmlSlot.qml -UmlClass 1.0 UmlClass.qml -UmlComponent 1.0 UmlComponent.qml -UmlProperty 1.0 UmlProperty.qml -UmlAssociation 1.0 UmlAssociation.qml -UmlGeneralization 1.0 UmlGeneralization.qml -plugin qtmodelingumlplugin diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmlplugin.pro b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmlplugin.pro deleted file mode 100644 index 709fd65f..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/qmlplugin.pro +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -TARGET = qtmodelingumlplugin -TARGETPATH = QtModeling/Uml - -QT += quick-private - -# Qml -QML_FILES = \ - UmlElement.qml \ - UmlSlot.qml \ - UmlClass.qml \ - UmlComponent.qml \ - UmlProperty.qml \ - UmlAssociation.qml \ - UmlGeneralization.qml - -# JavaScript - -QML_FILES += \ - util.js - -# Images -QML_FILES += \ - images/resize-mark.png \ - -HEADERS += \ - umlconcretesyntaxqmlplugin.h \ - relationshipitem.h - -SOURCES += \ - umlconcretesyntaxqmlplugin.cpp \ - relationshipitem.cpp - -CONFIG += no_cxx_module -load(qml_plugin) diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp deleted file mode 100644 index 47fc8037..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "relationshipitem.h" - -#include <QtGui/QPainter> - -#include <QtWidgets/QApplication> - -#include "private/qquickrectangle_p.h" - -RelationshipItem::RelationshipItem(QQuickItem *parent) - : QQuickPaintedItem(parent), - _source(0), - _target(0), - _relationshipType("association"), - _sourceAggregation("none"), - _targetAggregation("none") -{ - setAntialiasing(true); -} - -void RelationshipItem::paint(QPainter *painter) -{ - if (!_source || !_target) - return; - - qreal x1 = _source->x(); qreal y1 = _source->y(); qreal w1 = _source->width(); qreal h1 = _source->height(); - qreal x2 = _target->x(); qreal y2 = _target->y(); qreal w2 = _target->width(); qreal h2 = _target->height(); - - QLineF originalLine(x1 + w1/2, y1 + h1/2, x2 + w2/2, y2 + h2/2); - QPointF p1, p2; - - if (originalLine.intersect(QLineF(x1 , y1 , x1 + w1, y1 ), &p1) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x1 , y1 + h1, x1 + w1, y1 + h1), &p1) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x1 , y1 , x1 , y1 + h1), &p1) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x1 + w1, y1 , x1 + w1, y1 + h1), &p1) == QLineF::BoundedIntersection) {} - - if (originalLine.intersect(QLineF(x2 , y2 , x2 + w2, y2 ), &p2) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x2 , y2 + h2, x2 + w2, y2 + h2), &p2) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x2 , y2 , x2 , y2 + h2), &p2) == QLineF::BoundedIntersection) {} else - if (originalLine.intersect(QLineF(x2 + w2, y2 , x2 + w2, y2 + h2), &p2) == QLineF::BoundedIntersection) {} - - painter->drawLine(p1.x()-x(), p1.y()-y(), p2.x()-x(), p2.y()-y()); - QPolygonF arrow(QVector<QPointF>() << QPointF(-12, -8) << QPointF(0, 0) << QPointF(-12, 8)); - QTransform transform; - transform.translate(p2.x()-x(), p2.y()-y()); - transform.rotate(-originalLine.angle()); - if (_relationshipType == "association") { - painter->drawPolyline(transform.map(arrow)); - QFont font("Korolev"); - QFontMetrics metrics(font); - painter->setFont(font); - painter->drawText(p1.x()-x()+(p2.x()-x()-(p1.x()-x()))/2+10, p1.y()-y()+(p2.y()-y()-(p1.y()-y()))/2, _name); - painter->drawText(p2.x()-x()+10, p2.y()-y()-10, _sourceMultiplicity); - painter->drawText(p1.x()-x()+10, p1.y()-y()-10, _targetMultiplicity); - } - else if (_relationshipType == "generalization") { - painter->setBrush(QBrush(Qt::white)); - painter->drawPolygon(transform.map(arrow)); - } - - if (_relationshipType == "association" && (_sourceAggregation == "composite" || _sourceAggregation == "shared")) { - painter->setBrush(QBrush(_sourceAggregation == "composite" ? Qt::black:Qt::white)); - QPolygon diamond(QVector<QPoint>() << QPoint(0, 0) << QPoint(12, -8) << QPoint(24, 0) << QPoint(12, 8)); - QTransform transform; - transform.translate(p1.x()-x(), p1.y()-y()); - transform.rotate(-originalLine.angle()); - painter->drawPolygon(transform.map(diamond)); - } -} - -QString RelationshipItem::name() const -{ - return _name; -} - -void RelationshipItem::setName(QString name) -{ - _name = name; -} - -QQuickRectangle *RelationshipItem::source() const -{ - return _source; -} - -void RelationshipItem::setSource(QQuickRectangle *source) -{ - if (source != _source) { - if (_source) { - disconnect(source, &QQuickRectangle::xChanged, this, &RelationshipItem::updateCoordinates); - disconnect(source, &QQuickRectangle::yChanged, this, &RelationshipItem::updateCoordinates); - } - _source = source; - if (!_target) { - setX(_source->x()); - setY(_source->y()); - } - else { - updateCoordinates(); - } - connect(source, &QQuickRectangle::xChanged, this, &RelationshipItem::updateCoordinates); - connect(source, &QQuickRectangle::yChanged, this, &RelationshipItem::updateCoordinates); - } -} - -QQuickRectangle *RelationshipItem::target() const -{ - return _target; -} - -void RelationshipItem::setTarget(QQuickRectangle *target) -{ - if (target != _target) { - if (_target) { - disconnect(target, &QQuickRectangle::xChanged, this, &RelationshipItem::updateCoordinates); - disconnect(target, &QQuickRectangle::yChanged, this, &RelationshipItem::updateCoordinates); - } - _target = target; - if (!_source) { - setX(_target->x()); - setY(_target->y()); - } - else { - updateCoordinates(); - } - connect(target, &QQuickRectangle::xChanged, this, &RelationshipItem::updateCoordinates); - connect(target, &QQuickRectangle::yChanged, this, &RelationshipItem::updateCoordinates); - } -} - -QString RelationshipItem::relationshipType() const -{ - return _relationshipType; -} - -void RelationshipItem::setRelationshipType(QString relationshipType) -{ - _relationshipType = relationshipType; -} - -QString RelationshipItem::sourceAggregation() const -{ - return _sourceAggregation; -} - -void RelationshipItem::setSourceAggregation(QString sourceAggregation) -{ - _sourceAggregation = sourceAggregation; -} - -QString RelationshipItem::targetAggregation() const -{ - return _targetAggregation; -} - -void RelationshipItem::setTargetAggregation(QString targetAggregation) -{ - _targetAggregation = targetAggregation; -} - -QString RelationshipItem::sourceMultiplicity() const -{ - return _sourceMultiplicity; -} - -void RelationshipItem::setSourceMultiplicity(QString sourceMultiplicity) -{ - _sourceMultiplicity = sourceMultiplicity; -} - -QString RelationshipItem::targetMultiplicity() const -{ - return _targetMultiplicity; -} - -void RelationshipItem::setTargetMultiplicity(QString targetMultiplicity) -{ - _targetMultiplicity = targetMultiplicity; -} - -void RelationshipItem::updateCoordinates() -{ - QQuickRectangle *minRectX = _source->x() < _target->x() ? _source:_target; - QQuickRectangle *minRectY = _source->y() < _target->y() ? _source:_target; - QQuickRectangle *maxRectX = minRectX == _source ? _target:_source; - QQuickRectangle *maxRectY = minRectY == _source ? _target:_source; - setX(minRectX->x()); - setY(minRectY->y()); - setWidth(qMax(maxRectX->x() + maxRectX->width() - minRectX->x(), qMax(_source->width(), _target->width()))); - setHeight(qMax(maxRectY->y() + maxRectY->height() - minRectY->y(), qMax(_source->height(), _target->height()))); -} - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.h b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.h deleted file mode 100644 index aeab5f8a..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/relationshipitem.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef RELATIONSHIPITEM_H -#define RELATIONSHIPITEM_H - -#include <QtQuick/QQuickPaintedItem> - -QT_BEGIN_NAMESPACE -class QQuickRectangle; -QT_END_NAMESPACE - -class RelationshipItem : public QQuickPaintedItem -{ - Q_OBJECT - - Q_PROPERTY(QString name READ name WRITE setName) - Q_PROPERTY(QQuickRectangle * source READ source WRITE setSource) - Q_PROPERTY(QQuickRectangle * target READ target WRITE setTarget) - Q_PROPERTY(QString relationshipType READ relationshipType WRITE setRelationshipType) - Q_PROPERTY(QString sourceAggregation READ sourceAggregation WRITE setSourceAggregation) - Q_PROPERTY(QString targetAggregation READ targetAggregation WRITE setTargetAggregation) - Q_PROPERTY(QString sourceMultiplicity READ sourceMultiplicity WRITE setSourceMultiplicity) - Q_PROPERTY(QString targetMultiplicity READ targetMultiplicity WRITE setTargetMultiplicity) - -public: - RelationshipItem(QQuickItem *parent = 0); - - void paint(QPainter *painter); - - QString name() const; - void setName(QString name); - - QQuickRectangle *source() const; - void setSource(QQuickRectangle *source); - - QQuickRectangle *target() const; - void setTarget(QQuickRectangle *target); - - QString relationshipType() const; - void setRelationshipType(QString relationshipType); - - QString sourceAggregation() const; - void setSourceAggregation(QString sourceAggregation); - - QString targetAggregation() const; - void setTargetAggregation(QString targetAggregation); - - QString sourceMultiplicity() const; - void setSourceMultiplicity(QString sourceMultiplicity); - - QString targetMultiplicity() const; - void setTargetMultiplicity(QString targetMultiplicity); - -private Q_SLOTS: - void updateCoordinates(); - -private: - QString _name; - QQuickRectangle *_source; - QQuickRectangle *_target; - QString _relationshipType; - QString _sourceAggregation; - QString _targetAggregation; - QString _sourceMultiplicity; - QString _targetMultiplicity; -}; - -#endif // RELATIONSHIPITEM_H - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.cpp b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.cpp deleted file mode 100644 index e640fcd0..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "umlconcretesyntaxqmlplugin.h" - -#include <QtQml/QQmlEngine> - -#include "relationshipitem.h" - -void UmlConcreteSyntaxQmlPlugin::registerTypes(const char *uri) -{ - Q_ASSERT(uri == QLatin1String("QtModeling.Uml")); - // @uri QtModeling.Uml - qmlRegisterType<RelationshipItem>(uri, 1, 0, "Relationship"); -} - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.h b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.h deleted file mode 100644 index bf5438f6..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/umlconcretesyntaxqmlplugin.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef UMLCONCRETESYNTAXQMLPLUGIN_H -#define UMLCONCRETESYNTAXQMLPLUGIN_H - -#include <QtQml/QQmlExtensionPlugin> - -class UmlConcreteSyntaxQmlPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") - -public: - void registerTypes(const char *uri); -}; - -#endif // UMLCONCRETESYNTAXQMLPLUGIN_H - diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/util.js b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/util.js deleted file mode 100644 index b8438d3f..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/qmlplugin/util.js +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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; -} - -function findQuickItem(parent, objectName) { - var ret = null; - for (var i = 0; i < parent.children.length; ++i) { - ret = findQuickItem(parent.children[i], objectName); - if (ret != null) - break; - } - if (ret == null && parent.objectName == objectName) { - ret = parent; - } - return ret; -} diff --git a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/umlconcretesyntax.pro b/examples/uml/duse-mt/src/plugins/umlconcretesyntax/umlconcretesyntax.pro deleted file mode 100644 index 5dd1557f..00000000 --- a/examples/uml/duse-mt/src/plugins/umlconcretesyntax/umlconcretesyntax.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS = duseplugin qmlplugin diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.json b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.json deleted file mode 100644 index 1952997f..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Category": "Architecture Recovery", - "Vendor": "Qt Project", - "Version": "1.0", - "DependencyList": [ - "ArchitectureRecoveryCorePlugin" - ] -} diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.pro b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.pro deleted file mode 100644 index acd61e57..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation.pro +++ /dev/null @@ -1,21 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-08-14T03:21:41 -# -#------------------------------------------------- - -include(../../duse-mt-plugin.pri) - -QT -= widgets gui -QT += modeling uml - -DEFINES += UMLMODELINGNOTATION_LIBRARY - -HEADERS += \ - umlmodelingnotation_export.h \ - umlmodelingnotationplugin.h - -SOURCES += \ - umlmodelingnotationplugin.cpp - -OTHER_FILES += umlmodelingnotation.json diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_dependencies.pri b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_dependencies.pri deleted file mode 100644 index 7a6dd211..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_dependencies.pri +++ /dev/null @@ -1,4 +0,0 @@ -DUSEMT_PLUGIN_NAME = UmlModelingNotation - -DUSEMT_PLUGIN_DEPENDS += \ - architecturerecoverycore diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_export.h b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_export.h deleted file mode 100644 index b5e46f50..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotation_export.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ - -#ifndef UMLMODELINGNOTATION_EXPORT_H -#define UMLMODELINGNOTATION_EXPORT_H - -#include <qglobal.h> - -#if defined(UMLMODELINGNOTATION_LIBRARY) -# define UMLMODELINGNOTATION_EXPORT Q_DECL_EXPORT -#else -# define UMLMODELINGNOTATION_EXPORT Q_DECL_IMPORT -#endif - -#endif // UMLMODELINGNOTATION_EXPORT_H diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.cpp b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.cpp deleted file mode 100644 index c06b6474..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "umlmodelingnotationplugin.h" - -#include <QtModeling/QXmiWriter> - -namespace DuSE -{ - -UmlModelingNotationPlugin::UmlModelingNotationPlugin(QObject *parent) - : IPlugin(parent) -{ - _name = "UML Notation"; -} - -bool UmlModelingNotationPlugin::initialize() -{ - return true; -} - -void UmlModelingNotationPlugin::generateDiagram(const QString &name) -{ - QFile file(QString(name + "/output.xmi")); - - if (!file.open(QFile::WriteOnly | QFile::Text)) { - qDebug() << "Cannot write file !"; - } else { - QXmiWriter writer; - QList<QModelingObject *> list; - foreach (QUmlPackage *subsystem, _subsystems) { - list<< subsystem->asQModelingObject(); - } - - if (writer.writeFile(list, &file)) { - qDebug() << "XMI file saved !"; - } else { - qDebug() << "Error when writing XMI file !"; - } - } - - file.close(); -} - -void UmlModelingNotationPlugin::loadSubsystems() -{ - foreach (QStringList clusterElements, _clusterList) { - QUmlPackage *subsystem = new QUmlPackage; - subsystem->setName(clusterElements.at(0)); - for (int i = 1; i < clusterElements.count(); ++i) { - QUmlPackage *subsystemElement = new QUmlPackage; - subsystemElement->setName(clusterElements.at(i)); - subsystem->addPackagedElement(subsystemElement); - } - _subsystems.append(subsystem); - } -} - -void UmlModelingNotationPlugin::setClusterList(QList<QStringList> m_clusterList) -{ - _clusterList = m_clusterList; -} - -} diff --git a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.h b/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.h deleted file mode 100644 index fb1f76c3..00000000 --- a/examples/uml/duse-mt/src/plugins/umlmodelingnotation/umlmodelingnotationplugin.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef UMLMODELINGNOTATIONPLUGIN_H -#define UMLMODELINGNOTATIONPLUGIN_H - -#include <duseinterfaces/iplugin.h> -#include <architecturerecoverycore/imodelingnotation.h> - -#include <QtCore/QDebug> -#include <QtCore/QFile> -#include <QtUml/QtUml> - -#include "umlmodelingnotation_export.h" - -namespace DuSE -{ - -class UMLMODELINGNOTATION_EXPORT UmlModelingNotationPlugin : public IPlugin, public IModelingNotation -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "umlmodelingnotation.json") - -public: - UmlModelingNotationPlugin(QObject *parent = 0); - - virtual bool initialize(); - virtual void generateDiagram(const QString &name); - void loadSubsystems(); - - void setClusterList(QList<QStringList> m_clusterList); - -private: - QList<QStringList> _clusterList; - QList<QUmlPackage *> _subsystems; -}; - -} - -#endif // UMLMODELINGNOTATIONPLUGIN_H diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/duse-mt-64x64.png b/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/duse-mt-64x64.png Binary files differdeleted file mode 100644 index ec26192f..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/duse-mt-64x64.png +++ /dev/null diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qml b/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qml deleted file mode 100644 index 7dab38df..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - Row { - anchors { left: parent.left; right: parent.right; top: parent.top; margins: 20 } - spacing: 10 - Image { - id: duseIcon - source: "duse-mt-64x64.png" - } - Text { - text: "Welcome to DuSE-MT !" - font { family: "Korolev"; pointSize: 20 } - height: duseIcon.height - verticalAlignment: Text.AlignVCenter - } - } -} diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qrc b/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qrc deleted file mode 100644 index 6dcf2323..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/qml/welcomedashboard.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/welcomedashboard"> - <file>welcomedashboard.qml</file> - <file>duse-mt-64x64.png</file> - </qresource> -</RCC> diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.json b/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.json deleted file mode 100644 index bc146657..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Category": "Dashboards", - "Vendor": "Qt Project", - "Version": "1.0" -} diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.pro b/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.pro deleted file mode 100644 index d7f0cc1d..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard.pro +++ /dev/null @@ -1,17 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-25T17:38:51 -# -#------------------------------------------------- - -QT += quick widgets - -include(../../duse-mt-plugin.pri) - -SOURCES += welcomedashboardplugin.cpp - -HEADERS += welcomedashboardplugin.h - -RESOURCES += qml/welcomedashboard.qrc - -OTHER_FILES += welcomedashboard.json diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard_dependencies.pri b/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard_dependencies.pri deleted file mode 100644 index 3c4a11a1..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboard_dependencies.pri +++ /dev/null @@ -1 +0,0 @@ -DUSEMT_PLUGIN_NAME = WelcomeDashboard diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.cpp b/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.cpp deleted file mode 100644 index 6a893d30..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#include "welcomedashboardplugin.h" - -#include <duseinterfaces/iuicontroller.h> - -#include <QtQuick/QQuickView> - -#include <QtWidgets/QWidget> - -namespace DuSE -{ - -WelcomeDashboardPlugin::WelcomeDashboardPlugin(QObject *parent) : - IPlugin(parent), - _welcomeQuickView(new QQuickView) -{ -} - -bool WelcomeDashboardPlugin::initialize() -{ - _welcomeQuickView->setSource(QUrl("qrc:/welcomedashboard/welcomedashboard.qml")); - _welcomeQuickView->setResizeMode(QQuickView::SizeRootObjectToView); - - ICore::self()->uiController()->addCentralWidgetTab(QWidget::createWindowContainer(_welcomeQuickView), "Welcome", 0); - - return true; -} - -} - diff --git a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.h b/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.h deleted file mode 100644 index 26790841..00000000 --- a/examples/uml/duse-mt/src/plugins/welcomedashboard/welcomedashboardplugin.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Sandro S. Andrade <[email protected]> -** 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$ -** -****************************************************************************/ -#ifndef WELCOMEDASHBOARDPLUGIN_H -#define WELCOMEDASHBOARDPLUGIN_H - -#include <duseinterfaces/iplugin.h> - -QT_BEGIN_NAMESPACE -class QQuickView; -QT_END_NAMESPACE - -namespace DuSE -{ - -class WelcomeDashboardPlugin : public IPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.liveblue.DuSE.IPlugin" FILE "welcomedashboard.json") - -public: - WelcomeDashboardPlugin(QObject *parent = 0); - - virtual bool initialize(); - -private: - QQuickView *_welcomeQuickView; -}; - -} - -#endif // WELCOMEDASHBOARDPLUGIN_H - |