@@ -26,43 +26,43 @@ Usage
26
26
======
27
27
Classes that we'll use for the sample code following ---
28
28
29
- // All the classes that we need for our sample!
30
- class Address : public JObject {
31
- Q_OBJECT
32
- public:
33
- Q_INVOKABLE explicit Address(QObject* parent = 0) : JObject(parent){}
34
- MetaPropertyPublicSet(QString, country)
35
- MetaPropertyPublicSet(QString, city)
36
- MetaPropertyPublicSet(QString, zip)
37
- };
38
- class Person : public JObject {
39
- Q_OBJECT
40
- public:
41
- Q_INVOKABLE explicit Person(QObject* parent = 0) : JObject(parent){}
42
- MetaPropertyPublicSet(QString, name)
43
- MetaPropertyPublicSet_Ptr(Address, address)
44
- };
45
- class Student : public Person {
46
- Q_OBJECT
47
- public:
48
- Q_INVOKABLE explicit Student(QObject* parent = 0) : Person(parent){}
49
- MetaPropertyPublicSet(QStringList, courses)
50
- };
51
- class Teacher : public Person {
52
- Q_OBJECT
53
- public:
54
- Q_INVOKABLE explicit Teacher(QObject* parent = 0) : Person(parent){}
55
- MetaPropertyPublicSet(QStringList, speciality)
56
- };
57
- class School : public JObject {
58
- Q_OBJECT
59
- public:
60
- Q_INVOKABLE explicit School(QObject* parent = 0) : JObject(parent){}
61
- MetaPropertyPublicSet(QString, name)
62
- MetaPropertyPublicSet_Ptr(Address, address)
63
- MetaPropertyPublicSet_Ptr_List(Teacher, teachers)
64
- MetaPropertyPublicSet_Ptr_List(Student, students)
65
- };
29
+ // All the classes that we need for our sample!
30
+ class Address : public JObject {
31
+ Q_OBJECT
32
+ public:
33
+ Q_INVOKABLE explicit Address(QObject* parent = 0) : JObject(parent){}
34
+ MetaPropertyPublicSet(QString, country)
35
+ MetaPropertyPublicSet(QString, city)
36
+ MetaPropertyPublicSet(QString, zip)
37
+ };
38
+ class Person : public JObject {
39
+ Q_OBJECT
40
+ public:
41
+ Q_INVOKABLE explicit Person(QObject* parent = 0) : JObject(parent){}
42
+ MetaPropertyPublicSet(QString, name)
43
+ MetaPropertyPublicSet_Ptr(Address, address)
44
+ };
45
+ class Student : public Person {
46
+ Q_OBJECT
47
+ public:
48
+ Q_INVOKABLE explicit Student(QObject* parent = 0) : Person(parent){}
49
+ MetaPropertyPublicSet(QStringList, courses)
50
+ };
51
+ class Teacher : public Person {
52
+ Q_OBJECT
53
+ public:
54
+ Q_INVOKABLE explicit Teacher(QObject* parent = 0) : Person(parent){}
55
+ MetaPropertyPublicSet(QStringList, speciality)
56
+ };
57
+ class School : public JObject {
58
+ Q_OBJECT
59
+ public:
60
+ Q_INVOKABLE explicit School(QObject* parent = 0) : JObject(parent){}
61
+ MetaPropertyPublicSet(QString, name)
62
+ MetaPropertyPublicSet_Ptr(Address, address)
63
+ MetaPropertyPublicSet_Ptr_List(Teacher, teachers)
64
+ MetaPropertyPublicSet_Ptr_List(Student, students)
65
+ };
66
66
67
67
68
68
Improting JSON to your class's instance!
0 commit comments