diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 00:21:34 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 15:36:14 +0200 |
commit | 15f1561dff2533d45f513ae885b4ffe748af5e54 (patch) | |
tree | 25ce0de84e2641c427ef27119e4b3a1b2b9163b5 /src/uml/qumlwritevariableaction.cpp | |
parent | f3f02b513ecc79d1ce7a108664ed772cacc60766 (diff) |
New UML metamodel implementation almost done
Still missing:
- Forward methods for inherited properties and operations
- Auto-removal of deleted composite properties
- Moving documentation from internal do QObject-based classes
Change-Id: I2676e48c53d9ad4cdc6333c28e1a912d4e72cdd0
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumlwritevariableaction.cpp')
-rw-r--r-- | src/uml/qumlwritevariableaction.cpp | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/src/uml/qumlwritevariableaction.cpp b/src/uml/qumlwritevariableaction.cpp index 2018f1c1..090fd78f 100644 --- a/src/uml/qumlwritevariableaction.cpp +++ b/src/uml/qumlwritevariableaction.cpp @@ -39,53 +39,26 @@ ** ****************************************************************************/ #include "qumlwritevariableaction.h" -#include "private/qmodelingobject_p.h" #include <QtUml/QUmlInputPin> QT_BEGIN_NAMESPACE -/*! - \class QUmlWriteVariableAction - - \inmodule QtUml - - \brief WriteVariableAction is an abstract class for variable actions that change variable values. - */ - -QUmlWriteVariableAction::QUmlWriteVariableAction() : - _value(0) +QUmlWriteVariableAction::QUmlWriteVariableAction(QObject *parent) : + QObject(parent) { - d_ptr->object.setProperty("value", QVariant::fromValue((QUmlInputPin *)(0))); } -// OWNED ATTRIBUTES +// Owned attributes -/*! - Value to be added or removed from the variable. - */ QUmlInputPin *QUmlWriteVariableAction::value() const { - // This is a read-write association end - - return _value; + return reinterpret_cast<QUmlInputPin *>(_value); } void QUmlWriteVariableAction::setValue(QUmlInputPin *value) { - // This is a read-write association end - - if (_value != value) { - // Adjust subsetted properties - removeInput(_value); - - _value = value; - - // Adjust subsetted properties - if (value) { - addInput(value); - } - } + UmlWriteVariableAction::setValue(value); } QT_END_NAMESPACE |