diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-11-23 23:14:28 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-11-24 03:10:11 +0100 |
commit | f2221017f76feddc0bcab60b977a3b87b162c253 (patch) | |
tree | 4cf9f8165f6b82cb8e52209bb119f5c9bd3dc708 | |
parent | 3acf9500befce24a558bb42ce3640630150f4ccf (diff) |
Fix QtModeling module documentation
Change-Id: Id63005968d788dedec9cb397f6f7a1b1cd7f0568
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
24 files changed, 338 insertions, 201 deletions
diff --git a/INSOURCE-BUILDING b/INSOURCE-BUILDING index 3ca03370..35bb23f1 100644 --- a/INSOURCE-BUILDING +++ b/INSOURCE-BUILDING @@ -2,7 +2,7 @@ In order to build the QtModeling add-on inside Qt official repository the follow steps should be applied. Apparently a complete clean, init-repository, configure and make is needed. -1) Build +1) FOR INTEGRATED BUILD 1.1) Clone qt5 repository @@ -17,14 +17,14 @@ git submodule add ../qtmodeling.git 1.5) Add the following line in qt.pro: -addModule(qtmodeling, qtbase, qtdeclarative, qtscript) +addModule(qtmodeling, qtbase, qtdeclarative qtscript) -1.6) The previous files (.gitmodules, init-repository, and qt.pro) should be committed in - qt5 super-repository when qtmodeling is ready to be released +1.6) The previous files (.gitmodules, init-repository, qt.pro, and the empty qtmodeling directory) + should be committed in qt5 super-repository when qtmodeling is ready to be released 1.7) Init the repository: -perl init-repository --module-subset=qtbase,qtdeclarative,qtscript,qtmodeling +perl init-repository --module-subset=qtbase,qtdeclarative,qtscript,qtdoc,qtmodeling 1.8) Configure Qt5: @@ -34,110 +34,21 @@ perl init-repository --module-subset=qtbase,qtdeclarative,qtscript,qtmodeling make -j <#core+1> -2) Documentation - -2.1) Apply the following patch - -diff --git a/doc/config/qt-project.qdocconf b/doc/config/qt-project.qdocconf -index c6c1f4b..d8ba88a 100644 ---- a/doc/config/qt-project.qdocconf -+++ b/doc/config/qt-project.qdocconf -@@ -71,6 +71,8 @@ include($QT_CONTACTS_QDOCCONF) - include($QT_ORGANIZER_QDOCCONF) - include($QT_VERSIT_QDOCCONF) - include($QT_BLUETOOTH_QDOCCONF) -+include($QT_UML_QDOCCONF) -+include($QT_MOF_QDOCCONF) - - - imagedirs += images -diff --git a/doc/doc.pri b/doc/doc.pri -index d2f64ef..4a5eac3 100644 ---- a/doc/doc.pri -+++ b/doc/doc.pri -@@ -48,7 +48,9 @@ MODULES = activeqt \ - contacts \ - organizer \ - versit \ -- bluetooth -+ bluetooth \ -+ uml \ -+ mof - - # Pretend there is a doc module. Simplifies things a bit. - QT.doc.sources = $$dirname(PWD) -diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc -index 0fe1f68..d6bda9c 100644 ---- a/doc/src/modules.qdoc -+++ b/doc/src/modules.qdoc -@@ -161,6 +161,16 @@ - search via QML and C++ interfaces. Provides an NMEA backend for - positioning. - \row -+ \li \l{QtUml Module}{Qt UML} -+ \li All -+ \li -+ \li OMG's UML Qt-based implementation. -+ \row -+ \li \l{QtMof Module}{Qt MOF} -+ \li All -+ \li -+ \li OMG's Meta Object Facility (MOF) Qt-based implementation. -+ \row - \li \l{QtOpenGL}{Qt OpenGL} - \li - \li - -2.2) Create the file qtdoc/doc/config/modules/qtmof.qdocconf containing: - -# QT_MOF_SOURCES points to qtmof/src/mof - -headerdirs += $QT_MOF_SOURCES \ - $QT_MOF_SOURCES/../../examples/mof - -sourcedirs += $QT_MOF_SOURCES \ - $QT_MOF_SOURCES/../../examples/mof \ - $QT_MOF_SOURCES/doc - -exampledirs += $QT_MOF_SOURCES/../../examples/mof \ - $QT_MOF_SOURCES/doc/snippets - -imagedirs += $QT_MOF_SOURCES/doc/images - -excludedirs += $QT_MOF_SOURCES/doc/snippets - -Cpp.ignoretokens += \ - QT_BEGIN_NAMESPACE_MOF \ - QT_END_NAMESPACE_MOF \ - QT_BEGIN_NAMESPACE_MOF_COMMON \ - QT_END_NAMESPACE_MOF_COMMON \ - QT_BEGIN_NAMESPACE_MOF_REFLECTION \ - QT_END_NAMESPACE_MOF_REFLECTION \ - Q_MOF_EXPORT - -2.3) Create the file qtdoc/doc/config/modules/qtuml.qdocconf containing: - -# QT_UML_SOURCES points to qtmof/src/uml - -headerdirs += $QT_UML_SOURCES \ - $QT_UML_SOURCES/../../examples/uml - -sourcedirs += $QT_UML_SOURCES \ - $QT_UML_SOURCES/../../examples/uml \ - $QT_UML_SOURCES/doc - -exampledirs += $QT_UML_SOURCES/../../examples/uml \ - $QT_UML_SOURCES/doc/snippets - -imagedirs += $QT_UML_SOURCES/doc/images - -excludedirs += $QT_UML_SOURCES/doc/snippets - -Cpp.ignoretokens += \ - QT_BEGIN_NAMESPACE_UML \ - QT_END_NAMESPACE_UML \ - QT_BEGIN_NAMESPACE_UML_CLASSES \ - QT_END_NAMESPACE_UML_CLASSES \ - QT_BEGIN_NAMESPACE_UML_CLASSES_KERNEL \ - QT_END_NAMESPACE_UML_CLASSES_KERNEL \ - Q_UML_EXPORT +2) FOR INTEGRATED DOCUMENTATION GENERATION + +2.1) Add the following lines in the add-on modules table described in qtdoc/doc/src/qtmodules.qdoc: + + \row + \li \l{Qt Modeling} + \li All + \li + \li Classes for software (meta)modeling features in Qt. + +2.2) Add 'qtmodeling' to the 'depends' variable in qtdoc/doc/config/qtdoc.qdocconf file + +2.3) Add 'qtmodeling' to the 'depends' variable in qtbase/qmake/doc/qmake.qdocconf file + +2.4) Add the following row in the appropriate location in qtbase/qmake/doc/src/qmake-manual.qdoc: + +\row \li modeling \li \l{Qt Modeling} + diff --git a/src/duse/doc/qtduse.qdocconf b/src/duse/doc/qtduse.qdocconf index 3f3b3454..fe444e2f 100644 --- a/src/duse/doc/qtduse.qdocconf +++ b/src/duse/doc/qtduse.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtDuse description = Qt Duse Reference Documentation -url = http://qt-project.org/doc/qtduse -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = duse qhp.projects = QtDuse qhp.QtDuse.file = qtduse.qhp -qhp.QtDuse.namespace = org.qt-project.qtduse.500 +qhp.QtDuse.namespace = org.qt-project.qtduse.$QT_VERSION_TAG qhp.QtDuse.virtualFolder = qtduse qhp.QtDuse.indexTitle = Qt Duse qhp.QtDuse.indexRoot = -qhp.QtDuse.filterAttributes = qtduse 5.0.0 qtrefdoc -qhp.QtDuse.customFilters.Qt.name = QtDuse 5.0.0 -qhp.QtDuse.customFilters.Qt.filterAttributes = qtduse 5.0.0 +qhp.QtDuse.filterAttributes = qtduse $QT_VERSION qtrefdoc +qhp.QtDuse.customFilters.Qt.name = QtDuse $QT_VERSION +qhp.QtDuse.customFilters.Qt.filterAttributes = qtduse $QT_VERSION qhp.QtDuse.subprojects = classes qhp.QtDuse.subprojects.classes.title = C++ Classes diff --git a/src/modeling/doc/qtmodeling.qdocconf b/src/modeling/doc/qtmodeling.qdocconf index 2d319d34..49765b23 100644 --- a/src/modeling/doc/qtmodeling.qdocconf +++ b/src/modeling/doc/qtmodeling.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtModeling description = Qt Modeling Reference Documentation -url = http://qt-project.org/doc/qtmodeling -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = modeling qhp.projects = QtModeling qhp.QtModeling.file = qtmodeling.qhp -qhp.QtModeling.namespace = org.qt-project.qtmodeling.500 +qhp.QtModeling.namespace = org.qt-project.qtmodeling.$QT_VERSION_TAG qhp.QtModeling.virtualFolder = qtmodeling qhp.QtModeling.indexTitle = Qt Modeling qhp.QtModeling.indexRoot = -qhp.QtModeling.filterAttributes = qtmodeling 5.0.0 qtrefdoc -qhp.QtModeling.customFilters.Qt.name = QtModeling 5.0.0 -qhp.QtModeling.customFilters.Qt.filterAttributes = qtmodeling 5.0.0 +qhp.QtModeling.filterAttributes = qtmodeling $QT_VERSION qtrefdoc +qhp.QtModeling.customFilters.Qt.name = QtModeling $QT_VERSION +qhp.QtModeling.customFilters.Qt.filterAttributes = qtmodeling $QT_VERSION qhp.QtModeling.subprojects = classes qhp.QtModeling.subprojects.classes.title = C++ Classes @@ -39,3 +39,6 @@ exampledirs += ../../../examples/modeling \ imagedirs += images \ ../../../examples/modeling/doc/images + +navigation.landingpage = "Qt Modeling" +navigation.cppclassespage = "Qt Modeling C++ Classes" diff --git a/src/modeling/doc/src/qtmodeling.qdoc b/src/modeling/doc/src/qtmodeling.qdoc index ddb20c28..2952e221 100644 --- a/src/modeling/doc/src/qtmodeling.qdoc +++ b/src/modeling/doc/src/qtmodeling.qdoc @@ -44,13 +44,13 @@ \section1 Reference These are links to the API reference materials. \list - \li \l{Qt Modeling Module C++ Classes}{C++ classes} + \li \l{Qt Modeling C++ Classes}{C++ classes} \endlist */ /*! \module QtModeling - \title Qt Modeling Module C++ Classes + \title Qt Modeling C++ Classes \ingroup modules \brief Provide facility classes for software modeling and meta-modeling diff --git a/src/modeling/modeling.pro b/src/modeling/modeling.pro index 2f9fb3f0..7e7c5ea4 100644 --- a/src/modeling/modeling.pro +++ b/src/modeling/modeling.pro @@ -23,6 +23,7 @@ PRIVATE_HEADERS += \ SOURCES += \ qtmodelingnamespace.cpp \ + qmodelingelement.cpp \ qmodelingobject.cpp \ qmetamodelplugin.cpp \ qxmiwriter.cpp \ diff --git a/src/modeling/qmetamodelplugin.cpp b/src/modeling/qmetamodelplugin.cpp index 69677943..5c513bce 100644 --- a/src/modeling/qmetamodelplugin.cpp +++ b/src/modeling/qmetamodelplugin.cpp @@ -42,11 +42,28 @@ QT_BEGIN_NAMESPACE +/*! + \class QMetaModelPlugin + + \inmodule QtModeling + + \brief The QMetaModelPlugin class acts as base-class for all QtModeling plugins. +*/ + +/*! + Creates a QMetaModelPlugin with the given \a parent. +*/ QMetaModelPlugin::QMetaModelPlugin(QObject *parent) : QObject(parent) { } +/*! + \fn QModelingElement *QMetaModelPlugin::createModelingElement(QString type) + + Returns a new instance of plugin's metamodel element with type \a type. +*/ + #include "moc_qmetamodelplugin.cpp" QT_END_NAMESPACE diff --git a/src/modeling/qmetamodelplugin.h b/src/modeling/qmetamodelplugin.h index f67a62bb..0afe5c0a 100644 --- a/src/modeling/qmetamodelplugin.h +++ b/src/modeling/qmetamodelplugin.h @@ -45,8 +45,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -66,7 +64,5 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QMETAMODELPLUGIN_H diff --git a/src/modeling/qmodelingelement.cpp b/src/modeling/qmodelingelement.cpp new file mode 100644 index 00000000..31133a9a --- /dev/null +++ b/src/modeling/qmodelingelement.cpp @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Sandro S. Andrade <sandroandrade@kde.org> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtModeling 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 "qmodelingelement.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QModelingElement + + \inmodule QtModeling + + \brief The QModelingElement class acts as base class for all modeling elements. +*/ + +/*! + Destroys the QModelingElement. +*/ +QModelingElement::~QModelingElement() +{ + if (!deletingFromQModelingObject) { + if (_qModelingObject) + _qModelingObject->setProperty("deletingFromModelingObject", true); + delete _qModelingObject; + } +} + +/*! + \fn QModelingObject *QModelingElement::asQModelingObject() const + + Return the QObject-based counterpart class for this QModelingElement. +*/ + +/*! + \fn QModelingElement *QModelingElement::clone() const + + Returns a deep-copied clone of this QModelingElement. +*/ + +/*! + Creates a new QModelingElement. +*/ +QModelingElement::QModelingElement() + : deletingFromQModelingObject(false), _qModelingObject(0) +{ +} + +QT_END_NAMESPACE + diff --git a/src/modeling/qmodelingelement.h b/src/modeling/qmodelingelement.h index 139822df..77bdc6ec 100644 --- a/src/modeling/qmodelingelement.h +++ b/src/modeling/qmodelingelement.h @@ -48,8 +48,6 @@ #include <QtCore/QPointer> #include <QtCore/QStringList> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -57,23 +55,16 @@ QT_MODULE(QtModeling) class Q_MODELING_EXPORT QModelingElement { public: - virtual ~QModelingElement() - { - if (!deletingFromQModelingObject) { - if (_qModelingObject) - _qModelingObject->setProperty("deletingFromModelingObject", true); - delete _qModelingObject; - } - } + virtual ~QModelingElement(); - inline QModelingObject *asQModelingObject() { return _qModelingObject; } + inline QModelingObject *asQModelingObject() const { return _qModelingObject; } bool deletingFromQModelingObject; virtual QModelingElement *clone() const = 0; protected: - QModelingElement() : deletingFromQModelingObject(false), _qModelingObject(0) {} + QModelingElement(); QPointer<QModelingObject> _qModelingObject; }; @@ -92,6 +83,5 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QModelingElement) *) -QT_END_HEADER - #endif // QTMODELING_QMODELINGELEMENT_H + diff --git a/src/modeling/qmodelingobject.cpp b/src/modeling/qmodelingobject.cpp index 9e7ba5c3..bb9b274c 100644 --- a/src/modeling/qmodelingobject.cpp +++ b/src/modeling/qmodelingobject.cpp @@ -45,6 +45,16 @@ QT_BEGIN_NAMESPACE +/*! + \class QModelingObject + + \inmodule QtModeling + + \brief The QModelingObject class acts as base class for all QObject-based representation of modeling elements. + + \sa QModelingElement +*/ + QHash< QString, QHash< QString, QHash<QtModeling::MetaPropertyDataRole, QVariant> > > QModelingObject::propertyDataHash; QModelingObjectPrivate::QModelingObjectPrivate() @@ -56,6 +66,9 @@ QModelingObjectPrivate::~QModelingObjectPrivate() qDeleteAll(groupProperties); } +/*! + Destroys the QModelingObject. +*/ QModelingObject::~QModelingObject() { if (!property("deletingFromModelingObject").isValid()) { @@ -64,17 +77,34 @@ QModelingObject::~QModelingObject() } } +/*! + Returs true if \a metaProperty has been modified (dirty property) since object creation. This + function returns false if property has not been modified or its RESET function has been called. +*/ bool QModelingObject::isPropertyModified(QMetaProperty metaProperty) const { Q_D(const QModelingObject); return d->modifiedResettableProperties.contains(QString::fromLatin1(metaProperty.name())); } +/*! + Returns \a metaProperty's metadata identified by \a role and associated with \a className in the + pseudo inheritance tree. +*/ QVariant QModelingObject::propertyData(QString className, QMetaProperty metaProperty, QtModeling::MetaPropertyDataRole role) { return QModelingObject::propertyDataHash[className][QString::fromLatin1(metaProperty.name())][role]; } +/*! + \fn void QModelingObject::setPropertyData() + + This virtual pure function allows for subclasses to define metaproperty metadata. +*/ + +/*! + Returns the index of the \a metaProperty's group in the QStringList returned by propertyGroups(). +*/ int QModelingObject::propertyGroupIndex(QMetaProperty metaProperty) const { Q_D(const QModelingObject); @@ -88,32 +118,54 @@ int QModelingObject::propertyGroupIndex(QMetaProperty metaProperty) const return -1; } +/*! + Returns the property groups (classes in the pseudo inheritance tree) for this QModelingObject. +*/ const QStringList &QModelingObject::propertyGroups() const { Q_D(const QModelingObject); return d->propertyGroups; } +/*! + Returns a QMultiHash containing all property groups and their corresponding properties. +*/ const QMultiHash<QString, QMetaProperty *> &QModelingObject::groupProperties() const { Q_D(const QModelingObject); return d->groupProperties; } +/*! + \fn void QModelingObject::setGroupProperties() + + This virtual pure function allows for subclasses to define new metaproperty groups. +*/ + +/*! + Returns all QModelingObject's properties that have been modified since object creation. +*/ QStringList &QModelingObject::modifiedResettableProperties() { Q_D(QModelingObject); return d->modifiedResettableProperties; } +/*! + Returns true if the QModelingObject is a kind of \a type in the pseudo inheritance tree, otherwise returns false. +*/ bool QModelingObject::isKindOf(QString type) const { Q_D(const QModelingObject); return d->propertyGroups.contains(type); } -QModelingObject::QModelingObject() - : QObject(*new QModelingObjectPrivate) +/*! + Creates a new QModelingObject with the given \a parent. This is a protected constructor + since this class is not intended to be directly instantiated. +*/ +QModelingObject::QModelingObject(QObject *parent) + : QObject(*new QModelingObjectPrivate, parent) { } diff --git a/src/modeling/qmodelingobject.h b/src/modeling/qmodelingobject.h index ba8f6aa7..01244ece 100644 --- a/src/modeling/qmodelingobject.h +++ b/src/modeling/qmodelingobject.h @@ -47,8 +47,6 @@ #include <QtCore/QMetaProperty> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -75,7 +73,7 @@ public: static QHash< QString, QHash< QString, QHash<QtModeling::MetaPropertyDataRole, QVariant> > > propertyDataHash; protected: - QModelingObject(); + QModelingObject(QObject *parent = 0); virtual void setGroupProperties() = 0; virtual void setPropertyData() = 0; @@ -85,7 +83,5 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QMetaProperty) *) -QT_END_HEADER - #endif // QTMODELING_QMODELINGOBJECT_H diff --git a/src/modeling/qmodelingobject_p.h b/src/modeling/qmodelingobject_p.h index 400109f3..a11f3ee2 100644 --- a/src/modeling/qmodelingobject_p.h +++ b/src/modeling/qmodelingobject_p.h @@ -48,8 +48,6 @@ #define Q_DECLARE_METAPROPERTY_INFO(clazz, property, role, value) QModelingObject::propertyDataHash[QStringLiteral(#clazz)][QStringLiteral(#property)][QtModeling::role] = value; -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -71,7 +69,5 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QMODELINGOBJECT_P_H diff --git a/src/modeling/qtmodelingnamespace.cpp b/src/modeling/qtmodelingnamespace.cpp index 10e0ed28..43eb8d80 100644 --- a/src/modeling/qtmodelingnamespace.cpp +++ b/src/modeling/qtmodelingnamespace.cpp @@ -42,9 +42,63 @@ QT_BEGIN_NAMESPACE +/*! + \class QtModeling + + \inmodule QtModeling + + \brief The QtModeling namespace contains miscellanious + identifiers used throughout the QtModeling library. +*/ + +/*! + Teste +*/ QtModeling::QtModeling() { } +/*! + \enum QtModeling::MetaPropertyDataRole + + This enum type specifies the roles metadata plays in metaproperty extensions. + + \value AggregationRole + Indicates the metaproperty aggregation type (None, Shared, Composite). + \value OppositeEndRole + Contains the properties that are opposite to the metaproperty. + \value DocumentationRole + Provides metaproperty documentation. + \value RedefinedPropertiesRole + Contains the properties that are redefined by the metaproperty. + \value SubsettedPropertiesRole + Contains the properties that are subsetted by the metaproperty; + \value IsDerivedUnionRole + Indicates if the metaproperty is a derived union. + \value IsDerivedRole + Indicates if the metaproperty is derived. + \value PropertyClassRole + Indicates the class in the pseudo hierarchy where the metaproperty has been defined. + \value PropertyTypeRole + Indicates if the property is a model element, imported element, imported package, or applied profile. + \value UserRole + First role for user-defined metadata. +*/ + +/*! + \enum QtModeling::ModelingObjectRole + + This enum type specifies the roles an element can play in a model. + + \value ModelElementRole + Indicates the element has been originally defined in the model. + \value ImportedElementRole + Indicates the element has been imported from other model. + \value ImportedPackageRole + Indicates the element is a package (group of elements) imported from other model. + \value AppliedProfileRole + Indicates the element is a profile applied to the original model. +*/ + QT_END_NAMESPACE diff --git a/src/modeling/qtmodelingnamespace.h b/src/modeling/qtmodelingnamespace.h index 0f1f51a7..a6871ff3 100644 --- a/src/modeling/qtmodelingnamespace.h +++ b/src/modeling/qtmodelingnamespace.h @@ -45,8 +45,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -90,7 +88,5 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE (QtModeling::MetaPropertyDataRole) Q_DECLARE_METATYPE (QtModeling::ModelingObjectRole) -QT_END_HEADER - #endif // QTMODELING_QTMODELINGNAMESPACE_H diff --git a/src/modeling/qxmireader.cpp b/src/modeling/qxmireader.cpp index bfe7ec63..3100fc68 100644 --- a/src/modeling/qxmireader.cpp +++ b/src/modeling/qxmireader.cpp @@ -52,6 +52,16 @@ QT_BEGIN_NAMESPACE +/*! + \class QXmiReader + + \inmodule QtModeling + + \brief The QXmiReader class provides funcionalities for importing models as XMI (XML) files. + + \sa QXmiWriter + */ + QXmiReaderPrivate::QXmiReaderPrivate() { } @@ -60,16 +70,25 @@ QXmiReaderPrivate::~QXmiReaderPrivate() { } +/*! + Creates a new QXmiReader with the given \a parent. +*/ QXmiReader::QXmiReader(QObject *parent) : QObject(*new QXmiReaderPrivate, parent) { loadPlugins(); } +/*! + Destroys the QXmiReader. +*/ QXmiReader::~QXmiReader() { } +/*! + Loads all installed Qt metamodel plugins. +*/ void QXmiReader::loadPlugins() { Q_D(QXmiReader); @@ -88,6 +107,9 @@ void QXmiReader::loadPlugins() } } +/*! + Reads the model from \a device and returns it as a QList<QModelingElement *>. If specified, \a importedId limits the import to only the element with matching ID. +*/ QList<QModelingElement *> QXmiReader::readFile(QIODevice *device, QString importedId) { Q_D(QXmiReader); @@ -318,6 +340,9 @@ QList<QModelingElement *> QXmiReader::readFile(QIODevice *device, QString import return modelingObjectList; } +/*! + Use the factory facilities of metamodel plugin identified by \a namespaceUri to create \a instanceName as an object with type is \a instanceClass. +*/ QModelingElement *QXmiReader::createInstance(QString namespaceUri, QString instanceClass, QString instanceName) { Q_D(QXmiReader); @@ -330,6 +355,9 @@ QModelingElement *QXmiReader::createInstance(QString namespaceUri, QString insta return 0; } +/*! + Returns the errors found during model import. +*/ QStringList QXmiReader::errorStrings() const { Q_D(const QXmiReader); diff --git a/src/modeling/qxmireader.h b/src/modeling/qxmireader.h index 43811220..ce916ee8 100644 --- a/src/modeling/qxmireader.h +++ b/src/modeling/qxmireader.h @@ -45,8 +45,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -55,10 +53,10 @@ class QIODevice; class QObject; class QScriptEngine; -class QXmiReaderPrivate; class QModelingElement; +class QXmiReaderPrivate; class Q_MODELING_EXPORT QXmiReader : public QObject { Q_OBJECT @@ -80,7 +78,5 @@ protected: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QXMIREADER_H diff --git a/src/modeling/qxmireader_p.h b/src/modeling/qxmireader_p.h index 1ea41499..a5b9430e 100644 --- a/src/modeling/qxmireader_p.h +++ b/src/modeling/qxmireader_p.h @@ -47,8 +47,6 @@ #include <QtCore/QStringList> #include <QtCore/QXmlStreamReader> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -73,7 +71,5 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QXMIREADER_P_H diff --git a/src/modeling/qxmiwriter.cpp b/src/modeling/qxmiwriter.cpp index 16a17276..355025a4 100644 --- a/src/modeling/qxmiwriter.cpp +++ b/src/modeling/qxmiwriter.cpp @@ -53,6 +53,16 @@ QT_BEGIN_NAMESPACE +/*! + \class QXmiWriter + + \inmodule QtModeling + + \brief The QXmiWriter class provides funcionalities for exporting models as XMI (XML) files. + + \sa QXmiReader + */ + QXmiWriterPrivate::QXmiWriterPrivate() { writer.setAutoFormatting(true); @@ -63,16 +73,25 @@ QXmiWriterPrivate::~QXmiWriterPrivate() { } +/*! + Creates a QXmiWrite with the given \a parent. +*/ QXmiWriter::QXmiWriter(QObject *parent) : QObject(*new QXmiWriterPrivate, parent) { loadPlugins(); } +/*! + Destroys the QXmiWriter. +*/ QXmiWriter::~QXmiWriter() { } +/*! + Loads all installed Qt metamodel plugins. +*/ void QXmiWriter::loadPlugins() { Q_D(QXmiWriter); @@ -91,6 +110,9 @@ void QXmiWriter::loadPlugins() } } +/*! + Writes the model stored in \a modelingObjects to \a device. Returns true if writing succeeds, otherwise returns false. +*/ bool QXmiWriter::writeFile(QList<QModelingObject *> modelingObjects, QIODevice *device) { Q_D(QXmiWriter); @@ -133,6 +155,9 @@ bool QXmiWriter::writeFile(QList<QModelingObject *> modelingObjects, QIODevice * return true; } +/*! + Inserts \a modelingObject at the \a index position of elements ID map. +*/ void QXmiWriter::populateIdMap(QModelingObject *modelingObject, int index) { Q_D(QXmiWriter); @@ -193,6 +218,9 @@ void QXmiWriter::populateIdMap(QModelingObject *modelingObject, int index) d->idStack.removeLast(); } +/*! + Writes a specific \a modelingObject identified by \a elementName. +*/ void QXmiWriter::writeObject(QModelingObject *modelingObject, QString elementName) { Q_D(QXmiWriter); diff --git a/src/modeling/qxmiwriter.h b/src/modeling/qxmiwriter.h index 3c60ae4b..5918d8b5 100644 --- a/src/modeling/qxmiwriter.h +++ b/src/modeling/qxmiwriter.h @@ -45,8 +45,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -55,7 +53,6 @@ class QIODevice; class QModelingObject; class QXmiWriterPrivate; - class Q_MODELING_EXPORT QXmiWriter : public QObject { Q_OBJECT @@ -77,7 +74,5 @@ protected: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QXMIWRITER_H diff --git a/src/modeling/qxmiwriter_p.h b/src/modeling/qxmiwriter_p.h index 41efdc9c..ba522ecf 100644 --- a/src/modeling/qxmiwriter_p.h +++ b/src/modeling/qxmiwriter_p.h @@ -47,8 +47,6 @@ #include <QtCore/QStringList> #include <QtCore/QXmlStreamWriter> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE QT_MODULE(QtModeling) @@ -76,7 +74,5 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QTMODELING_QXMIWRITER_P_H diff --git a/src/modelingwidgets/doc/qtmodelingwidgets.qdocconf b/src/modelingwidgets/doc/qtmodelingwidgets.qdocconf index fd4cc041..0ecbda4b 100644 --- a/src/modelingwidgets/doc/qtmodelingwidgets.qdocconf +++ b/src/modelingwidgets/doc/qtmodelingwidgets.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtModelingWidgets description = Qt ModelingWidgets Reference Documentation -url = http://qt-project.org/doc/qtmodelingwidgets -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = modelingwidgets qhp.projects = QtModelingWidgets qhp.QtModelingWidgets.file = qtmodelingwidgets.qhp -qhp.QtModelingWidgets.namespace = org.qt-project.qtmodelingwidgets.500 +qhp.QtModelingWidgets.namespace = org.qt-project.qtmodelingwidgets.$QT_VERSION_TAG qhp.QtModelingWidgets.virtualFolder = qtmodelingwidgets qhp.QtModelingWidgets.indexTitle = Qt ModelingWidgets qhp.QtModelingWidgets.indexRoot = -qhp.QtModelingWidgets.filterAttributes = qtmodelingwidgets 5.0.0 qtrefdoc -qhp.QtModelingWidgets.customFilters.Qt.name = QtModelingWidgets 5.0.0 -qhp.QtModelingWidgets.customFilters.Qt.filterAttributes = qtmodelingwidgets 5.0.0 +qhp.QtModelingWidgets.filterAttributes = qtmodelingwidgets $QT_VERSION qtrefdoc +qhp.QtModelingWidgets.customFilters.Qt.name = QtModelingWidgets $QT_VERSION +qhp.QtModelingWidgets.customFilters.Qt.filterAttributes = qtmodelingwidgets $QT_VERSION qhp.QtModelingWidgets.subprojects = classes qhp.QtModelingWidgets.subprojects.classes.title = C++ Classes diff --git a/src/mof/doc/qtmof.qdocconf b/src/mof/doc/qtmof.qdocconf index 4093b220..3dc90c49 100644 --- a/src/mof/doc/qtmof.qdocconf +++ b/src/mof/doc/qtmof.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtMof description = Qt MOF Reference Documentation -url = http://qt-project.org/doc/qtmof -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = mof qhp.projects = QtMof qhp.QtMof.file = qtmof.qhp -qhp.QtMof.namespace = org.qt-project.qtmof.500 +qhp.QtMof.namespace = org.qt-project.qtmof.$QT_VERSION_TAG qhp.QtMof.virtualFolder = qtmof qhp.QtMof.indexTitle = Qt MOF qhp.QtMof.indexRoot = -qhp.QtMof.filterAttributes = qtmof 5.0.0 qtrefdoc -qhp.QtMof.customFilters.Qt.name = QtMof 5.0.0 -qhp.QtMof.customFilters.Qt.filterAttributes = qtmof 5.0.0 +qhp.QtMof.filterAttributes = qtmof $QT_VERSION qtrefdoc +qhp.QtMof.customFilters.Qt.name = QtMof $QT_VERSION +qhp.QtMof.customFilters.Qt.filterAttributes = qtmof $QT_VERSION qhp.QtMof.subprojects = classes qhp.QtMof.subprojects.classes.title = C++ Classes diff --git a/src/saduseprofile/doc/qtsaduseprofile.qdocconf b/src/saduseprofile/doc/qtsaduseprofile.qdocconf index 2d904f9c..fdb4454c 100644 --- a/src/saduseprofile/doc/qtsaduseprofile.qdocconf +++ b/src/saduseprofile/doc/qtsaduseprofile.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtSADuseProfile description = Qt SADuseProfile Reference Documentation -url = http://qt-project.org/doc/qtsaduseprofile -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = saduseprofile qhp.projects = QtSADuseProfile qhp.QtSADuseProfile.file = qtsaduseprofile.qhp -qhp.QtSADuseProfile.namespace = org.qt-project.qtsaduseprofile.500 +qhp.QtSADuseProfile.namespace = org.qt-project.qtsaduseprofile.$QT_VERSION_TAG qhp.QtSADuseProfile.virtualFolder = qtsaduseprofile qhp.QtSADuseProfile.indexTitle = Qt SADuseProfile qhp.QtSADuseProfile.indexRoot = -qhp.QtSADuseProfile.filterAttributes = qtsaduseprofile 5.0.0 qtrefdoc -qhp.QtSADuseProfile.customFilters.Qt.name = QtSADuseProfile 5.0.0 -qhp.QtSADuseProfile.customFilters.Qt.filterAttributes = qtsaduseprofile 5.0.0 +qhp.QtSADuseProfile.filterAttributes = qtsaduseprofile $QT_VERSION qtrefdoc +qhp.QtSADuseProfile.customFilters.Qt.name = QtSADuseProfile $QT_VERSION +qhp.QtSADuseProfile.customFilters.Qt.filterAttributes = qtsaduseprofile $QT_VERSION qhp.QtSADuseProfile.subprojects = classes qhp.QtSADuseProfile.subprojects.classes.title = C++ Classes diff --git a/src/uml/doc/qtuml.qdocconf b/src/uml/doc/qtuml.qdocconf index d059933d..36e76686 100644 --- a/src/uml/doc/qtuml.qdocconf +++ b/src/uml/doc/qtuml.qdocconf @@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtUml description = Qt UML Reference Documentation -url = http://qt-project.org/doc/qtuml -version = 5.0.0 +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION examplesinstallpath = uml qhp.projects = QtUml qhp.QtUml.file = qtuml.qhp -qhp.QtUml.namespace = org.qt-project.qtuml.500 +qhp.QtUml.namespace = org.qt-project.qtuml.$QT_VERSION_TAG qhp.QtUml.virtualFolder = qtuml qhp.QtUml.indexTitle = Qt UML qhp.QtUml.indexRoot = -qhp.QtUml.filterAttributes = qtuml 5.0.0 qtrefdoc -qhp.QtUml.customFilters.Qt.name = QtUml 5.0.0 -qhp.QtUml.customFilters.Qt.filterAttributes = qtuml 5.0.0 +qhp.QtUml.filterAttributes = qtuml $QT_VERSION qtrefdoc +qhp.QtUml.customFilters.Qt.name = QtUml $QT_VERSION +qhp.QtUml.customFilters.Qt.filterAttributes = qtuml $QT_VERSION qhp.QtUml.subprojects = classes qhp.QtUml.subprojects.classes.title = C++ Classes |