summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/coercion/birthdayparty.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/coercion/birthdayparty.h')
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h
index fffd407..ee77e9a 100644
--- a/examples/declarative/extending/coercion/birthdayparty.h
+++ b/examples/declarative/extending/coercion/birthdayparty.h
@@ -42,30 +42,29 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![0]
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);
#endif // BIRTHDAYPARTY_H