diff options
Diffstat (limited to 'examples/widgets/animation/animatedtiles/main.cpp')
-rw-r--r-- | examples/widgets/animation/animatedtiles/main.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp index 09e9790646..5802d0f4cd 100644 --- a/examples/widgets/animation/animatedtiles/main.cpp +++ b/examples/widgets/animation/animatedtiles/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -17,8 +17,8 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** @@ -39,6 +39,7 @@ ****************************************************************************/ #include <QtWidgets> +#include <QtCore/qmath.h> #include <QtCore/qstate.h> class Pixmap : public QObject, public QGraphicsPixmapItem @@ -181,13 +182,13 @@ int main(int argc, char **argv) Pixmap *item = items.at(i); // Ellipse ellipseState->assignProperty(item, "pos", - QPointF(cos((i / 63.0) * 6.28) * 250, - sin((i / 63.0) * 6.28) * 250)); + QPointF(qCos((i / 63.0) * 6.28) * 250, + qSin((i / 63.0) * 6.28) * 250)); // Figure 8 figure8State->assignProperty(item, "pos", - QPointF(sin((i / 63.0) * 6.28) * 250, - sin(((i * 2)/63.0) * 6.28) * 250)); + QPointF(qSin((i / 63.0) * 6.28) * 250, + qSin(((i * 2)/63.0) * 6.28) * 250)); // Random randomState->assignProperty(item, "pos", |