summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlinterruptibleactivityregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlinterruptibleactivityregion.cpp')
-rw-r--r--src/uml/qumlinterruptibleactivityregion.cpp70
1 files changed, 12 insertions, 58 deletions
diff --git a/src/uml/qumlinterruptibleactivityregion.cpp b/src/uml/qumlinterruptibleactivityregion.cpp
index 7825ce4b..7ff34036 100644
--- a/src/uml/qumlinterruptibleactivityregion.cpp
+++ b/src/uml/qumlinterruptibleactivityregion.cpp
@@ -61,24 +61,22 @@
\brief An interruptible activity region is an activity group that supports termination of tokens flowing in the portions of an activity.
*/
-QUmlInterruptibleActivityRegion::QUmlInterruptibleActivityRegion(bool createQObject)
+QUmlInterruptibleActivityRegion::QUmlInterruptibleActivityRegion(bool createQModelingObject)
{
- if (createQObject)
- _qObject = new QUmlInterruptibleActivityRegionObject(this);
- setGroupProperties();
- setPropertyData();
+ if (createQModelingObject)
+ _qModelingObject = qobject_cast<QModelingObject *>(new QUmlInterruptibleActivityRegionObject(this));
}
QUmlInterruptibleActivityRegion::~QUmlInterruptibleActivityRegion()
{
- if (!deletingFromQObject) {
- if (_qObject)
- _qObject->setProperty("deletingFromModelingObject", true);
- delete _qObject;
+ if (!deletingFromQModelingObject) {
+ if (_qModelingObject)
+ _qModelingObject->setProperty("deletingFromModelingObject", true);
+ delete _qModelingObject;
}
}
-QModelingObject *QUmlInterruptibleActivityRegion::clone() const
+QModelingElement *QUmlInterruptibleActivityRegion::clone() const
{
QUmlInterruptibleActivityRegion *c = new QUmlInterruptibleActivityRegion;
foreach (QUmlComment *element, ownedComments())
@@ -116,8 +114,8 @@ void QUmlInterruptibleActivityRegion::addInterruptingEdge(QUmlActivityEdge *inte
if (!_interruptingEdges.contains(interruptingEdge)) {
_interruptingEdges.insert(interruptingEdge);
- if (interruptingEdge && interruptingEdge->asQObject() && this->asQObject())
- QObject::connect(interruptingEdge->asQObject(), SIGNAL(destroyed(QObject*)), this->asQObject(), SLOT(removeInterruptingEdge(QObject *)));
+ if (interruptingEdge && interruptingEdge->asQModelingObject() && this->asQModelingObject())
+ QObject::connect(interruptingEdge->asQModelingObject(), SIGNAL(destroyed(QObject*)), this->asQModelingObject(), SLOT(removeInterruptingEdge(QObject *)));
// Adjust opposite properties
if (interruptingEdge) {
@@ -156,8 +154,8 @@ void QUmlInterruptibleActivityRegion::addNode(QUmlActivityNode *node)
if (!_nodes.contains(node)) {
_nodes.insert(node);
- if (node && node->asQObject() && this->asQObject())
- QObject::connect(node->asQObject(), SIGNAL(destroyed(QObject*)), this->asQObject(), SLOT(removeNode(QObject *)));
+ if (node && node->asQModelingObject() && this->asQModelingObject())
+ QObject::connect(node->asQModelingObject(), SIGNAL(destroyed(QObject*)), this->asQModelingObject(), SLOT(removeNode(QObject *)));
// Adjust subsetted properties
addContainedNode(node);
@@ -186,47 +184,3 @@ void QUmlInterruptibleActivityRegion::removeNode(QUmlActivityNode *node)
}
}
-void QUmlInterruptibleActivityRegion::setGroupProperties()
-{
- const QMetaObject *metaObject = _qObject->metaObject();
-
- _groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedComments"))));
- _groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedElements"))));
- _groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owner"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clientDependencies"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("name"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("nameExpression"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("namespace_"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("qualifiedName"))));
- _groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("visibility"))));
- _groupProperties.insert(QStringLiteral("QUmlActivityGroup"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("containedEdges"))));
- _groupProperties.insert(QStringLiteral("QUmlActivityGroup"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("containedNodes"))));
- _groupProperties.insert(QStringLiteral("QUmlActivityGroup"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inActivity"))));
- _groupProperties.insert(QStringLiteral("QUmlActivityGroup"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("subgroups"))));
- _groupProperties.insert(QStringLiteral("QUmlActivityGroup"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("superGroup"))));
- _groupProperties.insert(QStringLiteral("QUmlInterruptibleActivityRegion"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("interruptingEdges"))));
- _groupProperties.insert(QStringLiteral("QUmlInterruptibleActivityRegion"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("nodes"))));
-}
-
-void QUmlInterruptibleActivityRegion::setPropertyData()
-{
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::AggregationRole] = QStringLiteral("none");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::PropertyClassRole] = QStringLiteral("QUmlInterruptibleActivityRegion");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::IsDerivedRole] = false;
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::IsDerivedUnionRole] = false;
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::DocumentationRole] = QStringLiteral("The edges leaving the region that will abort other tokens flowing in the region.");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::RedefinedPropertiesRole] = QStringLiteral("");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::SubsettedPropertiesRole] = QStringLiteral("");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("interruptingEdges")][QtModeling::OppositeEndRole] = QStringLiteral("ActivityEdge-interrupts");
-
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::AggregationRole] = QStringLiteral("none");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::PropertyClassRole] = QStringLiteral("QUmlInterruptibleActivityRegion");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::IsDerivedRole] = false;
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::IsDerivedUnionRole] = false;
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::DocumentationRole] = QStringLiteral("Nodes immediately contained in the group.");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::RedefinedPropertiesRole] = QStringLiteral("");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::SubsettedPropertiesRole] = QStringLiteral("ActivityGroup-containedNode");
- QModelingObject::propertyDataHash[QStringLiteral("QUmlInterruptibleActivityRegion")][QStringLiteral("nodes")][QtModeling::OppositeEndRole] = QStringLiteral("ActivityNode-inInterruptibleRegion");
-
-}
-