diff options
author | Michael Brasser <michael.brasser@jollamobile.com> | 2014-02-12 23:31:22 -0600 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-20 04:27:15 +0100 |
commit | 7da483bfbefcaabb1dbbf3e2f1d5b5f7aadc3b06 (patch) | |
tree | 30a6bdb4cf3d7275c3acf8ffcfaa5aae0b594819 /src/qml/animations/qcontinuinganimationgroupjob_p.h | |
parent | 587444f033cf51251f36321321ae358d187f37f9 (diff) |
Make SmoothedAnimation and SpringAnimation smoothly transition again.
Fix regression introduced in Qt 5.0 when animation backend was
rewritten.
Task-number: QTBUG-36709
Change-Id: Ib8caa4bc6a38e3bb4c1d1d3961f775fdd2b342c7
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Diffstat (limited to 'src/qml/animations/qcontinuinganimationgroupjob_p.h')
-rw-r--r-- | src/qml/animations/qcontinuinganimationgroupjob_p.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/qml/animations/qcontinuinganimationgroupjob_p.h b/src/qml/animations/qcontinuinganimationgroupjob_p.h new file mode 100644 index 0000000000..7578ab9709 --- /dev/null +++ b/src/qml/animations/qcontinuinganimationgroupjob_p.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Jolla Ltd. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCONTINUINGANIMATIONGROUPJOB_P_H +#define QCONTINUINGANIMATIONGROUPJOB_P_H + +#include "private/qanimationgroupjob_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QML_PRIVATE_EXPORT QContinuingAnimationGroupJob : public QAnimationGroupJob +{ + Q_DISABLE_COPY(QContinuingAnimationGroupJob) +public: + QContinuingAnimationGroupJob(); + ~QContinuingAnimationGroupJob(); + + int duration() const { return -1; } + +protected: + void updateCurrentTime(int currentTime); + void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState); + void updateDirection(QAbstractAnimationJob::Direction direction); + void uncontrolledAnimationFinished(QAbstractAnimationJob *animation); +}; + +QT_END_NAMESPACE + +#endif // QCONTINUINGANIMATIONGROUPJOB_P_H |