summaryrefslogtreecommitdiffstats
path: root/examples/graphicsview
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-31 13:52:55 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-31 13:52:55 (GMT)
commit2cadc571339d4abee6d7cfb0da08e3119d934524 (patch)
treeb79f8033cc93bea6d74fc50ea80097ae071ba684 /examples/graphicsview
parented6e0d67211938de7bcba844519d5bad8d2965b6 (diff)
downloadQt-2cadc571339d4abee6d7cfb0da08e3119d934524.zip
Qt-2cadc571339d4abee6d7cfb0da08e3119d934524.tar.gz
Qt-2cadc571339d4abee6d7cfb0da08e3119d934524.tar.bz2
Doc: Use new APIs in example and correct documentation regarding replacement.
Diffstat (limited to 'examples/graphicsview')
-rw-r--r--examples/graphicsview/collidingmice/mouse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/graphicsview/collidingmice/mouse.cpp b/examples/graphicsview/collidingmice/mouse.cpp
index c6a67b1..4cc29dd 100644
--- a/examples/graphicsview/collidingmice/mouse.cpp
+++ b/examples/graphicsview/collidingmice/mouse.cpp
@@ -64,7 +64,7 @@ Mouse::Mouse()
: angle(0), speed(0), mouseEyeDirection(0),
color(qrand() % 256, qrand() % 256, qrand() % 256)
{
- rotate(qrand() % (360 * 16));
+ setRotation(qrand() % (360 * 16));
}
//! [0]
@@ -195,7 +195,7 @@ void Mouse::advance(int step)
qreal dx = ::sin(angle) * 10;
mouseEyeDirection = (qAbs(dx / 5) < 1) ? 0 : dx / 5;
- rotate(dx);
+ setRotation(rotation() + dx);
setPos(mapToParent(0, -(3 + sin(speed) * 3)));
}
//! [11]