Skip to content

Commit

Permalink
Rename Qt Quick-specific classes to QQuick*
Browse files Browse the repository at this point in the history
The QSG (SceneGraph) prefix is too generic for
Qt Quick(2)-specific classes.

All the classes and files in the declarative/items
directory have been renamed.

In particular, for classes that are currently public,
the renaming is as follows:

QSGView --> QQuickView
QSGCanvas --> QQuickCanvas
QSGItem --> QQuickItem
QSGPaintedItem --> QQuickPaintedItem

The header files have been renamed accordingly
(e.g. qsgview.h --> qquickview.h).

Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
  • Loading branch information
Kent Hansen authored and Qt by Nokia committed Oct 21, 2011
1 parent 2d119a1 commit bfb3c42
Show file tree
Hide file tree
Showing 721 changed files with 12,195 additions and 12,191 deletions.
14 changes: 7 additions & 7 deletions doc/src/declarative/example-textballoons.qdoc
Expand Up @@ -34,12 +34,12 @@

\image declarative-textballoons_example.png

The QSGPaintedItem class is a class derived from QSGItem for implementing
The QQuickPaintedItem class is a class derived from QQuickItem for implementing
custom QML Scene Graph items using the QPainter interfaces.

The example consists of an item class, a plugin class and a QML file
to use this plugin. The \c TextBalloon class represents the individual
text balloons extending QSGPaintedItem, the \c TextBalloonPlugin class
text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class
represents the skeleton code for a QtQuick plugin and the
\c textballoons.qml file is used to load the plugin and display the text
balloons.
Expand All @@ -51,14 +51,14 @@

\section1 TextBalloon Class Declaration

The \c TextBalloon class inherits from QSGPaintedItem. QSGPaintedItem
The \c TextBalloon class inherits from QQuickPaintedItem. QQuickPaintedItem
is the base class for all QPainter based items in the QML Scene Graph
framework.

\snippet examples/declarative/painteditem/textballoons/textballoon.h 0

To implement a QSGPaintedItem you must implement QSGPaintedIem's pure
virtual function \l {QSGPaintedItem::}{paint()} which implements the
To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure
virtual function \l {QQuickPaintedItem::}{paint()} which implements the
painting of the element.

\section1 TextBalloon Class Definition
Expand All @@ -75,9 +75,9 @@
\snippet examples/declarative/painteditem/textballoons/textballoon.cpp 1

We start with setting the pen and brush on the item to define the look of
the item. After that we start drawing. Note that the \l {QSGPaintedItem::}{boundingRect()}
the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{boundingRect()}
item is called to draw depending on the size of the item. The rectangle
returned by the \l {QSGPaintedItem::}{boundingRect()} function is the size
returned by the \l {QQuickPaintedItem::}{boundingRect()} function is the size
of the item as defined in the QML file.

\section1 textballoons.qml file
Expand Down
2 changes: 1 addition & 1 deletion doc/src/declarative/qmltest.qdoc
Expand Up @@ -107,7 +107,7 @@
\section1 Running tests with QtQuick 1

The \c{-qtquick1} option can be passed to a test binary to run
the tests using QDeclarativeView (QtQuick 1) rather than QSGView (QtQuick 2):
the tests using QDeclarativeView (QtQuick 1) rather than QQuickView (QtQuick 2):

\code
tst_example -qtquick1
Expand Down
8 changes: 4 additions & 4 deletions doc/src/declarative/whatsnew.qdoc
Expand Up @@ -39,10 +39,10 @@ QtQuick 2 is based on an OpenGL scenegraph. The following
classes replace their equivalents in QtQuick 1:

\list
\o QSGView
\o QSGCanvas
\o QSGItem
\o QSGPaintedItem
\o QQuickView
\o QQuickCanvas
\o QQuickItem
\o QQuickPaintedItem
\endlist

\section2 QML Engine/Language Improvements
Expand Down
14 changes: 7 additions & 7 deletions doc/src/qtquick1/example-textballoons.qdoc
Expand Up @@ -34,12 +34,12 @@

\image declarative-textballoons_example.png

The QSGPaintedItem class is a class derived from QSGItem for implementing
The QQuickPaintedItem class is a class derived from QQuickItem for implementing
custom QML Scene Graph items using the QPainter interfaces.

