diff options
Diffstat (limited to 'examples/declarative/extending')
4 files changed, 20 insertions, 12 deletions
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h index 8249af5..2ea065c 100644 --- a/examples/declarative/extending/attached/birthdayparty.h +++ b/examples/declarative/extending/attached/birthdayparty.h @@ -9,7 +9,7 @@ class BirthdayPartyAttached : public QObject { Q_OBJECT -Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp); +Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp) public: BirthdayPartyAttached(QObject *object); @@ -19,7 +19,7 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached); +QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -40,6 +40,8 @@ private: Person *m_celebrant; QmlConcreteList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); + +QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h index 6905746..2757561 100644 --- a/examples/declarative/extending/binding/birthdayparty.h +++ b/examples/declarative/extending/binding/birthdayparty.h @@ -10,7 +10,7 @@ class BirthdayPartyAttached : public QObject { Q_OBJECT -Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged); +Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged) public: BirthdayPartyAttached(QObject *object); @@ -23,7 +23,7 @@ signals: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached); +QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -56,6 +56,8 @@ private: Person *m_celebrant; QmlConcreteList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); + +QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/extending/signal/birthdayparty.h index 14d7c29..5dea2e8 100644 --- a/examples/declarative/extending/signal/birthdayparty.h +++ b/examples/declarative/extending/signal/birthdayparty.h @@ -9,7 +9,7 @@ class BirthdayPartyAttached : public QObject { Q_OBJECT -Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp); +Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp) public: BirthdayPartyAttached(QObject *object); @@ -19,7 +19,7 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached); +QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -47,6 +47,8 @@ private: Person *m_celebrant; QmlConcreteList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); + +QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/extending/valuesource/birthdayparty.h index fd25f28..75a2477 100644 --- a/examples/declarative/extending/valuesource/birthdayparty.h +++ b/examples/declarative/extending/valuesource/birthdayparty.h @@ -10,7 +10,7 @@ class BirthdayPartyAttached : public QObject { Q_OBJECT -Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp); +Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp) public: BirthdayPartyAttached(QObject *object); @@ -20,7 +20,7 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached); +QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -52,6 +52,8 @@ private: Person *m_celebrant; QmlConcreteList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); + +QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H |