diff options
Diffstat (limited to 'src/uml/qumlgeneralization.h')
-rw-r--r-- | src/uml/qumlgeneralization.h | 83 |
1 files changed, 19 insertions, 64 deletions
diff --git a/src/uml/qumlgeneralization.h b/src/uml/qumlgeneralization.h index 04463a52..1fe36aee 100644 --- a/src/uml/qumlgeneralization.h +++ b/src/uml/qumlgeneralization.h @@ -43,8 +43,8 @@ #include <QtUml/QtUmlGlobal> -#include <QtCore/QObject> -#include "private/umlgeneralization_p.h" +#include <QtUml/QUmlDirectedRelationship> + QT_BEGIN_HEADER @@ -53,80 +53,35 @@ QT_BEGIN_NAMESPACE QT_MODULE(QtUml) class QUmlClassifier; -class QUmlComment; -class QUmlElement; class QUmlGeneralizationSet; -class Q_UML_EXPORT QUmlGeneralization : public QObject, public UmlGeneralization +class Q_UML_EXPORT QUmlGeneralization : public QUmlDirectedRelationship { - 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 [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 [Generalization] - Q_PROPERTY(QUmlClassifier * general READ general) - Q_PROPERTY(QSet<QUmlGeneralizationSet *> generalizationSet READ generalizationSet) - Q_PROPERTY(bool isSubstitutable READ isSubstitutable) - Q_PROPERTY(QUmlClassifier * specific READ specific) - public: - Q_INVOKABLE explicit QUmlGeneralization(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 [Relationship] - Q_INVOKABLE const QSet<QUmlElement *> relatedElement() const; + explicit QUmlGeneralization(bool createQObject = true); + virtual ~QUmlGeneralization(); - // Owned attributes [DirectedRelationship] - Q_INVOKABLE const QSet<QUmlElement *> source() const; - Q_INVOKABLE const QSet<QUmlElement *> target() const; - - // Owned attributes [Generalization] - Q_INVOKABLE QUmlClassifier *general() const; - Q_INVOKABLE const QSet<QUmlGeneralizationSet *> generalizationSet() const; - Q_INVOKABLE bool isSubstitutable() const; - Q_INVOKABLE QUmlClassifier *specific() const; - - // Operations [Element] - Q_INVOKABLE QSet<QUmlElement *> allOwnedElements() const; - Q_INVOKABLE bool mustBeOwned() const; - -public Q_SLOTS: - - // Slots for owned attributes [Element] - void addOwnedComment(UmlComment *ownedComment); - void removeOwnedComment(UmlComment *ownedComment); - - // Slots for owned attributes [Relationship] - - // Slots for owned attributes [DirectedRelationship] - - // Slots for owned attributes [Generalization] + // Owned attributes + QUmlClassifier *general() const; void setGeneral(QUmlClassifier *general); - void addGeneralizationSet(UmlGeneralizationSet *generalizationSet); - void removeGeneralizationSet(UmlGeneralizationSet *generalizationSet); + const QSet<QUmlGeneralizationSet *> generalizationSet() const; + void addGeneralizationSet(QUmlGeneralizationSet *generalizationSet); + void removeGeneralizationSet(QUmlGeneralizationSet *generalizationSet); + bool isSubstitutable() const; void setSubstitutable(bool isSubstitutable); + QUmlClassifier *specific() const; void setSpecific(QUmlClassifier *specific); + +protected: + QUmlClassifier *_general; + QSet<QUmlGeneralizationSet *> _generalizationSet; + bool _isSubstitutable; + QUmlClassifier *_specific; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QUmlGeneralization *) -Q_DECLARE_METATYPE(QList<QUmlGeneralization *> *) -Q_DECLARE_METATYPE(QSet<QUmlGeneralization *> *) +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlGeneralization) *) QT_END_HEADER |