The example consists of an item class, a plugin class and a QML file
to use this plugin. The \c TextBalloon class represents the individual
text balloons extending QSGPaintedItem, the \c TextBalloonPlugin class
text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class
represents the skeleton code for a QtQuick plugin and the
\c textballoons.qml file is used to load the plugin and display the text
balloons.
Expand All @@ -51,14 +51,14 @@

\section1 TextBalloon Class Declaration

The \c TextBalloon class inherits from QSGPaintedItem. QSGPaintedItem
The \c TextBalloon class inherits from QQuickPaintedItem. QQuickPaintedItem
is the base class for all QPainter based items in the QML Scene Graph
framework.

\snippet examples/declarative/painteditem/textballoons/textballoon.h 0

To implement a QSGPaintedItem you must implement QSGPaintedIem's pure
virtual function \l {QSGPaintedItem::}{paint()} which implements the
To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure
virtual function \l {QQuickPaintedItem::}{paint()} which implements the
painting of the element.

\section1 TextBalloon Class Definition
Expand All @@ -75,9 +75,9 @@
\snippet examples/declarative/painteditem/textballoons/textballoon.cpp 1

We start with setting the pen and brush on the item to define the look of
the item. After that we start drawing. Note that the \l {QSGPaintedItem::}{boundingRect()}
the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{boundingRect()}
item is called to draw depending on the size of the item. The rectangle
returned by the \l {QSGPaintedItem::}{boundingRect()} function is the size
returned by the \l {QQuickPaintedItem::}{boundingRect()} function is the size
of the item as defined in the QML file.

\section1 textballoons.qml file
Expand Down
2 changes: 1 addition & 1 deletion doc/src/qtquick1/qmltest.qdoc
Expand Up @@ -107,7 +107,7 @@
\section1 Running tests with QtQuick 1

The \c{-qtquick1} option can be passed to a test binary to run
the tests using QDeclarativeView (QtQuick 1) rather than QSGView (QtQuick 2):
the tests using QDeclarativeView (QtQuick 1) rather than QQuickView (QtQuick 2):

\code
tst_example -qtquick1
Expand Down
Expand Up @@ -44,7 +44,7 @@

#include <QDeclarativeEngine>
#include <QDeclarativeNetworkAccessManagerFactory>
#include <QSGView>
#include <QQuickView>


/*
Expand Down Expand Up @@ -97,7 +97,7 @@ int main(int argc, char ** argv)
}
}

QSGView view;
QQuickView view;
view.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory);

view.setSource(source);
Expand Down
6 changes: 3 additions & 3 deletions examples/declarative/minehunt/main.cpp
Expand Up @@ -40,7 +40,7 @@
****************************************************************************/

#include <QtGui/QGuiApplication>
#include <qsgview.h>
#include <qquickview.h>
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeEngine>

Expand All @@ -49,12 +49,12 @@
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QSGView canvas;
QQuickView canvas;

qmlRegisterType<TileData>();
MinehuntGame* game = new MinehuntGame();

canvas.setResizeMode(QSGView::SizeRootObjectToView);
canvas.setResizeMode(QQuickView::SizeRootObjectToView);
canvas.engine()->rootContext()->setContextObject(game);
canvas.setSource(QString("qrc:minehunt.qml"));
QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit()));
Expand Down
8 changes: 4 additions & 4 deletions examples/declarative/modelviews/abstractitemmodel/main.cpp
Expand Up @@ -43,8 +43,8 @@
#include <qdeclarativeengine.h>
#include <qdeclarativecontext.h>
#include <qdeclarative.h>
#include <qsgitem.h>
#include <qsgview.h>
#include <qquickitem.h>
#include <qquickview.h>

//![0]
int main(int argc, char ** argv)
Expand All @@ -56,8 +56,8 @@ int main(int argc, char ** argv)
model.addAnimal(Animal("Polar bear", "Large"));
model.addAnimal(Animal("Quoll", "Small"));

QSGView view;
view.setResizeMode(QSGView::SizeRootObjectToView);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", &model);
//![0]
Expand Down
8 changes: 4 additions & 4 deletions examples/declarative/modelviews/objectlistmodel/main.cpp
Expand Up @@ -43,8 +43,8 @@
#include <qdeclarativeengine.h>
#include <qdeclarativecontext.h>
#include <qdeclarative.h>
#include <qsgitem.h>
#include <qsgview.h>
#include <qquickitem.h>
#include <qquickview.h>

