summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/properties/person.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-06 08:32:25 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-06 08:32:25 (GMT)
commitd641b621077d5cc81ce7b3de92af9a0f6d47f4d6 (patch)
treea6d367c55d3d2ec41cf8bf92a439c8cc14c717d8 /examples/declarative/extending/properties/person.cpp
parent6c7b88af807cbd2b4d824b8fca0f199ae1413432 (diff)
downloadQt-d641b621077d5cc81ce7b3de92af9a0f6d47f4d6.zip
Qt-d641b621077d5cc81ce7b3de92af9a0f6d47f4d6.tar.gz
Qt-d641b621077d5cc81ce7b3de92af9a0f6d47f4d6.tar.bz2
Doc
Diffstat (limited to 'examples/declarative/extending/properties/person.cpp')
-rw-r--r--examples/declarative/extending/properties/person.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/declarative/extending/properties/person.cpp b/examples/declarative/extending/properties/person.cpp
new file mode 100644
index 0000000..cf66a30
--- /dev/null
+++ b/examples/declarative/extending/properties/person.cpp
@@ -0,0 +1,28 @@
+#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_TYPE(Person, Person);