diff options
Diffstat (limited to 'examples/qml/cppextensions/referenceexamples')
45 files changed, 138 insertions, 138 deletions
diff --git a/examples/qml/cppextensions/referenceexamples/adding/adding.pro b/examples/qml/cppextensions/referenceexamples/adding/adding.pro index 1a972926b7..706322e9ff 100644 --- a/examples/qml/cppextensions/referenceexamples/adding/adding.pro +++ b/examples/qml/cppextensions/referenceexamples/adding/adding.pro @@ -1,11 +1,11 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp HEADERS += person.h RESOURCES += adding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/adding/main.cpp b/examples/qml/cppextensions/referenceexamples/adding/main.cpp index 4c1918b6de..c3a0ab6812 100644 --- a/examples/qml/cppextensions/referenceexamples/adding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/adding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "person.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterType<Person>("People", 1,0, "Person"); //![0] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); Person *person = qobject_cast<Person *>(component.create()); if (person) { qWarning() << "The person's name is" << person->name(); diff --git a/examples/qml/cppextensions/referenceexamples/attached/attached.pro b/examples/qml/cppextensions/referenceexamples/attached/attached.pro index 4cfd4e0aed..f4385e1a30 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/attached.pro +++ b/examples/qml/cppextensions/referenceexamples/attached/attached.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp index feefef4fe1..c4f906119a 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp @@ -69,9 +69,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h index c789c0bd51..1da6c34026 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h @@ -42,7 +42,7 @@ #include <QObject> #include <QDate> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/attached/main.cpp b/examples/qml/cppextensions/referenceexamples/attached/main.cpp index 4c2c3003fe..ce067bbbf7 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/binding/binding.pro b/examples/qml/cppextensions/referenceexamples/binding/binding.pro index 2add33fa47..0379f93ea7 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/binding.pro +++ b/examples/qml/cppextensions/referenceexamples/binding/binding.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += binding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp index 4f5acdfb75..62499862f0 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp @@ -75,9 +75,9 @@ void BirthdayParty::setHost(Person *c) emit hostChanged(); } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h index 376d107f26..195e9cd9cf 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h @@ -43,7 +43,7 @@ #include <QObject> #include <QDate> #include <QDebug> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -69,7 +69,7 @@ class BirthdayParty : public QObject // ![0] Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged) // ![0] - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) Q_CLASSINFO("DefaultProperty", "guests") public: @@ -78,7 +78,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp index df4dbec9c4..90220e15ae 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h index a9f3a94544..ace48b2af0 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h @@ -40,20 +40,20 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include <QDeclarativePropertyValueSource> -#include <QDeclarativeProperty> +#include <QQmlPropertyValueSource> +#include <QQmlProperty> #include <QStringList> -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); QString name() const; void setName(const QString &); @@ -66,7 +66,7 @@ signals: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; }; diff --git a/examples/qml/cppextensions/referenceexamples/binding/main.cpp b/examples/qml/cppextensions/referenceexamples/binding/main.cpp index 551d24b702..389cb7609b 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -56,8 +56,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h index 4315d3727e..43611693d9 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject @@ -49,7 +49,7 @@ class BirthdayParty : public QObject Q_OBJECT // ![0] Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro index 742b85b683..60e8532bab 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro +++ b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp index 95b309de4c..15e41ca597 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -58,8 +58,8 @@ int main(int argc, char ** argv) qmlRegisterType<Girl>("People", 1,0, "Girl"); //![register boy girl] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h index cfca6689db..3ee635039d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" // ![0] @@ -49,7 +49,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/default/default.pro b/examples/qml/cppextensions/referenceexamples/default/default.pro index 6533cdd7d3..36ef39fc55 100644 --- a/examples/qml/cppextensions/referenceexamples/default/default.pro +++ b/examples/qml/cppextensions/referenceexamples/default/default.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/default/main.cpp b/examples/qml/cppextensions/referenceexamples/default/main.cpp index 3a03279129..175945fc5d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/extended/extended.pro b/examples/qml/cppextensions/referenceexamples/extended/extended.pro index 3d9f59c470..206ea19c61 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/extended.pro +++ b/examples/qml/cppextensions/referenceexamples/extended/extended.pro @@ -1,11 +1,11 @@ -QT += declarative widgets +QT += qml widgets SOURCES += main.cpp \ lineedit.cpp HEADERS += lineedit.h RESOURCES += extended.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp index 8f7fd8aa93..a3b1d0d54e 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include "lineedit.h" -#include <qdeclarative.h> +#include <qqml.h> LineEditExtension::LineEditExtension(QObject *object) : QObject(object), m_lineedit(static_cast<QLineEdit *>(object)) diff --git a/examples/qml/cppextensions/referenceexamples/extended/main.cpp b/examples/qml/cppextensions/referenceexamples/extended/main.cpp index 3c580396f2..de7c450169 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include <QLineEdit> #include "lineedit.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); QLineEdit *edit = qobject_cast<QLineEdit *>(component.create()); if (edit) { diff --git a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h index 491903adc5..5ca0e9b982 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h @@ -41,14 +41,14 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -56,7 +56,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro index aab0c8469a..d32a98f79b 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro +++ b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/grouped/main.cpp b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp index de7d714c52..55be3b715b 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -54,8 +54,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp index 35444f505a..c96f41d944 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h index e49afdb78d..df8a859972 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h @@ -41,21 +41,21 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) public: BirthdayParty(QObject *parent = 0); Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/methods/main.cpp b/examples/qml/cppextensions/referenceexamples/methods/main.cpp index d037d88f20..1e502c3943 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -51,8 +51,8 @@ int main(int argc, char ** argv) qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); qmlRegisterType<Person>("People", 1,0, "Person"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/methods/methods.pro b/examples/qml/cppextensions/referenceexamples/methods/methods.pro index ee28355188..f4c63bfa29 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/methods.pro +++ b/examples/qml/cppextensions/referenceexamples/methods/methods.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp index 0038cd0a41..8e79d07748 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h index 2c3d128b6d..84eefa52ae 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" // ![0] @@ -53,7 +53,7 @@ class BirthdayParty : public QObject Q_PROPERTY(Person *host READ host WRITE setHost) // ![1] // ![2] - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![2] // ![3] public: @@ -62,7 +62,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/properties/main.cpp b/examples/qml/cppextensions/referenceexamples/properties/main.cpp index 421ce9fbaa..cc0de89221 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType<Person>("People", 1,0, "Person"); //![register list] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/properties/properties.pro b/examples/qml/cppextensions/referenceexamples/properties/properties.pro index 936d0ea429..e079b1f79e 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/properties.pro +++ b/examples/qml/cppextensions/referenceexamples/properties/properties.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp index d576c2a278..b9f7e15907 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h index 45ad4f0acf..3f1b020b5a 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h @@ -42,7 +42,7 @@ #include <QObject> #include <QDate> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/signal/main.cpp b/examples/qml/cppextensions/referenceexamples/signal/main.cpp index 5800cf450f..21a26d9b67 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/signal/signal.pro b/examples/qml/cppextensions/referenceexamples/signal/signal.pro index 8ffdb50f90..d426e398a5 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/signal.pro +++ b/examples/qml/cppextensions/referenceexamples/signal/signal.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp index 09137c41a8..aa8bc77116 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h index 5d561da807..f3635e899b 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h @@ -43,7 +43,7 @@ #include <QObject> #include <QDate> #include <QDebug> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -64,7 +64,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) // ![0] @@ -75,7 +75,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp index 629c354543..d69154b57a 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h index 9721350435..19e47c28ac 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h @@ -40,24 +40,24 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include <QDeclarativePropertyValueSource> -#include <QDeclarativeProperty> -#include <qdeclarative.h> +#include <QQmlPropertyValueSource> +#include <QQmlProperty> +#include <qqml.h> #include <QStringList> // ![0] -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) // ![0] Q_PROPERTY(QString name READ name WRITE setName) // ![1] public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); // ![1] QString name() const; @@ -69,7 +69,7 @@ private slots: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; // ![2] }; diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp index 53d676dfbe..e119e719af 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -57,8 +57,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro index a978d8452a..afc1784d71 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro +++ b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += valuesource.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource INSTALLS += target sources |