diff options
Diffstat (limited to 'src/plugins/metamodels')
6 files changed, 180 insertions, 0 deletions
diff --git a/src/plugins/metamodels/measurementprofile/MeasurementProfile.xmi b/src/plugins/metamodels/measurementprofile/MeasurementProfile.xmi new file mode 100644 index 00000000..8833b625 --- /dev/null +++ b/src/plugins/metamodels/measurementprofile/MeasurementProfile.xmi @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.omg.org/spec/UML/20110701"> + <uml:Profile name="MeasurementProfile" xmi:id="MeasurementProfile" URI="http://liveblue.wordpress.com/MeasurementProfile"> + <elementImport xmi:type="uml:ElementImport" xmi:id="elementImport0"> + <importedElement href="http://www.omg.org/spec/UML/20110701/UML.xmi#Interface"/> + </elementImport> + <packagedElement xmi:type="uml:Stereotype" name="ILFInterface" xmi:id="ILFInterface"> + <ownedAttribute xmi:type="uml:Property" xmi:id="ILFInterface-base_Interface" visibility="public" name="base_Interface" association="A_interface_ILFInterface"> + <type href="http://www.omg.org/spec/UML/20110701/UML.xmi#Interface"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="A_interface_ILFInterface" name="A_interface_ILFInterface"> + <memberEnd xmi:idref="A_interface_ILFInterface-extension_ILFInterface"/> + <memberEnd xmi:idref="ILFInterface-base_Interface"/> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="A_interface_ILFInterface-extension_ILFInterface" name="extension_ILFInterface" type="ILFInterface" aggregation="composite" association="A_interface_ILFInterface"/> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" name="EIFInterface" xmi:id="EIFInterface"> + <ownedAttribute xmi:type="uml:Property" xmi:id="EIFInterface-base_Interface" visibility="public" name="base_Interface" association="A_interface_EIFInterface"> + <type href="http://www.omg.org/spec/UML/20110701/UML.xmi#Interface"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="A_interface_EIFInterface" name="A_interface_EIFInterface"> + <memberEnd xmi:idref="A_interface_EIFInterface-extension_EIFInterface"/> + <memberEnd xmi:idref="EIFInterface-base_Interface"/> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="A_interface_EIFInterface-extension_EIFInterface" name="extension_EIFInterface" type="EIFInterface" aggregation="composite" association="A_interface_EIFInterface"/> + </packagedElement> + </uml:Profile> +</xmi:XMI> + diff --git a/src/plugins/metamodels/measurementprofile/measurementprofile.json b/src/plugins/metamodels/measurementprofile/measurementprofile.json new file mode 100644 index 00000000..961b21c3 --- /dev/null +++ b/src/plugins/metamodels/measurementprofile/measurementprofile.json @@ -0,0 +1,7 @@ +{ + "Version": "1.0", + "Vendor": "Qt Project", + "MetaModelNamespaceUri": "http://liveblue.wordpress.com/MeasurementProfile", + "MetaModelPrefix": "QMeasurementProfile", + "MetaModelTopLevelTypes": [ ] +} diff --git a/src/plugins/metamodels/measurementprofile/measurementprofile.pro b/src/plugins/metamodels/measurementprofile/measurementprofile.pro new file mode 100644 index 00000000..faccc980 --- /dev/null +++ b/src/plugins/metamodels/measurementprofile/measurementprofile.pro @@ -0,0 +1,18 @@ +TARGET = qmeasurementprofilemetamodel + +PLUGIN_TYPE = metamodels +PLUGIN_CLASS_NAME = QMeasurementProfileMetaModelPlugin +load(qt_plugin) + +QT += modeling measurementprofile + +HEADERS = qmeasurementprofilemetamodelplugin.h + +SOURCES = qmeasurementprofilemetamodelplugin.cpp + +xmi.files = MeasurementProfile.xmi +xmi.path = $${target.path} + +INSTALLS += xmi + +OTHER_FILES += measurementprofile.json diff --git a/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.cpp b/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.cpp new file mode 100644 index 00000000..1111ee07 --- /dev/null +++ b/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Sandro S. Andrade <sandroandrade@kde.org> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtMeasurementProfile 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 "qmeasurementprofilemetamodelplugin.h" + +#include <QtModeling/QModelingElement> + +#include <QtMeasurementProfile/QtMeasurementProfile> + +QMeasurementProfileMetaModelPlugin::QMeasurementProfileMetaModelPlugin(QObject *parent) + : QMetaModelPlugin(parent) +{ +} + +QModelingElement *QMeasurementProfileMetaModelPlugin::createModelingElement(QString type) +{ + if (type == "QMeasurementProfileEIFInterface") return new QMeasurementProfileEIFInterface; + if (type == "QMeasurementProfileILFInterface") return new QMeasurementProfileILFInterface; + Q_ASSERT_X(true, + "QMeasurementProfileMetaModelPlugin::createModelingElement", + QStringLiteral("QMeasurementProfileMetaModelPlugin does not know how to create instances of '%1' type !").arg(type).toLatin1()); + return 0; +} + diff --git a/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.h b/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.h new file mode 100644 index 00000000..b4ae5184 --- /dev/null +++ b/src/plugins/metamodels/measurementprofile/qmeasurementprofilemetamodelplugin.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Sandro S. Andrade <sandroandrade@kde.org> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtMeasurementProfile 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 QMEASUREMENTPROFILEMETAMODELPLUGIN_H +#define QMEASUREMENTPROFILEMETAMODELPLUGIN_H + +#include <QtModeling/QMetaModelPlugin> + +QT_BEGIN_NAMESPACE + +class QModelingElement; + +class QMeasurementProfileMetaModelPlugin : public QMetaModelPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QMetaModelPlugin" FILE "measurementprofile.json") + +public: + QMeasurementProfileMetaModelPlugin(QObject *parent = 0); + + virtual QModelingElement *createModelingElement(QString type); +}; + +QT_END_NAMESPACE + +#endif // QMEASUREMENTPROFILEMETAMODELPLUGIN_H + diff --git a/src/plugins/metamodels/metamodels.pro b/src/plugins/metamodels/metamodels.pro index a546ae2c..c58ce38a 100644 --- a/src/plugins/metamodels/metamodels.pro +++ b/src/plugins/metamodels/metamodels.pro @@ -4,3 +4,4 @@ qtHaveModule(uml): SUBDIRS += uml qtHaveModule(mof): SUBDIRS += mof qtHaveModule(duse): SUBDIRS += duse qtHaveModule(saduseprofile): SUBDIRS += saduseprofile +qtHaveModule(measurementprofile): SUBDIRS += measurementprofile |