summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/coercion/birthdayparty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/coercion/birthdayparty.cpp')
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/extending/coercion/birthdayparty.cpp
new file mode 100644
index 0000000..ea97f548
--- /dev/null
+++ b/examples/declarative/extending/coercion/birthdayparty.cpp
@@ -0,0 +1,23 @@
+#include "birthdayparty.h"
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QmlList<Person *> *BirthdayParty::guests()
+{
+ return &m_guests;
+}
+
+QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty);