summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlgeneralizationset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlgeneralizationset.h')
-rw-r--r--src/uml/qumlgeneralizationset.h125
1 files changed, 19 insertions, 106 deletions
diff --git a/src/uml/qumlgeneralizationset.h b/src/uml/qumlgeneralizationset.h
index dca6f934..efdf6a88 100644
--- a/src/uml/qumlgeneralizationset.h
+++ b/src/uml/qumlgeneralizationset.h
@@ -43,10 +43,8 @@
#include <QtUml/QtUmlGlobal>
-#include <QtCore/QObject>
-#include "private/umlgeneralizationset_p.h"
+#include <QtUml/QUmlPackageableElement>
-#include <QtUml/QtUmlNamespace>
QT_BEGIN_HEADER
@@ -55,120 +53,35 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtUml)
class QUmlClassifier;
-class QUmlComment;
-class QUmlDependency;
-class QUmlElement;
class QUmlGeneralization;
-class QUmlNamedElement;
-class QUmlNamespace;
-class QUmlPackage;
-class QUmlParameterableElement;
-class QUmlStringExpression;
-class QUmlTemplateParameter;
-class Q_UML_EXPORT QUmlGeneralizationSet : public QObject, public UmlGeneralizationSet
+class Q_UML_EXPORT QUmlGeneralizationSet : public QUmlPackageableElement
{
- 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 [GeneralizationSet]
- Q_PROPERTY(QSet<QUmlGeneralization *> generalization READ generalization)
- Q_PROPERTY(bool isCovering READ isCovering)
- Q_PROPERTY(bool isDisjoint READ isDisjoint)
- Q_PROPERTY(QUmlClassifier * powertype READ powertype)
-
public:
- Q_INVOKABLE explicit QUmlGeneralizationSet(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 [GeneralizationSet]
- Q_INVOKABLE const QSet<QUmlGeneralization *> generalization() const;
- Q_INVOKABLE bool isCovering() const;
- Q_INVOKABLE bool isDisjoint() const;
- Q_INVOKABLE QUmlClassifier *powertype() 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 [GeneralizationSet]
- void addGeneralization(UmlGeneralization *generalization);
- void removeGeneralization(UmlGeneralization *generalization);
+ explicit QUmlGeneralizationSet(bool createQObject = true);
+ virtual ~QUmlGeneralizationSet();
+
+ // Owned attributes
+ const QSet<QUmlGeneralization *> generalization() const;
+ void addGeneralization(QUmlGeneralization *generalization);
+ void removeGeneralization(QUmlGeneralization *generalization);
+ bool isCovering() const;
void setCovering(bool isCovering);
+ bool isDisjoint() const;
void setDisjoint(bool isDisjoint);
+ QUmlClassifier *powertype() const;
void setPowertype(QUmlClassifier *powertype);
+
+protected:
+ QSet<QUmlGeneralization *> _generalization;
+ bool _isCovering;
+ bool _isDisjoint;
+ QUmlClassifier *_powertype;
};
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QUmlGeneralizationSet *)
-Q_DECLARE_METATYPE(QList<QUmlGeneralizationSet *> *)
-Q_DECLARE_METATYPE(QSet<QUmlGeneralizationSet *> *)
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlGeneralizationSet) *)
QT_END_HEADER