/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** GNU Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of this
-** file.
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
\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.
\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
\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