#include "dataobject.h"

Expand All @@ -64,8 +64,8 @@ int main(int argc, char ** argv)
dataList.append(new DataObject("Item 3", "blue"));
dataList.append(new DataObject("Item 4", "yellow"));

QSGView view;
view.setResizeMode(QSGView::SizeRootObjectToView);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
//![0]
Expand Down
6 changes: 3 additions & 3 deletions examples/declarative/modelviews/stringlistmodel/main.cpp
Expand Up @@ -44,8 +44,8 @@
#include <qdeclarativeengine.h>
#include <qdeclarativecontext.h>
#include <qdeclarative.h>
#include <qsgitem.h>
#include <qsgview.h>
#include <qquickitem.h>
#include <qquickview.h>


/*
Expand All @@ -64,7 +64,7 @@ int main(int argc, char ** argv)
dataList.append("Item 3");
dataList.append("Item 4");

QSGView view;
QQuickView view;
QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
//![0]
Expand Down
12 changes: 6 additions & 6 deletions examples/declarative/painteditem/smile/main.cpp
Expand Up @@ -41,14 +41,14 @@
#include <QGuiApplication>
#include <QPainter>
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/qsgview.h>
#include <QtDeclarative/qsgpainteditem.h>
#include <QtDeclarative/qquickview.h>
#include <QtDeclarative/qquickpainteditem.h>

class MyPaintItem : public QSGPaintedItem
class MyPaintItem : public QQuickPaintedItem
{
Q_OBJECT
public:
MyPaintItem() : QSGPaintedItem()
MyPaintItem() : QQuickPaintedItem()
{
setAntialiasing(true);
}
Expand All @@ -72,8 +72,8 @@ int main(int argc, char ** argv)

qmlRegisterType<MyPaintItem>("MyModule", 1, 0, "MyPaintItem");

QSGView view;
view.setResizeMode(QSGView::SizeRootObjectToView);
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl::fromLocalFile("smile.qml"));
view.show();
view.raise();
Expand Down
4 changes: 2 additions & 2 deletions examples/declarative/painteditem/textballoons/textballoon.cpp
Expand Up @@ -42,8 +42,8 @@
#include "textballoon.h"

//! [0]
TextBalloon::TextBalloon(QSGItem *parent)
: QSGPaintedItem(parent)
TextBalloon::TextBalloon(QQuickItem *parent)
: QQuickPaintedItem(parent)
, rightAligned(false)
{
}
Expand Down
4 changes: 2 additions & 2 deletions examples/declarative/painteditem/textballoons/textballoon.h
Expand Up @@ -45,13 +45,13 @@
#include <QtDeclarative>

//! [0]
class TextBalloon : public QSGPaintedItem
class TextBalloon : public QQuickPaintedItem
{
Q_OBJECT
Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged)

public:
TextBalloon(QSGItem *parent = 0);
TextBalloon(QQuickItem *parent = 0);
void paint(QPainter *painter);

bool isRightAligned();
Expand Down
Expand Up @@ -39,7 +39,7 @@
****************************************************************************/
//![0]
#include "piechart.h"
#include <QSGView>
#include <QQuickView>
#include <QGuiApplication>

int main(int argc, char *argv[])
Expand All @@ -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();
Expand Down
Expand Up @@ -41,8 +41,8 @@
#include <QPainter>

//![0]
PieChart::PieChart(QSGItem *parent)
: QSGPaintedItem(parent)
PieChart::PieChart(QQuickItem *parent)
: QQuickPaintedItem(parent)
{
}
//![0]
Expand Down
Expand Up @@ -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);
Expand Down
Expand Up @@ -39,7 +39,7 @@
****************************************************************************/
//![0]
#include "piechart.h"
#include <QSGView>
#include <QQuickView>
#include <QGuiApplication>

int main(int argc, char *argv[])
Expand All @@ -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();
Expand Down
Expand Up @@ -40,8 +40,8 @@
#include "piechart.h"
#include <QPainter>

PieChart::PieChart(QSGItem *parent)
: QSGPaintedItem(parent)
PieChart::PieChart(QQuickItem *parent)
: QQuickPaintedItem(parent)
{
}

Expand Down
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit bfb3c42

Please sign in to comment.