diff options
Diffstat (limited to 'examples/declarative/tutorials')
23 files changed, 60 insertions, 60 deletions
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp +++ b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp index 5820c5626c..06d9892d6b 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp @@ -41,8 +41,8 @@ #include <QPainter> //![0] -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } //![0] diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h index a5afec5252..d1beb71545 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h +++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h @@ -41,17 +41,17 @@ #define PIECHART_H //![0] -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QColor color READ color WRITE setColor) public: - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp +++ b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp index 86407f1f17..ca25474aee 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include <QPainter> -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h index 38f5c0553f..5205151a0a 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h +++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h @@ -40,11 +40,11 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { //![0] Q_OBJECT @@ -55,7 +55,7 @@ class PieChart : public QSGPaintedItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp +++ b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp index 86ad6a7fe0..5819088962 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include <QPainter> -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h index 5208f81d27..55be2a493f 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h +++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h @@ -41,10 +41,10 @@ #define PIECHART_H #include <QColor> -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> //![0] -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { //![0] Q_OBJECT @@ -55,7 +55,7 @@ class PieChart : public QSGPaintedItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp index d2812767cf..c9b9a0b5aa 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp @@ -40,7 +40,7 @@ #include "piechart.h" #include "pieslice.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> //![0] @@ -55,8 +55,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice"); //![1] - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp index 5911f4dd49..f032887ce8 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h index 9e8139846b..c1cdf30805 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h @@ -40,12 +40,12 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QtDeclarative/QSGItem> +#include <QtDeclarative/QQuickItem> class PieSlice; //![0] -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(PieSlice* pieSlice READ pieSlice WRITE setPieSlice) @@ -56,7 +56,7 @@ class PieChart : public QSGItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp index 764ef23944..176ca1eac4 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h index 7163864fac..59606486a4 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h @@ -40,17 +40,17 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp index 64c18f74bc..78f6f25485 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp @@ -40,7 +40,7 @@ #include "piechart.h" #include "pieslice.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -50,8 +50,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp index 248f4a2096..876ef54026 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h index e95b02f38c..feea3d2789 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h @@ -40,12 +40,12 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QSGItem> +#include <QQuickItem> class PieSlice; //![0] -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices) @@ -55,7 +55,7 @@ class PieChart : public QSGItem //![1] public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp index 70338f08a0..839d153926 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h index 1204f9adf2..157e9cda77 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h @@ -40,11 +40,11 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) @@ -53,7 +53,7 @@ class PieSlice : public QSGPaintedItem //![0] public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp index 5aa4a78035..b9a6442acd 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h index 1e4f1226dc..2d58360245 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h +++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h @@ -40,18 +40,18 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QSGItem> +#include <QQuickItem> class PieSlice; -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices) Q_PROPERTY(QString name READ name WRITE setName) public: - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp index 70338f08a0..839d153926 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h index 3096ee6570..4251e49396 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h @@ -40,10 +40,10 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) @@ -51,7 +51,7 @@ class PieSlice : public QSGPaintedItem Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan) public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); |