diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-07-08 06:38:29 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-07-08 06:38:29 (GMT) |
commit | 4c916bd688bc9e20d75359f12208eb8a33dc6670 (patch) | |
tree | 190fb084f69128f6a1a788524cda21079f29cc6a /examples/declarative/extending/default/person.cpp | |
parent | 239c3581bb84b6484547918fbb1672fed08970dd (diff) | |
parent | 46688b1e8b953f9e3a12d42b9aa73a8eba904f5b (diff) | |
download | Qt-4c916bd688bc9e20d75359f12208eb8a33dc6670.zip Qt-4c916bd688bc9e20d75359f12208eb8a33dc6670.tar.gz Qt-4c916bd688bc9e20d75359f12208eb8a33dc6670.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative/extending/default/person.cpp')
-rw-r--r-- | examples/declarative/extending/default/person.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/declarative/extending/default/person.cpp b/examples/declarative/extending/default/person.cpp new file mode 100644 index 0000000..c47bfb7 --- /dev/null +++ b/examples/declarative/extending/default/person.cpp @@ -0,0 +1,42 @@ +#include "person.h" + +Person::Person(QObject *parent) +: QObject(parent), m_shoeSize(0) +{ +} + +QString Person::name() const +{ + return m_name; +} + +void Person::setName(const QString &n) +{ + m_name = n; +} + +int Person::shoeSize() const +{ + return m_shoeSize; +} + +void Person::setShoeSize(int s) +{ + m_shoeSize = s; +} + +QML_DEFINE_NOCREATE_TYPE(Person); + +Boy::Boy(QObject * parent) +: Person(parent) +{ +} + +QML_DEFINE_TYPE(Boy, Boy); + +Girl::Girl(QObject * parent) +: Person(parent) +{ +} + +QML_DEFINE_TYPE(Girl, Girl); |