summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/binding/person.h
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-22 08:06:40 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-22 08:06:40 (GMT)
commit0b6fd8966972616232054c5194243c52ca360bf8 (patch)
tree06dc40958aefc6f5e118dccfa192ff77528a014d /examples/declarative/extending/binding/person.h
parent1c47be7174ca1e9ed393a12461742975079710d7 (diff)
parente9da512e321c6ea7795a4abc0b9d24bf4d3d2527 (diff)
downloadQt-0b6fd8966972616232054c5194243c52ca360bf8.zip
Qt-0b6fd8966972616232054c5194243c52ca360bf8.tar.gz
Qt-0b6fd8966972616232054c5194243c52ca360bf8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (135 commits) Do not treat images in qml examples differently. Replace Flickable overshoot property with boundsBehavior Autotests and doc Give error on attempt to import types from too-early version number. Remove (undocumented) QML bindings for effects. De-straighten them lines. Doc: fix QStringList model doc (really). Doc: fix QStringList model docs Change return type to match value(). Add duration and easing properties to AnchorAnimation. Autotest Remove dead code Compile on Windows (export decl fix). Fix versioning of Qt Declarative's in-built types Fixed declarative/parserstress autotest. Fix parsing of regular expression literals. Fill out QGraphicsLayout bindings Update test files to new syntax Compile without Qt3 support. Ensure workerscript.qml works (autotested). ...
Diffstat (limited to 'examples/declarative/extending/binding/person.h')
-rw-r--r--examples/declarative/extending/binding/person.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/extending/binding/person.h
index 2d4ec12..2a68da0 100644
--- a/examples/declarative/extending/binding/person.h
+++ b/examples/declarative/extending/binding/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
-Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
-Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
-Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
+ Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
public:
ShoeDescription(QObject *parent = 0);
@@ -74,13 +74,13 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
// ![0]
-Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
// ![0]
public:
Person(QObject *parent = 0);
@@ -96,20 +96,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H