diff options
Diffstat (limited to 'src/uml/qumlcomponentrealization.h')
-rw-r--r-- | src/uml/qumlcomponentrealization.h | 157 |
1 files changed, 14 insertions, 143 deletions
diff --git a/src/uml/qumlcomponentrealization.h b/src/uml/qumlcomponentrealization.h index 0fd36a10..3bad4749 100644 --- a/src/uml/qumlcomponentrealization.h +++ b/src/uml/qumlcomponentrealization.h @@ -43,10 +43,8 @@ #include <QtUml/QtUmlGlobal> -#include <QtCore/QObject> -#include "private/umlcomponentrealization_p.h" +#include <QtUml/QUmlRealization> -#include <QtUml/QtUmlNamespace> QT_BEGIN_HEADER @@ -55,156 +53,29 @@ QT_BEGIN_NAMESPACE QT_MODULE(QtUml) class QUmlClassifier; -class QUmlComment; class QUmlComponent; -class QUmlDependency; -class QUmlElement; -class QUmlNamedElement; -class QUmlNamespace; -class QUmlOpaqueExpression; -class QUmlPackage; -class QUmlParameterableElement; -class QUmlStringExpression; -class QUmlTemplateParameter; -class Q_UML_EXPORT QUmlComponentRealization : public QObject, public UmlComponentRealization +class Q_UML_EXPORT QUmlComponentRealization : public QUmlRealization { - Q_OBJECT - - // Properties [Element] - Q_PROPERTY(QSet<QUmlComment *> ownedComment READ ownedComment) - Q_PROPERTY(QSet<QUmlElement *> ownedElement READ ownedElement) - Q_PROPERTY(QUmlElement * owner READ owner) - - // Properties [ParameterableElement] - Q_PROPERTY(QUmlTemplateParameter * owningTemplateParameter READ owningTemplateParameter) - Q_PROPERTY(QUmlTemplateParameter * templateParameter READ templateParameter) - - // Properties [NamedElement] - Q_PROPERTY(QSet<QUmlDependency *> clientDependency READ clientDependency) - Q_PROPERTY(QString name READ name) - Q_PROPERTY(QUmlStringExpression * nameExpression READ nameExpression) - Q_PROPERTY(QUmlNamespace * namespace_ READ namespace_) - Q_PROPERTY(QString qualifiedName READ qualifiedName) - - // Properties [PackageableElement] - Q_PROPERTY(QtUml::VisibilityKind visibility READ visibility) - - // Properties [Relationship] - Q_PROPERTY(QSet<QUmlElement *> relatedElement READ relatedElement) - - // Properties [DirectedRelationship] - Q_PROPERTY(QSet<QUmlElement *> source READ source) - Q_PROPERTY(QSet<QUmlElement *> target READ target) - - // Properties [Dependency] - Q_PROPERTY(QSet<QUmlNamedElement *> client READ client) - Q_PROPERTY(QSet<QUmlNamedElement *> supplier READ supplier) - - // Properties [Abstraction] - Q_PROPERTY(QUmlOpaqueExpression * mapping READ mapping) - - // Properties [ComponentRealization] - Q_PROPERTY(QUmlComponent * abstraction READ abstraction) - Q_PROPERTY(QSet<QUmlClassifier *> realizingClassifier READ realizingClassifier) - public: - Q_INVOKABLE explicit QUmlComponentRealization(QObject *parent = 0); - - // Owned attributes [Element] - Q_INVOKABLE const QSet<QUmlComment *> ownedComment() const; - Q_INVOKABLE const QSet<QUmlElement *> ownedElement() const; - Q_INVOKABLE QUmlElement *owner() const; - - // Owned attributes [ParameterableElement] - Q_INVOKABLE QUmlTemplateParameter *owningTemplateParameter() const; - Q_INVOKABLE QUmlTemplateParameter *templateParameter() const; - - // Owned attributes [NamedElement] - Q_INVOKABLE const QSet<QUmlDependency *> clientDependency() const; - Q_INVOKABLE QString name() const; - Q_INVOKABLE QUmlStringExpression *nameExpression() const; - Q_INVOKABLE QUmlNamespace *namespace_() const; - Q_INVOKABLE QString qualifiedName() const; - - // Owned attributes [PackageableElement] - Q_INVOKABLE QtUml::VisibilityKind visibility() const; - - // Owned attributes [Relationship] - Q_INVOKABLE const QSet<QUmlElement *> relatedElement() const; - - // Owned attributes [DirectedRelationship] - Q_INVOKABLE const QSet<QUmlElement *> source() const; - Q_INVOKABLE const QSet<QUmlElement *> target() const; + explicit QUmlComponentRealization(bool createQObject = true); + virtual ~QUmlComponentRealization(); - // Owned attributes [Dependency] - Q_INVOKABLE const QSet<QUmlNamedElement *> client() const; - Q_INVOKABLE const QSet<QUmlNamedElement *> supplier() const; - - // Owned attributes [Abstraction] - Q_INVOKABLE QUmlOpaqueExpression *mapping() const; - - // Owned attributes [ComponentRealization] - Q_INVOKABLE QUmlComponent *abstraction() const; - Q_INVOKABLE const QSet<QUmlClassifier *> realizingClassifier() const; - - // Operations [Element] - Q_INVOKABLE QSet<QUmlElement *> allOwnedElements() const; - Q_INVOKABLE bool mustBeOwned() const; - - // Operations [ParameterableElement] - Q_INVOKABLE bool isCompatibleWith(QUmlParameterableElement *p) const; - Q_INVOKABLE bool isTemplateParameter() const; - - // Operations [NamedElement] - Q_INVOKABLE QList<QUmlNamespace *> allNamespaces() const; - Q_INVOKABLE QSet<QUmlPackage *> allOwningPackages() const; - Q_INVOKABLE bool isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) const; - Q_INVOKABLE QString separator() const; - -public Q_SLOTS: - - // Slots for owned attributes [Element] - void addOwnedComment(UmlComment *ownedComment); - void removeOwnedComment(UmlComment *ownedComment); - - // Slots for owned attributes [ParameterableElement] - void setOwningTemplateParameter(QUmlTemplateParameter *owningTemplateParameter); - void setTemplateParameter(QUmlTemplateParameter *templateParameter); - - // Slots for owned attributes [NamedElement] - void addClientDependency(UmlDependency *clientDependency); - void removeClientDependency(UmlDependency *clientDependency); - void setName(QString name); - void setNameExpression(QUmlStringExpression *nameExpression); - - // Slots for owned attributes [PackageableElement] - void setVisibility(QtUml::VisibilityKind visibility); - - // Slots for owned attributes [Relationship] - - // Slots for owned attributes [DirectedRelationship] - - // Slots for owned attributes [Dependency] - void addClient(UmlNamedElement *client); - void removeClient(UmlNamedElement *client); - void addSupplier(UmlNamedElement *supplier); - void removeSupplier(UmlNamedElement *supplier); - - // Slots for owned attributes [Abstraction] - void setMapping(QUmlOpaqueExpression *mapping); - - // Slots for owned attributes [ComponentRealization] + // Owned attributes + QUmlComponent *abstraction() const; void setAbstraction(QUmlComponent *abstraction); - void addRealizingClassifier(UmlClassifier *realizingClassifier); - void removeRealizingClassifier(UmlClassifier *realizingClassifier); + const QSet<QUmlClassifier *> realizingClassifier() const; + void addRealizingClassifier(QUmlClassifier *realizingClassifier); + void removeRealizingClassifier(QUmlClassifier *realizingClassifier); + +protected: + QUmlComponent *_abstraction; + QSet<QUmlClassifier *> _realizingClassifier; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QUmlComponentRealization *) -Q_DECLARE_METATYPE(QList<QUmlComponentRealization *> *) -Q_DECLARE_METATYPE(QSet<QUmlComponentRealization *> *) +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlComponentRealization) *) QT_END_HEADER |