summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/coercion/birthdayparty.h
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-21 00:58:02 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-21 00:59:45 (GMT)
commit61f3cb6e79fea0aed80df091013c2228f64955ec (patch)
tree916d4879a326739673f918fc340bc5a4c356bcb9 /examples/declarative/extending/coercion/birthdayparty.h
parente11a5c4d1a1bb80ac03655227c833b560c7cad3c (diff)
downloadQt-61f3cb6e79fea0aed80df091013c2228f64955ec.zip
Qt-61f3cb6e79fea0aed80df091013c2228f64955ec.tar.gz
Qt-61f3cb6e79fea0aed80df091013c2228f64955ec.tar.bz2
Improve docs and examples for Extending QML in C++
Diffstat (limited to 'examples/declarative/extending/coercion/birthdayparty.h')
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h
index a5d14f9..ee77e9a 100644
--- a/examples/declarative/extending/coercion/birthdayparty.h
+++ b/examples/declarative/extending/coercion/birthdayparty.h
@@ -42,28 +42,28 @@
#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;
};