diff options
Diffstat (limited to 'examples/declarative/extending/properties/birthdayparty.h')
-rw-r--r-- | examples/declarative/extending/properties/birthdayparty.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/extending/properties/birthdayparty.h index c4cb536..39ce9ba 100644 --- a/examples/declarative/extending/properties/birthdayparty.h +++ b/examples/declarative/extending/properties/birthdayparty.h @@ -42,36 +42,35 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <qdeclarative.h> +#include <QDeclarativeListProperty> #include "person.h" // ![0] class BirthdayParty : public QObject { -Q_OBJECT + Q_OBJECT // ![0] // ![1] -Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant) + Q_PROPERTY(Person *host READ host WRITE setHost) // ![1] // ![2] -Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) // ![2] // ![3] public: BirthdayParty(QObject *parent = 0); - Person *celebrant() const; - void setCelebrant(Person *); + Person *host() const; + void setHost(Person *); QDeclarativeListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; private: - Person *m_celebrant; + Person *m_host; QList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); // ![3] #endif // BIRTHDAYPARTY_H |