diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-04-19 06:30:56 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-04-19 06:50:52 (GMT) |
commit | 9943a3ef522f293c26af0c65b0bc0a1df02a417d (patch) | |
tree | 74611818369e69141e13cdf385d75ad7cc90d85e /examples | |
parent | 2a9a22c7464b706c1e1998e10910b8f99528c6c4 (diff) | |
download | Qt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.zip Qt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.tar.gz Qt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.tar.bz2 |
QML_DECLARE_TYPE is no longer necessary - fix docs and examples
Diffstat (limited to 'examples')
21 files changed, 6 insertions, 47 deletions
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/extending/adding/person.h index fbaf2df..7a9e0f0 100644 --- a/examples/declarative/extending/adding/person.h +++ b/examples/declarative/extending/adding/person.h @@ -61,7 +61,6 @@ private: QString m_name; int m_shoeSize; }; -QML_DECLARE_TYPE(Person); // ![0] #endif // PERSON_H diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h index d8ca2e1..7c45d21 100644 --- a/examples/declarative/extending/attached/birthdayparty.h +++ b/examples/declarative/extending/attached/birthdayparty.h @@ -59,7 +59,6 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -84,6 +83,5 @@ private: }; QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/extending/attached/person.h index 08caebf..7a4b9c3 100644 --- a/examples/declarative/extending/attached/person.h +++ b/examples/declarative/extending/attached/person.h @@ -71,7 +71,6 @@ private: QString m_brand; qreal m_price; }; -QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT @@ -88,20 +87,17 @@ private: QString m_name; ShoeDescription m_shoe; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h index 8486442..e2757bc 100644 --- a/examples/declarative/extending/binding/birthdayparty.h +++ b/examples/declarative/extending/binding/birthdayparty.h @@ -63,7 +63,6 @@ signals: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -100,6 +99,5 @@ private: }; QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/binding/happybirthday.h b/examples/declarative/extending/binding/happybirthday.h index eb2da5e..0e5a90a 100644 --- a/examples/declarative/extending/binding/happybirthday.h +++ b/examples/declarative/extending/binding/happybirthday.h @@ -51,6 +51,7 @@ class HappyBirthday : public QObject, public QDeclarativePropertyValueSource { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) +Q_INTERFACES(QDeclarativePropertyValueSource) public: HappyBirthday(QObject *parent = 0); @@ -70,7 +71,6 @@ private: QDeclarativeProperty m_target; QString m_name; }; -QML_DECLARE_TYPE(HappyBirthday); #endif // HAPPYBIRTHDAY_H diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/extending/binding/person.h index 2d4ec12..0edfcdd 100644 --- a/examples/declarative/extending/binding/person.h +++ b/examples/declarative/extending/binding/person.h @@ -74,7 +74,6 @@ private: QString m_brand; qreal m_price; }; -QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT @@ -96,20 +95,17 @@ private: QString m_name; ShoeDescription m_shoe; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h index fffd407..a5d14f9 100644 --- a/examples/declarative/extending/coercion/birthdayparty.h +++ b/examples/declarative/extending/coercion/birthdayparty.h @@ -66,6 +66,5 @@ private: Person *m_celebrant; QList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/extending/coercion/person.h index 298ffb1..861f135 100644 --- a/examples/declarative/extending/coercion/person.h +++ b/examples/declarative/extending/coercion/person.h @@ -60,7 +60,7 @@ private: QString m_name; int m_shoeSize; }; -QML_DECLARE_TYPE(Person); + // ![0] class Boy : public Person { @@ -68,14 +68,14 @@ Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); + class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); + // ![0] #endif // PERSON_H diff --git a/examples/declarative/extending/default/birthdayparty.h b/examples/declarative/extending/default/birthdayparty.h index 49c20bd..c0cb0a4 100644 --- a/examples/declarative/extending/default/birthdayparty.h +++ b/examples/declarative/extending/default/birthdayparty.h @@ -67,6 +67,5 @@ private: QList<Person *> m_guests; }; // ![0] -QML_DECLARE_TYPE(BirthdayParty); #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/default/person.h b/examples/declarative/extending/default/person.h index b3eceaa..832bf11 100644 --- a/examples/declarative/extending/default/person.h +++ b/examples/declarative/extending/default/person.h @@ -60,20 +60,17 @@ private: QString m_name; int m_shoeSize; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/extending/extended/lineedit.cpp index 417fbd9..0e521ec 100644 --- a/examples/declarative/extending/extended/lineedit.cpp +++ b/examples/declarative/extending/extended/lineedit.cpp @@ -102,4 +102,4 @@ void LineEditExtension::setBottomMargin(int m) m_lineedit->setTextMargins(l, t, r, m); } -QML_DECLARE_TYPE(QLineEdit); + diff --git a/examples/declarative/extending/grouped/birthdayparty.h b/examples/declarative/extending/grouped/birthdayparty.h index 42439c4..4ac5602 100644 --- a/examples/declarative/extending/grouped/birthdayparty.h +++ b/examples/declarative/extending/grouped/birthdayparty.h @@ -65,6 +65,6 @@ private: Person *m_celebrant; QList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); + #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/extending/grouped/person.h index 5ea2348..216c015 100644 --- a/examples/declarative/extending/grouped/person.h +++ b/examples/declarative/extending/grouped/person.h @@ -71,7 +71,6 @@ private: QString m_brand; qreal m_price; }; -QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT @@ -90,20 +89,17 @@ private: QString m_name; ShoeDescription m_shoe; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/extending/properties/birthdayparty.h index c4cb536..dd01562 100644 --- a/examples/declarative/extending/properties/birthdayparty.h +++ b/examples/declarative/extending/properties/birthdayparty.h @@ -71,7 +71,6 @@ private: Person *m_celebrant; QList<Person *> m_guests; }; -QML_DECLARE_TYPE(BirthdayParty); // ![3] #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/properties/person.h b/examples/declarative/extending/properties/person.h index 860a607..7504d18 100644 --- a/examples/declarative/extending/properties/person.h +++ b/examples/declarative/extending/properties/person.h @@ -60,6 +60,5 @@ private: QString m_name; int m_shoeSize; }; -QML_DECLARE_TYPE(Person); #endif // PERSON_H diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/extending/signal/birthdayparty.h index bcdc513..a2b35cd 100644 --- a/examples/declarative/extending/signal/birthdayparty.h +++ b/examples/declarative/extending/signal/birthdayparty.h @@ -59,7 +59,6 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -89,8 +88,6 @@ private: Person *m_celebrant; QList<Person *> m_guests; }; - QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/signal/person.h b/examples/declarative/extending/signal/person.h index 08caebf..7a4b9c3 100644 --- a/examples/declarative/extending/signal/person.h +++ b/examples/declarative/extending/signal/person.h @@ -71,7 +71,6 @@ private: QString m_brand; qreal m_price; }; -QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT @@ -88,20 +87,17 @@ private: QString m_name; ShoeDescription m_shoe; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/extending/valuesource/birthdayparty.h index 819a200..a9b3102 100644 --- a/examples/declarative/extending/valuesource/birthdayparty.h +++ b/examples/declarative/extending/valuesource/birthdayparty.h @@ -60,7 +60,6 @@ public: private: QDate m_rsvp; }; -QML_DECLARE_TYPE(BirthdayPartyAttached) class BirthdayParty : public QObject { @@ -95,8 +94,6 @@ private: Person *m_celebrant; QList<Person *> m_guests; }; - QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(BirthdayParty) #endif // BIRTHDAYPARTY_H diff --git a/examples/declarative/extending/valuesource/happybirthday.h b/examples/declarative/extending/valuesource/happybirthday.h index b48c012..8548eb8 100644 --- a/examples/declarative/extending/valuesource/happybirthday.h +++ b/examples/declarative/extending/valuesource/happybirthday.h @@ -74,7 +74,6 @@ private: // ![2] }; // ![2] -QML_DECLARE_TYPE(HappyBirthday); #endif // HAPPYBIRTHDAY_H diff --git a/examples/declarative/extending/valuesource/person.h b/examples/declarative/extending/valuesource/person.h index 08caebf..7a4b9c3 100644 --- a/examples/declarative/extending/valuesource/person.h +++ b/examples/declarative/extending/valuesource/person.h @@ -71,7 +71,6 @@ private: QString m_brand; qreal m_price; }; -QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT @@ -88,20 +87,17 @@ private: QString m_name; ShoeDescription m_shoe; }; -QML_DECLARE_TYPE(Person); class Boy : public Person { Q_OBJECT public: Boy(QObject * parent = 0); }; -QML_DECLARE_TYPE(Boy); class Girl : public Person { Q_OBJECT public: Girl(QObject * parent = 0); }; -QML_DECLARE_TYPE(Girl); #endif // PERSON_H diff --git a/examples/declarative/proxywidgets/proxywidgets.cpp b/examples/declarative/proxywidgets/proxywidgets.cpp index 47d0cb9..067eb2c 100644 --- a/examples/declarative/proxywidgets/proxywidgets.cpp +++ b/examples/declarative/proxywidgets/proxywidgets.cpp @@ -94,6 +94,4 @@ public: #include "proxywidgets.moc" -QML_DECLARE_TYPE(MyPushButton) - Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin); |