summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/coercion/person.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/coercion/person.h')
-rw-r--r--examples/declarative/extending/coercion/person.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/extending/coercion/person.h
index 298ffb1..1c95da7 100644
--- a/examples/declarative/extending/coercion/person.h
+++ b/examples/declarative/extending/coercion/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -60,22 +60,24 @@ private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
+
// ![0]
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
+
// ![0]
#endif // PERSON_H