diff options
Diffstat (limited to 'src/uml/qumlvariableaction.cpp')
-rw-r--r-- | src/uml/qumlvariableaction.cpp | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/src/uml/qumlvariableaction.cpp b/src/uml/qumlvariableaction.cpp index 5c6dc14a..6b60157a 100644 --- a/src/uml/qumlvariableaction.cpp +++ b/src/uml/qumlvariableaction.cpp @@ -72,15 +72,13 @@ QUmlVariableAction::QUmlVariableAction() : _variable(0) { - setGroupProperties(); - setPropertyData(); } QUmlVariableAction::~QUmlVariableAction() { } -QModelingObject *QUmlVariableAction::clone() const +QModelingElement *QUmlVariableAction::clone() const { QUmlVariableAction *c = new QUmlVariableAction; foreach (QUmlComment *element, ownedComments()) @@ -136,55 +134,8 @@ void QUmlVariableAction::setVariable(QUmlVariable *variable) if (_variable != variable) { _variable = variable; - if (variable && variable->asQObject() && this->asQObject()) - QObject::connect(variable->asQObject(), SIGNAL(destroyed()), this->asQObject(), SLOT(setVariable())); + if (variable && variable->asQModelingObject() && this->asQModelingObject()) + QObject::connect(variable->asQModelingObject(), SIGNAL(destroyed()), this->asQModelingObject(), SLOT(setVariable())); } } -void QUmlVariableAction::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("QUmlRedefinableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("isLeaf")))); - _groupProperties.insert(QStringLiteral("QUmlRedefinableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("redefinedElements")))); - _groupProperties.insert(QStringLiteral("QUmlRedefinableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("redefinitionContexts")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("activity")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inGroups")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inInterruptibleRegions")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inPartitions")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inStructuredNode")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("incomings")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("outgoings")))); - _groupProperties.insert(QStringLiteral("QUmlActivityNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("redefinedNodes")))); - _groupProperties.insert(QStringLiteral("QUmlExecutableNode"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("handlers")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("context")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("inputs")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("isLocallyReentrant")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("localPostconditions")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("localPreconditions")))); - _groupProperties.insert(QStringLiteral("QUmlAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("outputs")))); - _groupProperties.insert(QStringLiteral("QUmlVariableAction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("variable")))); -} - -void QUmlVariableAction::setPropertyData() -{ - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::AggregationRole] = QStringLiteral("none"); - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::PropertyClassRole] = QStringLiteral("QUmlVariableAction"); - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::IsDerivedRole] = false; - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::IsDerivedUnionRole] = false; - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::DocumentationRole] = QStringLiteral("Variable to be read."); - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::RedefinedPropertiesRole] = QStringLiteral(""); - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::SubsettedPropertiesRole] = QStringLiteral(""); - QModelingObject::propertyDataHash[QStringLiteral("QUmlVariableAction")][QStringLiteral("variable")][QtModeling::OppositeEndRole] = QStringLiteral(""); - -} - |