diff options
| author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-27 23:25:07 (GMT) |
|---|---|---|
| committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-27 23:25:07 (GMT) |
| commit | fb2e33b21557412ae7bde009662ca89870407f5f (patch) | |
| tree | 61e7765a4e644d12a0addc21a0bf63e13e992cb9 /doc/src/snippets/animation/sequential/tracer.cpp | |
| parent | d53e4499f864719446abdb7fdeff433dbb3f7d98 (diff) | |
| parent | fcfdccc03b6dd26a82e87a6b6a0ca48d67f78cf6 (diff) | |
| download | Qt-fb2e33b21557412ae7bde009662ca89870407f5f.zip Qt-fb2e33b21557412ae7bde009662ca89870407f5f.tar.gz Qt-fb2e33b21557412ae7bde009662ca89870407f5f.tar.bz2 | |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
mkspecs/features/qt.prf
src/corelib/animation/qanimationgroup.cpp
src/corelib/animation/qparallelanimationgroup.cpp
src/corelib/animation/qpauseanimation.cpp
src/corelib/animation/qpropertyanimation.cpp
src/corelib/animation/qsequentialanimationgroup.cpp
src/corelib/kernel/kernel.pri
src/corelib/kernel/qvariant_p.h
src/corelib/tools/qeasingcurve.cpp
src/gui/graphicsview/qgraphicsitem.cpp
src/opengl/opengl.pro
src/opengl/qgl_x11egl.cpp
tests/auto/auto.pro
Diffstat (limited to 'doc/src/snippets/animation/sequential/tracer.cpp')
| -rw-r--r-- | doc/src/snippets/animation/sequential/tracer.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/src/snippets/animation/sequential/tracer.cpp b/doc/src/snippets/animation/sequential/tracer.cpp new file mode 100644 index 0000000..49bd51e --- /dev/null +++ b/doc/src/snippets/animation/sequential/tracer.cpp @@ -0,0 +1,25 @@ +#include <QAbstractAnimation> +#include <QDebug> +#include <QPoint> +#include "tracer.h" + +Tracer::Tracer(QObject *parent) + : QObject(parent) +{ +} + +void Tracer::checkValue() +{ + QAbstractAnimation *animation = static_cast<QAbstractAnimation *>(sender()); + if (time != animation->duration()) { + qDebug() << "Animation's last recorded time" << time; + qDebug() << "Expected" << animation->duration(); + } +} + +void Tracer::recordValue(const QVariant &value) +{ + QAbstractAnimation *animation = static_cast<QAbstractAnimation *>(sender()); + this->value = value; + time = animation->currentTime(); +} |
