summaryrefslogtreecommitdiffstats
path: root/examples/uml/nested-packages/main.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2012-12-10 13:38:24 +0000
committerSandro S. Andrade <sandroandrade@kde.org>2012-12-10 16:40:05 +0100
commitcd5a0d52808978dba9007fe1298de058a207312c (patch)
treea8dbc4acb99fc998b680a236e88fcb6d6aa5f8b7 /examples/uml/nested-packages/main.cpp
parent2296928a5108cbc8c4aa6038d5777972d86dd7b0 (diff)
Update QtUml and examples to use new version of QtMof
Change-Id: I60f7b08983168fb63c8bd37eb44929f88744a989 Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'examples/uml/nested-packages/main.cpp')
-rw-r--r--examples/uml/nested-packages/main.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/examples/uml/nested-packages/main.cpp b/examples/uml/nested-packages/main.cpp
index ef8dfac1..157306a1 100644
--- a/examples/uml/nested-packages/main.cpp
+++ b/examples/uml/nested-packages/main.cpp
@@ -1,3 +1,5 @@
+#include <QtMof/QMofPointer>
+
#include <QtUml/QModel>
#include <QtUml/QPackage>
#include <QtUml/QPrimitiveType>
@@ -12,6 +14,7 @@
#include <QtCore/QMetaProperty>
using namespace QtUml;
+using QtMof::QMofPointer;
typedef const QSet<QPackage *> QPackageList;
typedef const QSet<QStereotype *> QStereotypeList;
@@ -28,22 +31,22 @@ void checkProperties(QObject *object)
int main ()
{
- QUmlPointer<QModel> model = new QModel;
+ QMofPointer<QModel> model = new QModel;
model->setName("MyModel");
- QUmlPointer<QPackage> package = new QPackage;
+ QMofPointer<QPackage> package = new QPackage;
package->setName("Package1");
- QUmlPointer<QPrimitiveType> primitiveType = new QPrimitiveType;
+ QMofPointer<QPrimitiveType> primitiveType = new QPrimitiveType;
primitiveType->setName("String");
- QUmlPointer<QEnumeration> enumeration = new QEnumeration;
+ QMofPointer<QEnumeration> enumeration = new QEnumeration;
enumeration->setName("DirectionKind");
- QUmlPointer<QEnumerationLiteral> directionIn = new QEnumerationLiteral;
+ QMofPointer<QEnumerationLiteral> directionIn = new QEnumerationLiteral;
directionIn->setName("DirectionIn");
enumeration->addOwnedLiteral(directionIn);
- QUmlPointer<QClass> class_ = new QClass;
+ QMofPointer<QClass> class_ = new QClass;
class_->setName("Student");
class_->setAbstract(false);
@@ -97,9 +100,9 @@ int main ()
checkProperties(model);
- QUmlPointer<QComponent> c1 = new QComponent;
- QUmlPointer<QComponent> c2 = new QComponent;
- QUmlPointer<QComponentRealization> cr = new QComponentRealization;
+ QMofPointer<QComponent> c1 = new QComponent;
+ QMofPointer<QComponent> c2 = new QComponent;
+ QMofPointer<QComponentRealization> cr = new QComponentRealization;
cr->setAbstraction(c1);
qDebug();
qDebug() << "cr->suppliers()->size():" << cr->suppliers()->size();