summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-26 00:43:12 +0200
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-26 00:43:12 +0200
commit99ecf471075088eba042575772196e63cab5b8f8 (patch)
treed0337258c77b431d1010320fe5640a24bd5b47e1 /src/gui
parent965639a06e624534f4ad8e869fea7b2df33a657d (diff)
Doc: Replace QMatrix with QTransform and respective functions in various places.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp20
-rw-r--r--src/gui/painting/qmatrix.cpp7
-rw-r--r--src/gui/painting/qpainter.cpp2
4 files changed, 18 insertions, 13 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 9b6414dbb4..0dce26b352 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4697,7 +4697,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
background has been drawn, and before the foreground has been
drawn. All painting is done in \e scene coordinates. Before
drawing each item, the painter must be transformed using
- QGraphicsItem::sceneMatrix().
+ QGraphicsItem::sceneTransform().
The \a options parameter is the list of style option objects for
each item in \a items. The \a numItems parameter is the number of
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 53b044cd88..ca55f2e962 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -97,8 +97,8 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
setViewport(new QGLWidget). QGraphicsView takes ownership of the viewport
widget.
- QGraphicsView supports affine transformations, using QMatrix. You can
- either pass a matrix to setMatrix(), or you can call one of the
+ QGraphicsView supports affine transformations, using QTransform. You can
+ either pass a matrix to setTransform(), or you can call one of the
convenience functions rotate(), scale(), translate() or shear(). The most
two common transformations are scaling, which is used to implement
zooming, and rotation. QGraphicsView keeps the center of the view fixed
@@ -1583,7 +1583,7 @@ void QGraphicsView::setSceneRect(const QRectF &rect)
Returns the current transformation matrix for the view. If no current
transformation is set, the identity matrix is returned.
- \sa setMatrix(), rotate(), scale(), shear(), translate()
+ \sa setMatrix(), transform(), rotate(), scale(), shear(), translate()
*/
QMatrix QGraphicsView::matrix() const
{
@@ -1615,7 +1615,7 @@ QMatrix QGraphicsView::matrix() const
a view coordinate to a floating point scene coordinate, or mapFromScene()
to map from floating point scene coordinates to view coordinates.
- \sa matrix(), rotate(), scale(), shear(), translate()
+ \sa matrix(), setTransform(), rotate(), scale(), shear(), translate()
*/
void QGraphicsView::setMatrix(const QMatrix &matrix, bool combine)
{
@@ -1624,6 +1624,8 @@ void QGraphicsView::setMatrix(const QMatrix &matrix, bool combine)
/*!
Resets the view transformation matrix to the identity matrix.
+
+ \sa resetTransform()
*/
void QGraphicsView::resetMatrix()
{
@@ -1633,7 +1635,7 @@ void QGraphicsView::resetMatrix()
/*!
Rotates the current view transformation \a angle degrees clockwise.
- \sa setMatrix(), matrix(), scale(), shear(), translate()
+ \sa setTransform(), transform(), scale(), shear(), translate()
*/
void QGraphicsView::rotate(qreal angle)
{
@@ -1646,7 +1648,7 @@ void QGraphicsView::rotate(qreal angle)
/*!
Scales the current view transformation by (\a sx, \a sy).
- \sa setMatrix(), matrix(), rotate(), shear(), translate()
+ \sa setTransform(), transform(), rotate(), shear(), translate()
*/
void QGraphicsView::scale(qreal sx, qreal sy)
{
@@ -1659,7 +1661,7 @@ void QGraphicsView::scale(qreal sx, qreal sy)
/*!
Shears the current view transformation by (\a sh, \a sv).
- \sa setMatrix(), matrix(), rotate(), scale(), translate()
+ \sa setTransform(), transform(), rotate(), scale(), translate()
*/
void QGraphicsView::shear(qreal sh, qreal sv)
{
@@ -1672,7 +1674,7 @@ void QGraphicsView::shear(qreal sh, qreal sv)
/*!
Translates the current view transformation by (\a dx, \a dy).
- \sa setMatrix(), matrix(), rotate(), shear()
+ \sa setTransform(), transform(), rotate(), shear()
*/
void QGraphicsView::translate(qreal dx, qreal dy)
{
@@ -1830,7 +1832,7 @@ void QGraphicsView::ensureVisible(const QGraphicsItem *item, int xmargin, int ym
If \a rect is empty, or if the viewport is too small, this
function will do nothing.
- \sa setMatrix(), ensureVisible(), centerOn()
+ \sa setTransform(), ensureVisible(), centerOn()
*/
void QGraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRatioMode)
{
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 221267f0b4..bc08235837 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -60,6 +60,9 @@ QT_BEGIN_NAMESPACE
A matrix specifies how to translate, scale, shear or rotate the
coordinate system, and is typically used when rendering graphics.
+ QMatrix, in contrast to QTransform, does not allow perspective
+ transformations. QTransform is the recommended transformation
+ class in Qt.
A QMatrix object can be built using the setMatrix(), scale(),
rotate(), translate() and shear() functions. Alternatively, it
@@ -172,8 +175,8 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/matrix/matrix.cpp 2
\endtable
- \sa QPainter, {The Coordinate System}, {demos/affine}{Affine
- Transformations Demo}, {Transformations Example}
+ \sa QPainter, QTransform, {The Coordinate System},
+ {demos/affine}{Affine Transformations Demo}, {Transformations Example}
*/
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 04600718c3..4c10a5a084 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1016,7 +1016,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
\o layoutDirection() defines the layout direction used by the
painter when drawing text.
- \o matrixEnabled() tells whether world transformation is enabled.
+ \o worldMatrixEnabled() tells whether world transformation is enabled.
\o viewTransformEnabled() tells whether view transformation is
enabled.