diff options
author | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-31 13:52:55 (GMT) |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-31 13:52:55 (GMT) |
commit | 2cadc571339d4abee6d7cfb0da08e3119d934524 (patch) | |
tree | b79f8033cc93bea6d74fc50ea80097ae071ba684 /examples/graphicsview/collidingmice | |
parent | ed6e0d67211938de7bcba844519d5bad8d2965b6 (diff) | |
download | Qt-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/collidingmice')
-rw-r--r-- | examples/graphicsview/collidingmice/mouse.cpp | 4 |
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] |