summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-01-15 11:54:36 +0100
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-01-15 11:55:37 +0100
commit6379165f6ae63c3a73a62b8fa3845cc299449827 (patch)
treefbd5ce1193b0918e6e92645c6615812f1fbfa31b
parent314b0e75bdcd9579149364d9ec76fc1591736f32 (diff)
Removed animators, part of 5.2
Change-Id: I43cdc7f36f4bfeb88b71d8b216ab459cb87566f5 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r--animators/README.txt57
-rw-r--r--animators/animators.pro4
-rw-r--r--animators/src/qmldir1
-rw-r--r--animators/src/qsgabstractanimation.cpp97
-rw-r--r--animators/src/qsgabstractanimation.h75
-rw-r--r--animators/src/qsgabstractanimator.cpp287
-rw-r--r--animators/src/qsgabstractanimator.h117
-rw-r--r--animators/src/qsganimatedproperty.cpp140
-rw-r--r--animators/src/qsganimatedproperty.h77
-rw-r--r--animators/src/qsganimatedrotation.cpp126
-rw-r--r--animators/src/qsganimatedrotation.h74
-rw-r--r--animators/src/qsganimatedscale.cpp102
-rw-r--r--animators/src/qsganimatedscale.h68
-rw-r--r--animators/src/qsganimatedtransform.cpp54
-rw-r--r--animators/src/qsganimatedtransform.h61
-rw-r--r--animators/src/qsganimatedtranslate.cpp75
-rw-r--r--animators/src/qsganimatedtranslate.h63
-rw-r--r--animators/src/qsganimatorcontroller.cpp323
-rw-r--r--animators/src/qsganimatorcontroller.h95
-rw-r--r--animators/src/qsganimatorhost.h52
-rw-r--r--animators/src/qsganimatoritem.cpp92
-rw-r--r--animators/src/qsganimatoritem.h71
-rw-r--r--animators/src/qsganimatornode.cpp108
-rw-r--r--animators/src/qsganimatornode.h66
-rw-r--r--animators/src/qsganimatorplugin.cpp74
-rw-r--r--animators/src/qsganimatorshadereffect.cpp134
-rw-r--r--animators/src/qsganimatorshadereffect.h73
-rw-r--r--animators/src/qsgcoloranimation.cpp67
-rw-r--r--animators/src/qsgcoloranimation.h67
-rw-r--r--animators/src/qsgnumberanimation.cpp68
-rw-r--r--animators/src/qsgnumberanimation.h66
-rw-r--r--animators/src/qsgparallelanimation.cpp95
-rw-r--r--animators/src/qsgparallelanimation.h70
-rw-r--r--animators/src/qsgparallelanimator.cpp80
-rw-r--r--animators/src/qsgparallelanimator.h59
-rw-r--r--animators/src/qsgpauseanimation.cpp82
-rw-r--r--animators/src/qsgpauseanimation.h74
-rw-r--r--animators/src/qsgpauseanimator.cpp68
-rw-r--r--animators/src/qsgpauseanimator.h63
-rw-r--r--animators/src/qsgpropertyanimation.cpp270
-rw-r--r--animators/src/qsgpropertyanimation.h116
-rw-r--r--animators/src/qsgpropertyanimator.cpp258
-rw-r--r--animators/src/qsgpropertyanimator.h90
-rw-r--r--animators/src/qsgsequentialanimation.cpp95
-rw-r--r--animators/src/qsgsequentialanimation.h70
-rw-r--r--animators/src/qsgsequentialanimator.cpp86
-rw-r--r--animators/src/qsgsequentialanimator.h59
-rw-r--r--animators/src/qsgtoplevelanimator.cpp71
-rw-r--r--animators/src/qsgtoplevelanimator.h59
-rw-r--r--animators/src/qsgvector3danimation.cpp68
-rw-r--r--animators/src/qsgvector3danimation.h67
-rw-r--r--animators/src/src.pro72
-rw-r--r--animators/test/Control.qml186
-rw-r--r--animators/test/TestBedModel.qml28
-rw-r--r--animators/test/TestBehaviorPropertyAnimation.qml79
-rw-r--r--animators/test/TestBehaviorSequentialAnimation.qml83
-rw-r--r--animators/test/TestMultipleAnimation.qml106
-rw-r--r--animators/test/TestMultipleProperties.qml116
-rw-r--r--animators/test/TestNumberAnimation.qml77
-rw-r--r--animators/test/TestNumberAnimationAlwaysRunToEnd.qml80
-rw-r--r--animators/test/TestOnPropertyAnimation.qml76
-rw-r--r--animators/test/TestOpacity.qml105
-rw-r--r--animators/test/TestParallelAnimation.qml106
-rw-r--r--animators/test/TestPosition.qml78
-rw-r--r--animators/test/TestPropertyAnimation.qml76
-rw-r--r--animators/test/TestRectangleRotation.qml131
-rw-r--r--animators/test/TestRotation.qml74
-rw-r--r--animators/test/TestScale.qml108
-rw-r--r--animators/test/TestSequentialAnimation.qml108
-rw-r--r--animators/test/TestSequentialAnimationAlwaysRunToEnd.qml110
-rw-r--r--animators/test/TestShaderEffect.qml173
-rw-r--r--animators/test/TestShaderEffectOpacity.qml151
-rw-r--r--animators/test/TestTransformRotatation.qml110
-rw-r--r--animators/test/TestTransformRotationOriginPoint.qml118
-rw-r--r--animators/test/TestTransformScale.qml116
-rw-r--r--animators/test/TestTransformTranslate.qml112
-rw-r--r--animators/test/TestTransitionPropertyAnimation.qml88
-rw-r--r--animators/test/TestTransitionSequentialAnimation.qml112
-rw-r--r--animators/test/main.qml262
-rw-r--r--scenegraph-playground.pro2
80 files changed, 1 insertions, 7776 deletions
diff --git a/animators/README.txt b/animators/README.txt
deleted file mode 100644
index ba91b8b..0000000
--- a/animators/README.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-
-QtQuick 2.0 render thread animators -plugin
--------------------------------------------
-
-This plugin is a prototype implementation which provides render thread animations. Render thread
-animations are able to run even when main (GUI) thread is blocked. The benefit of this is that
-animations appear smooth in (almost) all situations.
-
-To compile plugin, some private Qt 5.0 headers are required. To get the plugin work correctly,
-scenegraph adaptation must provide a non-blocking render loop. Default scenegraph implementation
-does not currently have this feature enabled. If non-blocking render loop is not available, render
-thread animations still work, but the animations are not smooth (just like normal QML animations)
-when the main thread gets blocked.
-
-Usage QML examples can be found from the "examples" folder. Each example contains both, normal
-animation and render-thread animation and some dummy code which tries to create high CPU-load
-so that normal animations are stuttering while render-thread animations should keep running smoothly.
-
-Plugin exports 2 items and 7 animations which are named in the same way as the corresponding QtQuick
-elements, so that taking the plugin into use is rather easy. At best cases, only minor modifications
-to existing QML code is required.
-
- "Render-thread animation enabled" -versions of QML types currently are:
- - Item
- - ShaderEffect
-
- Render thread animation QML types:
- - ColorAnimation
- - NumberAnimation
- - PauseAnimation
- - ParallelAnimation
- - PropertyAnimation
- - SequentialAnimation
- - Vector3DAnimation
-
-Limitations & differences to default QML animation system:
-
- - Only some of the QML Item properties to be animated inside render thread:
-
- Item: x, y, opacity, scale, rotation and arbitary transformations (Translate, Scale, Rotation).
-
- ShaderEffect: In addition to inherited Item properties, custom properties that have GLSL uniform
- bindings can be animated in render thread.
-
- - Animations are executed asyncronously in the render thread, and the target property value is
- written to the QML property only when animation completes. Only then the change becomes visible
- to the Javascript bindings.
-
- - In the plugin functionality there are various issues that are not done in the most optimal way
- for various reasons...hopefully the functionality will be included inside QtQuick itself in the
- future Qt releases where it can be done in a more "correct" way.
-
-
-
-
-
-
diff --git a/animators/animators.pro b/animators/animators.pro
deleted file mode 100644
index 66116a4..0000000
--- a/animators/animators.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE=subdirs
-
-SUBDIRS=src
-
diff --git a/animators/src/qmldir b/animators/src/qmldir
deleted file mode 100644
index cf2fda8..0000000
--- a/animators/src/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin animators
diff --git a/animators/src/qsgabstractanimation.cpp b/animators/src/qsgabstractanimation.cpp
deleted file mode 100644
index 420a78e..0000000
--- a/animators/src/qsgabstractanimation.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsgabstractanimation.h"
-#include "qsganimatorhost.h"
-#include <private/qpauseanimationjob_p.h>
-
-QSGAbstractAnimation::QSGAbstractAnimation(QObject *parent)
- : QQuickAnimationGroup(parent)
- , m_registered(false)
- , m_transitionRunning(false)
-{
-}
-
-void QSGAbstractAnimation::complete()
-{
- m_transitionRunning = false;
-}
-
-void QSGAbstractAnimation::prepare(bool)
-{
-}
-
-bool QSGAbstractAnimation::isTransitionRunning()
-{
- return m_transitionRunning;
-}
-
-void QSGAbstractAnimation::registerToHost(QObject* target)
-{
- if (m_registered)
- return;
-
- QObject *host = target;
- QObject *hostParent = host ? host->parent() : 0;
-
- while (host && !host->inherits("QSGAnimatorHost")) {
- host = hostParent;
- hostParent = host ? host->parent() : 0;
- }
-
- QObject *animation = this;
- QObject *animationParent = parent();
-
- while (animationParent && animationParent->inherits("QSGAbstractAnimation")) {
- animation = animationParent;
- animationParent = animation ? animation->parent() : 0;
- }
-
- if (host && host->inherits("QSGAnimatorHost")) {
- QSGAnimatorHost* h = dynamic_cast<QSGAnimatorHost*> (host);
- QSGAbstractAnimation *a = dynamic_cast<QSGAbstractAnimation*> (animation);
- h->registerAnimation(a);
- m_registered = true;
- }
- else {
- qWarning() << "QSGAbstractAnimation::registerToHost() unable to register, " << target << " (or its parent) is not QSGAnimatorHost.";
- }
-}
diff --git a/animators/src/qsgabstractanimation.h b/animators/src/qsgabstractanimation.h
deleted file mode 100644
index 41d800b..0000000
--- a/animators/src/qsgabstractanimation.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGABSTRACTANIMATION_H
-#define QSGABSTRACTANIMATION_H
-
-#include <QtCore>
-#include <QtQuick>
-#include <private/qquickanimation_p.h>
-
-class QSGAbstractAnimation : public QQuickAnimationGroup
-{
- Q_OBJECT
-public:
- QSGAbstractAnimation(QObject *parent = 0);
- bool isTransitionRunning();
- virtual void prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget = 0) = 0;
-public Q_SLOTS:
- virtual void complete();
- virtual void prepare(bool);
-
-protected:
- void registerToHost(QObject*);
-
-protected:
- bool m_registered;
- bool m_transitionRunning;
-
-private:
- Q_DISABLE_COPY(QSGAbstractAnimation)
-
-};
-
-#endif // QSGABSTRACTANIMATION_H
diff --git a/animators/src/qsgabstractanimator.cpp b/animators/src/qsgabstractanimator.cpp
deleted file mode 100644
index 5fbf026..0000000
--- a/animators/src/qsgabstractanimator.cpp
+++ /dev/null
@@ -1,287 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgabstractanimator.h"
-#include "qsgabstractanimation.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGAbstractAnimator::QSGAbstractAnimator(QSGAnimatorController* controller, QSGAbstractAnimator *parent, QSGAbstractAnimation *qmlObject, qreal startTime)
- : m_parent(parent)
- , m_controller(controller)
- , m_startTime(startTime)
- , m_stopTime(0)
- , m_elapsed(0)
- , m_duration(0)
- , m_loops(1)
- , m_running(false)
- , m_paused(false)
- , m_alwaysRunToEnd(false)
- , m_runningToEnd(false)
- , m_hasControl(false)
- , m_stopping(false)
- , m_done(false)
- , m_qmlObject(qmlObject)
-{
- copyQmlObjectData();
- if (m_parent)
- m_parent->registerAnimator(this);
-}
-
-QSGAbstractAnimator::~QSGAbstractAnimator()
-{
- for (int i = 0; i < m_animators.count(); i++) {
- m_animators.at(i)->setParent(0);
- delete m_animators.at(i);
- }
-
- if (m_parent)
- m_parent->unregisterAnimator(this);
-}
-
-void QSGAbstractAnimator::advance(qreal t)
-{
- if ((!m_running || m_paused) && !m_runningToEnd)
- return;
-
- m_elapsed += t;
-
- if (m_hasControl && m_elapsed > m_startTime + m_duration * m_loops) {
- m_stopping = true;
- }
-
- if (m_runningToEnd && m_elapsed > m_stopTime) {
- m_runningToEnd = false;
- m_done = true;
- m_stopTime = 0.0;
- m_elapsed = m_stopTime;
- }
-}
-
-void QSGAbstractAnimator::copyQmlObjectData()
-{
- if (m_qmlObject) {
- m_loops = m_qmlObject->loops();
- m_running = m_qmlObject->isRunning();
- m_paused = m_qmlObject->isPaused();
- m_alwaysRunToEnd = m_qmlObject->alwaysRunToEnd();
- }
-}
-
-qreal QSGAbstractAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- m_startTime = startTime;
- bool wasRunning = m_running;
-
- copyQmlObjectData();
- if (m_qmlObject) {
- m_running = m_qmlObject->isTransitionRunning() || m_qmlObject->isRunning() || topLevelRunning;
- m_hasControl = (m_qmlObject->isTransitionRunning() || m_qmlObject->isRunning()) && !topLevelRunning;
- }
-
- // Normal stop request detected from QML side.
- if (!wasRunning && m_running && !m_runningToEnd) {
- m_elapsed = 0.0;
- }
-
- // Stop request from QML side detected, but must run to the end. Calculate stoptime.
- if (m_alwaysRunToEnd && wasRunning && !m_running && m_duration > 0 && !m_runningToEnd) {
- m_runningToEnd = true;
- m_stopTime = m_startTime + qMax(1, 1 + int((m_elapsed - m_startTime) / m_duration)) * m_duration;
- }
-
- // Running, cancel possible run to the end sequence etc.
- if (m_running) {
- m_done = false;
- m_runningToEnd = false;
- m_stopTime = 0.0;
- }
-
- // Stop because running to the end of the animation duration.
- if (m_qmlObject && m_running && m_stopping) {
- m_stopping = false;
- m_running = false;
- m_done = true;
- }
-
- // If done, let QML side know about it.
- if (m_qmlObject && m_done) {
- m_done = false;
- int count = m_animators.count();
- for (int i = 0; i < count; i++) {
- QObject *o = m_animators.at(i)->qmlObject();
- if (o)
- QMetaObject::invokeMethod(o, "complete", Qt::QueuedConnection);
- }
- QMetaObject::invokeMethod(m_qmlObject, "complete", Qt::QueuedConnection);
- }
-
- return 0.0;
-}
-
-void QSGAbstractAnimator::registerAnimator(QSGAbstractAnimator *a)
-{
- if (!m_animators.contains(a)) {
- m_animators.append(a);
- }
-}
-
-void QSGAbstractAnimator::unregisterAnimator(QSGAbstractAnimator *a)
-{
- m_animators.removeAll(a);
-}
-
-QSGAbstractAnimator* QSGAbstractAnimator::parent()
-{
- return m_parent;
-}
-
-void QSGAbstractAnimator::setParent(QSGAbstractAnimator *a)
-{
- m_parent = a;
-}
-
-
-QSGAbstractAnimation* QSGAbstractAnimator::qmlObject()
-{
- return m_qmlObject;
-}
-
-void QSGAbstractAnimator::setQmlObject(QSGAbstractAnimation* a)
-{
- m_qmlObject = a;
-}
-
-int QSGAbstractAnimator::startTime()
-{
- return m_startTime;
-}
-
-void QSGAbstractAnimator::setStartTime(int a)
-{
- m_startTime = a;
-}
-
-qreal QSGAbstractAnimator::elapsed()
-{
- return m_elapsed;
-}
-
-void QSGAbstractAnimator::setElapsed(qreal a)
-{
- m_elapsed = a;
-}
-
-int QSGAbstractAnimator::duration()
-{
- return m_duration;
-}
-
-void QSGAbstractAnimator::setDuration(int a)
-{
- m_duration = a;
-}
-
-int QSGAbstractAnimator::loops()
-{
- return m_loops;
-}
-
-void QSGAbstractAnimator::setLoops(int a)
-{
- m_loops = a;
-}
-
-bool QSGAbstractAnimator::running()
-{
- return m_running;
-}
-
-void QSGAbstractAnimator::setRunning(bool a)
-{
- m_running = a;
-}
-
-bool QSGAbstractAnimator::paused()
-{
- return m_paused;
-}
-
-void QSGAbstractAnimator::setPaused(bool a)
-{
- m_paused = a;
-}
-
-bool QSGAbstractAnimator::alwaysRunToEnd()
-{
- return m_alwaysRunToEnd;
-}
-
-void QSGAbstractAnimator::setAlwaysRunToEnd(bool a)
-{
- m_alwaysRunToEnd = a;
-}
-
-bool QSGAbstractAnimator::isActive()
-{
- if (m_running || m_runningToEnd)
- return true;
-
- bool childRunning = false;
-
- for (int i = 0; i < m_animators.count(); i++)
- childRunning |= m_animators.at(i)->isActive();
-
- return childRunning;
-}
-
-bool QSGAbstractAnimator::isUpdating()
-{
- if ((m_running && !m_paused) || m_runningToEnd)
- return true;
-
- bool childRunning = false;
-
- for (int i = 0; i < m_animators.count(); i++)
- childRunning |= m_animators.at(i)->isUpdating();
-
- return childRunning;
-}
diff --git a/animators/src/qsgabstractanimator.h b/animators/src/qsgabstractanimator.h
deleted file mode 100644
index aa8813a..0000000
--- a/animators/src/qsgabstractanimator.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATOR_H
-#define QSGANIMATOR_H
-
-#include <QtCore>
-
-class QSGAnimatorController;
-class QSGAbstractAnimation;
-
-class QSGAbstractAnimator
-{
-public:
- QSGAbstractAnimator();
- QSGAbstractAnimator(QSGAnimatorController *, QSGAbstractAnimator *, QSGAbstractAnimation *, qreal);
- virtual ~QSGAbstractAnimator();
-
- virtual void advance(qreal t = 0.0);
- virtual qreal sync(bool topLevelRunning, qreal startTime = 0.0);
-
- void registerAnimator(QSGAbstractAnimator *);
- void unregisterAnimator(QSGAbstractAnimator *);
-
- QSGAbstractAnimator* parent();
- void setParent(QSGAbstractAnimator *);
-
- QSGAbstractAnimation* qmlObject();
- void setQmlObject(QSGAbstractAnimation *);
-
- int startTime();
- void setStartTime(int);
-
- qreal elapsed();
- void setElapsed(qreal);
-
- int duration();
- void setDuration(int);
-
- int loops();
- void setLoops(int);
-
- bool running();
- void setRunning(bool);
-
- bool paused();
- void setPaused(bool);
-
- bool alwaysRunToEnd();
- void setAlwaysRunToEnd(bool);
-
- bool isActive();
- bool isUpdating();
-
-private:
- void copyQmlObjectData();
-
-protected:
- QSGAbstractAnimator *m_parent;
- QSGAnimatorController* m_controller;
- QList<QSGAbstractAnimator*> m_animators;
- int m_startTime;
- int m_stopTime;
- qreal m_elapsed;
- int m_duration;
- int m_loops;
- bool m_running;
- bool m_paused;
- bool m_alwaysRunToEnd;
- bool m_runningToEnd;
- bool m_hasControl;
- bool m_stopping;
- bool m_done;
-
-private:
- QSGAbstractAnimation *m_qmlObject;
-};
-
-#endif // QSGANIMATOR_H
diff --git a/animators/src/qsganimatedproperty.cpp b/animators/src/qsganimatedproperty.cpp
deleted file mode 100644
index 301a123..0000000
--- a/animators/src/qsganimatedproperty.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatedproperty.h"
-#include "qsganimatorcontroller.h"
-
-QSGAnimatedProperty::QSGAnimatedProperty() :
- m_qmlObject(0)
- , m_name("")
- , m_changed(false)
-{
-}
-
-QSGAnimatedProperty::QSGAnimatedProperty(QObject *qmlObject, QString name, QVariant value) :
- m_qmlObject(qmlObject)
- , m_name(name)
- , m_value(value)
- , m_changed(false)
-{
- if (m_qmlObject)
- m_value = m_qmlObject->property(m_name.toLatin1().constData());
-}
-
-QSGAnimatedProperty::~QSGAnimatedProperty()
-{
-}
-
-void QSGAnimatedProperty::setQmlObject(QObject *v)
-{
- m_qmlObject = v;
-}
-
-QObject *QSGAnimatedProperty::qmlObject()
-{
- return m_qmlObject;
-}
-
-void QSGAnimatedProperty::setValue(QVariant v)
-{
- m_value = v;
- m_changed = true;
-}
-
-QVariant QSGAnimatedProperty::value()
-{
- return m_value;
-}
-
-void QSGAnimatedProperty::setName(QString& name)
-{
- m_name = name;
-}
-
-QString QSGAnimatedProperty::name()
-{
- return m_name;
-}
-
-void QSGAnimatedProperty::setChanged(bool value)
-{
- m_changed = value;
-}
-
-bool QSGAnimatedProperty::changed()
-{
- return m_changed;
-}
-
-void QSGAnimatedProperty::sync()
-{
- if (!m_qmlObject)
- return;
-
- QString p = m_name;
- if (p.contains(".x")) {
- p = p.left(p.length() - 2);
- QVariant v = m_qmlObject->property(p.toLatin1().constData());
- if (v.isValid()) {
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_value = vec.x();
- qDebug() << m_name << " = " << m_value;
- }
- } else if (p.contains(".y")) {
- QVariant v = m_qmlObject->property(p.toLatin1().constData());
- if (v.isValid()) {
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_value = vec.y();
- qDebug() << m_name << " = " << m_value;
- }
- } else if (p.contains(".z")) {
- QVariant v = m_qmlObject->property(p.toLatin1().constData());
- if (v.isValid()) {
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_value = vec.z();
- qDebug() << m_name << " = " << m_value;
- }
- } else {
- m_value = m_qmlObject->property(m_name.toLatin1().constData());
- }
-
- m_changed = false;
-}
diff --git a/animators/src/qsganimatedproperty.h b/animators/src/qsganimatedproperty.h
deleted file mode 100644
index 42f19ff..0000000
--- a/animators/src/qsganimatedproperty.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATETPROPERTY_H
-#define QSGANIMATETPROPERTY_H
-
-#include <QtCore>
-
-class QSGAnimatorController;
-
-class QSGAnimatedProperty
-{
-public:
- QSGAnimatedProperty();
- QSGAnimatedProperty(QObject *, QString, QVariant);
- ~QSGAnimatedProperty();
-
- void setQmlObject(QObject *);
- QObject *qmlObject();
-
- void setName(QString&);
- QString name();
-
- void setValue(QVariant);
- QVariant value();
-
- void setChanged(bool);
- bool changed();
-
- void sync();
-
-private:
- QObject *m_qmlObject;
- QString m_name;
- QVariant m_value;
- bool m_changed;
-};
-
-#endif // QSGANIMATETPROPERTY_H
diff --git a/animators/src/qsganimatedrotation.cpp b/animators/src/qsganimatedrotation.cpp
deleted file mode 100644
index bb72153..0000000
--- a/animators/src/qsganimatedrotation.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatedrotation.h"
-#include "qsganimatedproperty.h"
-#include "qsganimatorcontroller.h"
-#include <QtGui>
-
-QSGAnimatedRotation::QSGAnimatedRotation(QSGAnimatorController* controller, QObject* qmlObject) : QSGAnimatedTransform(controller, qmlObject)
-{
- m_angle = new QSGAnimatedProperty(m_qmlObject, "angle", 0.0);
- m_axisX = new QSGAnimatedProperty(m_qmlObject, "axis.x", 0.0);
- m_axisY = new QSGAnimatedProperty(m_qmlObject, "axis.y", 0.0);
- m_axisZ = new QSGAnimatedProperty(m_qmlObject, "axis.z", 1.0);
- m_originX = new QSGAnimatedProperty(m_qmlObject, "origin.x", 0.0);
- m_originY = new QSGAnimatedProperty(m_qmlObject, "origin.y", 0.0);
-
- // controller takes owneship
- controller->registerProperty(m_angle);
- controller->registerProperty(m_axisX);
- controller->registerProperty(m_axisY);
- controller->registerProperty(m_axisZ);
- controller->registerProperty(m_originX);
- controller->registerProperty(m_originY);
-
- if (qmlObject) {
- setAngle(qmlObject->property("angle"));
- setAxis(qmlObject->property("axis"));
- setOrigin(qmlObject->property("origin"));
- }
-}
-
-void QSGAnimatedRotation::setAngle(QVariant v)
-{
- m_angle->setValue(v);
-}
-
-void QSGAnimatedRotation::setAxis(QVariant v)
-{
- if (v.isValid() && v.type() == QVariant::Vector3D){
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_axisX->setValue(vec.x());
- m_axisY->setValue(vec.y());
- m_axisZ->setValue(vec.z());
- }
-}
-
-void QSGAnimatedRotation::setAxisX(QVariant v)
-{
- m_axisX->setValue(v);
-}
-
-void QSGAnimatedRotation::setAxisY(QVariant v)
-{
- m_axisY->setValue(v);
-}
-
-void QSGAnimatedRotation::setAxisZ(QVariant v)
-{
- m_axisZ->setValue(v);
-}
-
-void QSGAnimatedRotation::setOrigin(QVariant v)
-{
- if (v.isValid() && v.type() == QVariant::Vector3D){
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_originX->setValue(vec.x());
- m_originY->setValue(vec.y());
- }
-}
-
-void QSGAnimatedRotation::setOriginX(QVariant v)
-{
- m_originX->setValue(v);
-}
-
-void QSGAnimatedRotation::setOriginY(QVariant v)
-{
- m_originY->setValue(v);
-}
-
-void QSGAnimatedRotation::applyTo(QMatrix4x4 &m)
-{
- m.translate(m_originX->value().toReal(), m_originY->value().toReal());
- m.rotate(m_angle->value().toReal(), m_axisX->value().toReal(), m_axisY->value().toReal(), m_axisZ->value().toReal());
- m.translate(-m_originX->value().toReal(), -m_originY->value().toReal());
-}
-
diff --git a/animators/src/qsganimatedrotation.h b/animators/src/qsganimatedrotation.h
deleted file mode 100644
index ff5c606..0000000
--- a/animators/src/qsganimatedrotation.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATEDROTATION_H
-#define QSGANIMATEDROTATION_H
-
-#include <QtCore>
-#include "qsganimatedtransform.h"
-
-class QSGAnimatedProperty;
-
-class QSGAnimatedRotation : public QSGAnimatedTransform
-{
-public:
- QSGAnimatedRotation(QSGAnimatorController *, QObject *);
- virtual void applyTo(QMatrix4x4 &);
- void setAngle(QVariant);
- void setAxis(QVariant);
- void setAxisX(QVariant);
- void setAxisY(QVariant);
- void setAxisZ(QVariant);
- void setOrigin(QVariant);
- void setOriginX(QVariant);
- void setOriginY(QVariant);
-
-private:
- QSGAnimatedProperty *m_angle;
- QSGAnimatedProperty *m_axisX;
- QSGAnimatedProperty *m_axisY;
- QSGAnimatedProperty *m_axisZ;
- QSGAnimatedProperty *m_originX;
- QSGAnimatedProperty *m_originY;
-};
-
-#endif // QSGANIMATEDROTATION_H
diff --git a/animators/src/qsganimatedscale.cpp b/animators/src/qsganimatedscale.cpp
deleted file mode 100644
index 549b0ec..0000000
--- a/animators/src/qsganimatedscale.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatedscale.h"
-#include "qsganimatedproperty.h"
-#include "qsganimatorcontroller.h"
-#include <QtGui>
-
-QSGAnimatedScale::QSGAnimatedScale(QSGAnimatorController* controller, QObject* qmlObject) : QSGAnimatedTransform(controller, qmlObject)
-{
- m_xScale = new QSGAnimatedProperty(m_qmlObject, "xScale", 1.0);
- m_yScale = new QSGAnimatedProperty(m_qmlObject, "yScale", 1.0);
- m_originX = new QSGAnimatedProperty(m_qmlObject, "origin.x", 0.0);
- m_originY = new QSGAnimatedProperty(m_qmlObject, "origin.y", 0.0);
-
- // controller takes ownership
- controller->registerProperty(m_xScale);
- controller->registerProperty(m_yScale);
- controller->registerProperty(m_originX);
- controller->registerProperty(m_originY);
-
- if (qmlObject) {
- setXScale(qmlObject->property("xScale"));
- setYScale(qmlObject->property("yScale"));
- setOrigin(qmlObject->property("origin"));
- }
-}
-
-void QSGAnimatedScale::setOrigin(QVariant v)
-{
- if (v.isValid() && v.type() == QVariant::Vector3D){
- QVector3D vec = qvariant_cast<QVector3D>(v);
- m_originX->setValue(vec.x());
- m_originY->setValue(vec.y());
- }
-}
-
-void QSGAnimatedScale::setXScale(QVariant v)
-{
- m_xScale->setValue(v);
-}
-
-void QSGAnimatedScale::setYScale(QVariant v)
-{
- m_yScale->setValue(v);
-}
-
-void QSGAnimatedScale::setOriginX(QVariant v)
-{
- m_originX->setValue(v);
-}
-
-void QSGAnimatedScale::setOriginY(QVariant v)
-{
- m_originY->setValue(v);
-}
-
-void QSGAnimatedScale::applyTo(QMatrix4x4 &m)
-{
- m.translate(m_originX->value().toReal(), m_originY->value().toReal());
- m.scale(m_xScale->value().toReal(), m_yScale->value().toReal());
- m.translate(-m_originX->value().toReal(), -m_originY->value().toReal());
-}
-
diff --git a/animators/src/qsganimatedscale.h b/animators/src/qsganimatedscale.h
deleted file mode 100644
index 9786a9e..0000000
--- a/animators/src/qsganimatedscale.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATEDSCALE_H
-#define QSGANIMATEDSCALE_H
-
-#include <QtCore>
-#include "qsganimatedtransform.h"
-
-class QSGAnimatedProperty;
-
-class QSGAnimatedScale : public QSGAnimatedTransform
-{
-public:
- QSGAnimatedScale(QSGAnimatorController *, QObject *);
- virtual void applyTo(QMatrix4x4 &);
- void setXScale(QVariant);
- void setYScale(QVariant);
- void setOrigin(QVariant);
- void setOriginX(QVariant);
- void setOriginY(QVariant);
-
-private:
- QSGAnimatedProperty *m_originX;
- QSGAnimatedProperty *m_originY;
- QSGAnimatedProperty *m_yScale;
- QSGAnimatedProperty *m_xScale;
-};
-
-#endif // QSGANIMATEDSCALE_H
diff --git a/animators/src/qsganimatedtransform.cpp b/animators/src/qsganimatedtransform.cpp
deleted file mode 100644
index f7eee31..0000000
--- a/animators/src/qsganimatedtransform.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatedtransform.h"
-#include "qsganimatedproperty.h"
-#include "qsganimatorcontroller.h"
-#include <QtGui>
-
-QSGAnimatedTransform::QSGAnimatedTransform(QSGAnimatorController* , QObject* qmlObject)
- : m_qmlObject(qmlObject)
-{
-}
-
-QSGAnimatedTransform::~QSGAnimatedTransform()
-{
-}
diff --git a/animators/src/qsganimatedtransform.h b/animators/src/qsganimatedtransform.h
deleted file mode 100644
index 4b50a5f..0000000
--- a/animators/src/qsganimatedtransform.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATEDTRANSFORM_H
-#define QSGANIMATEDTRANSFORM_H
-
-#include <QtCore>
-
-class QSGAnimatorController;
-
-class QSGAnimatedTransform
-{
-public:
- QSGAnimatedTransform(QSGAnimatorController *, QObject *);
- virtual ~QSGAnimatedTransform();
- virtual void applyTo(QMatrix4x4 &) = 0;
-
-protected:
- QObject *m_qmlObject;
-};
-
-
-#endif // QSGANIMATEDTRANSFORM_H
diff --git a/animators/src/qsganimatedtranslate.cpp b/animators/src/qsganimatedtranslate.cpp
deleted file mode 100644
index 24d9eac..0000000
--- a/animators/src/qsganimatedtranslate.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatedtranslate.h"
-#include "qsganimatedproperty.h"
-#include "qsganimatorcontroller.h"
-#include <QtGui>
-
-QSGAnimatedTranslate::QSGAnimatedTranslate(QSGAnimatorController* controller, QObject* qmlObject) : QSGAnimatedTransform(controller, qmlObject)
-{
- m_x = new QSGAnimatedProperty(m_qmlObject, "x", 0.0);
- m_y = new QSGAnimatedProperty(m_qmlObject, "y", 0.0);
-
- // controller takes owneship
- controller->registerProperty(m_x);
- controller->registerProperty(m_y);
-
- if (qmlObject) {
- setX(qmlObject->property("x"));
- setY(qmlObject->property("y"));
- }
-}
-
-void QSGAnimatedTranslate::setX(QVariant x)
-{
- m_x->setValue(x);
-}
-
-void QSGAnimatedTranslate::setY(QVariant y)
-{
- m_y->setValue(y);
-}
-
-void QSGAnimatedTranslate::applyTo(QMatrix4x4 &m)
-{
- m.translate(m_x->value().toReal(), m_y->value().toReal());
-}
diff --git a/animators/src/qsganimatedtranslate.h b/animators/src/qsganimatedtranslate.h
deleted file mode 100644
index 0c850e4..0000000
--- a/animators/src/qsganimatedtranslate.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATEDTRANSLATE_H
-#define QSGANIMATEDTRANSLATE_H
-
-#include <QtCore>
-#include "qsganimatedtransform.h"
-
-class QSGAnimatedProperty;
-
-class QSGAnimatedTranslate : public QSGAnimatedTransform
-{
-public:
- QSGAnimatedTranslate(QSGAnimatorController *, QObject *);
- virtual void applyTo(QMatrix4x4 &);
- void setX(QVariant);
- void setY(QVariant);
-
-private:
- QSGAnimatedProperty *m_x;
- QSGAnimatedProperty *m_y;
-};
-
-#endif // QSGANIMATEDTRANSLATE_H
diff --git a/animators/src/qsganimatorcontroller.cpp b/animators/src/qsganimatorcontroller.cpp
deleted file mode 100644
index 9588718..0000000
--- a/animators/src/qsganimatorcontroller.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsganimatorcontroller.h"
-#include "qsganimatoritem.h"
-#include "qsganimatedtranslate.h"
-#include "qsganimatedscale.h"
-#include "qsganimatedrotation.h"
-#include "qsgpropertyanimator.h"
-#include "qsgsequentialanimator.h"
-#include "qsgparallelanimator.h"
-#include "qsgpauseanimator.h"
-
-#include "qsgpropertyanimation.h"
-#include "qsgsequentialanimation.h"
-#include "qsgparallelanimation.h"
-#include "qsgpauseanimation.h"
-#include <QtQuick>
-#include <QtQuick/private/qquickitem_p.h>
-
-float get_env_float(const char *name, float defaultValue)
-{
- QByteArray content = qgetenv(name);
- bool ok = false;
- float value = content.toFloat(&ok);
- return ok ? value : defaultValue;
-}
-
-QSGAnimatorController::QSGAnimatorController(QQuickItem *item)
- : m_item(item)
- , m_initialized(false)
- , m_frameCounter(0)
- , m_stableVsync(0)
- , m_currentAnimationTime(0.0)
- , m_currentAnimationDelay(0)
- , m_currentAnimationCatchup(0)
- , m_thresholdForCatchup(250.0)
- , m_catchupRatio(0.05)
-
-{
- m_thresholdForCatchup = get_env_float("QML_ANIMATION_DRIVER_CATCHUP_THRESHOLD", 250);
- m_catchupRatio = get_env_float("QML_ANIMATION_DRIVER_CATCHUP_RATIO", 0.05);
-
-#ifdef ANIMATORS_DEBUG
- qDebug() << "QSGAnimatorController::QSGAnimatorController() VSYNC: " << m_stableVsync;
-#endif
-
- connect(item->window(), SIGNAL(beforeRendering()), SLOT(advance()),Qt::DirectConnection);
-}
-
-QSGAnimatorController::~QSGAnimatorController()
-{
- int tc = m_transform.count();
- for (int i = 0; i < tc; i++)
- delete m_transform.at(i);
-
- QList<QSGAnimatedProperty*> properties = m_registeredProperties.values();
- int pc = properties.count();
- for (int i = 0; i < pc; i++) {
- delete properties.at(i);
- }
-}
-
-bool QSGAnimatorController::isInitialized()
-{
- return m_initialized;
-}
-
-bool QSGAnimatorController::isUpdating()
-{
- return m_topLevelAnimator.isUpdating();
-}
-
-void QSGAnimatorController::advance()
-{
- qreal previousTime = m_currentAnimationTime;
- qint64 t = m_timer.elapsed();
-
- if (m_frameCounter == 0) {
- t = 0;
- m_timer.restart();
- m_currentAnimationTime = 0.0;
- previousTime = 0.0;
- m_frameCounter++;
- m_currentAnimationDelay = 0.0;
- m_currentAnimationCatchup = 0.0;
- }
-
- if (m_topLevelAnimator.isUpdating()) {
- if (m_stableVsync > 0) {
- m_currentAnimationTime += (m_stableVsync + m_currentAnimationCatchup);
- m_currentAnimationDelay -= m_currentAnimationCatchup;
-
- if (m_currentAnimationDelay < m_currentAnimationCatchup * 0.5) {
- m_currentAnimationDelay = 0.0;
- m_currentAnimationCatchup = 0.0;
- }
-
- if (m_currentAnimationTime < t) {
- m_currentAnimationDelay = t - m_currentAnimationTime;
- m_currentAnimationTime = qFloor((t / m_stableVsync) + 1) * m_stableVsync;
-
- if (m_currentAnimationDelay > m_thresholdForCatchup) {
- m_currentAnimationTime += m_currentAnimationDelay;
- m_currentAnimationDelay = 0.0;
- }
- m_currentAnimationCatchup = m_currentAnimationDelay * m_catchupRatio;
- }
-
- } else {
- m_currentAnimationTime = t;
- }
-
- m_topLevelAnimator.advance(m_currentAnimationTime - previousTime);
- } else {
- m_frameCounter = 0;
- }
-}
-
-void QSGAnimatorController::sync()
-{
- if (!m_initialized) {
- createProperties();
- m_initialized = true;
-
- if (m_topLevelAnimator.isUpdating())
- m_item->update();
-
- return;
- }
-
- // How to handle reading back property values from qml...
- // for now just avoid it when *any* animator is active.
- bool syncProperties = !m_topLevelAnimator.isActive();
-
- m_topLevelAnimator.sync(false, 0.0);
-
- if (syncProperties) {
- QList<QSGAnimatedProperty*> properties = m_registeredProperties.values();
- for (int i = 0; i < properties.count(); i++)
- properties.at(i)->sync();
- }
-
- if (m_topLevelAnimator.isUpdating())
- m_item->update();
-}
-
-void QSGAnimatorController::registerProperty(QSGAnimatedProperty *p)
-{
- QString key = QString::number((qint64)p->qmlObject()) + "_" + p->name();
-
- if (!m_registeredProperties.contains(key))
- m_registeredProperties.insert(key, p);
-
-}
-
-void QSGAnimatorController::unregisterProperty(QSGAnimatedProperty *p)
-{
- QString key = QString::number((quint64)p->qmlObject()) + "_" + p->name();
- m_registeredProperties.remove(key);
-}
-
-QSGAnimatedProperty *QSGAnimatorController::registeredProperty(QString name, QObject *o)
-{
- QObject* qmlObject = 0;
-
- if (o)
- qmlObject = o;
- else
- qmlObject = m_item;
-
- QString key = QString::number((quint64)qmlObject) + "_" + name;
- return m_registeredProperties.value(key);
-}
-
-QMatrix4x4 QSGAnimatorController::transformMatrix()
-{
- QMatrix4x4 m;
- int count = m_transform.count();
- for (int i = 0; i < count; i++) {
- m_transform.at(i)->applyTo(m);
- }
- return m;
-}
-
-void QSGAnimatorController::createProperties()
-{
- int propertyCount = m_item->metaObject()->propertyCount();
- for (int i = 0; i < propertyCount; i++) {
- QString name = m_item->metaObject()->property(i).name();
- QVariant v = m_item->property(name.toLatin1().constData());
- QSGAnimatedProperty *p = new QSGAnimatedProperty(m_item, name, v);
- registerProperty(p);
- }
-
- QQuickItemPrivate *o = QQuickItemPrivate::get(m_item);
-
- if (!o)
- return;
-
- QQmlListProperty<QQuickTransform> list = m_item->transform();
- int tc = o->transform_count(&list);
- for (int i = 0; i < tc; i++) {
- QQuickTransform *t = o->transform_at(&list, i);
-
- // Not possible to qobject_cast QQuickTransform (not exported), so we use metaobject.
- QString n = QString(t->metaObject()->className());
- if (n == "QQuickTranslate") {
- QSGAnimatedTranslate *tr = new QSGAnimatedTranslate(this, t);
- m_transform.append(tr);
- }
- else if (n == "QQuickScale") {
- QSGAnimatedScale *tr = new QSGAnimatedScale(this, t);
- m_transform.append(tr);
- }
- else if (n == "QQuickRotation") {
- QSGAnimatedRotation *tr = new QSGAnimatedRotation(this, t);
- m_transform.append(tr);
- }
- }
-}
-
-void QSGAnimatorController::registerAnimation(QSGAbstractAnimation *animation)
-{
- qreal duration = createAnimators(&m_topLevelAnimator, animation, false, 0.0);
- m_topLevelAnimator.setDuration(duration);
-}
-
-qreal QSGAnimatorController::createAnimators(QSGAbstractAnimator *controller, QObject *o, bool topLevelRunning, qreal startTime)
-{
- if (!o)
- return 0.0;
-
- QString n = QString(o->metaObject()->className());
- qreal duration = 0.0;
-
- if (n == "QSGPropertyAnimation" || n == "QSGNumberAnimation" || n == "QSGColorAnimation" || n == "QSGVector3DAnimation") {
- QSGPropertyAnimation *propertyAnimation = qobject_cast<QSGPropertyAnimation*> (o);
- QSGPropertyAnimator *animator = new QSGPropertyAnimator(this, controller, propertyAnimation, startTime);
- animator->setRunning(animator->running() || topLevelRunning);
- duration += propertyAnimation->duration();
- duration *= propertyAnimation->loops();
- QObject::connect(propertyAnimation, SIGNAL(runningChanged(bool)), m_item, SLOT(update()));
- QObject::connect(propertyAnimation, SIGNAL(pausedChanged(bool)), m_item, SLOT(update()));
- } else if (n == "QSGSequentialAnimation") {
- QSGAbstractAnimation *sequentialAnimation = qobject_cast<QSGAbstractAnimation*> (o);
- QSGSequentialAnimator *animator = new QSGSequentialAnimator(this, controller, sequentialAnimation, startTime);
- animator->setRunning(animator->running() || topLevelRunning);
- int count = sequentialAnimation->children().count();
- for (int i = 0; i < count; i++) {
- duration += createAnimators(animator, sequentialAnimation->children().at(i), sequentialAnimation->isRunning() || topLevelRunning, startTime + duration);
- }
- animator->setDuration(duration);
- duration *= sequentialAnimation->loops();
- QObject::connect(sequentialAnimation, SIGNAL(runningChanged(bool)), m_item, SLOT(update()));
- QObject::connect(sequentialAnimation, SIGNAL(pausedChanged(bool)), m_item, SLOT(update()));
- } else if (n == "QSGParallelAnimation") {
- QSGParallelAnimation *parallelAnimation = qobject_cast<QSGParallelAnimation*> (o);
- QSGParallelAnimator *animator = new QSGParallelAnimator(this, controller, parallelAnimation, startTime);
- animator->setRunning(animator->running() || topLevelRunning);
- int count = parallelAnimation->children().count();
- for (int i = 0; i < count; i++) {
- qreal childAnimationDuration = createAnimators(animator, parallelAnimation->children().at(i), parallelAnimation->isRunning() || topLevelRunning, startTime);
- duration = qMax(duration, childAnimationDuration);
- }
- animator->setDuration(duration);
- duration *= parallelAnimation->loops();
- QObject::connect(parallelAnimation, SIGNAL(runningChanged(bool)), m_item, SLOT(update()));
- QObject::connect(parallelAnimation, SIGNAL(pausedChanged(bool)), m_item, SLOT(update()));
- } else if (n == "QSGPauseAnimation") {
- QSGPauseAnimation *pauseAnimation = qobject_cast<QSGPauseAnimation*> (o);
- QSGPauseAnimator *animator = new QSGPauseAnimator(this, controller, pauseAnimation, startTime);
- animator->setRunning(animator->running() || topLevelRunning);
- duration = pauseAnimation->duration();
- duration *= pauseAnimation->loops();
- QObject::connect(pauseAnimation, SIGNAL(runningChanged(bool)), m_item, SLOT(update()));
- QObject::connect(pauseAnimation, SIGNAL(pausedChanged(bool)), m_item, SLOT(update()));
- }
- return duration;
-}
-
-QQuickItem* QSGAnimatorController::item()
-{
- return m_item;
-}
diff --git a/animators/src/qsganimatorcontroller.h b/animators/src/qsganimatorcontroller.h
deleted file mode 100644
index 90be604..0000000
--- a/animators/src/qsganimatorcontroller.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATORCONTROLLER_H
-#define QSGANIMATORCONTROLLER_H
-
-#include "qsgtoplevelanimator.h"
-#include "qsganimatedtransform.h"
-#include "qsganimatedproperty.h"
-
-class QQuickItem;
-
-class QSGAnimatorController : public QObject
-{
- Q_OBJECT
-public:
- QSGAnimatorController(QQuickItem *);
- ~QSGAnimatorController();
-
- void sync();
-
- void registerProperty(QSGAnimatedProperty *);
- void unregisterProperty(QSGAnimatedProperty *);
- QSGAnimatedProperty *registeredProperty(QString, QObject *o = 0);
-
- bool isInitialized();
- bool isUpdating();
- QMatrix4x4 transformMatrix();
-
- void registerAnimation(QSGAbstractAnimation *);
- QQuickItem* item();
-
-public Q_SLOTS:
- void advance();
-
-private:
- void createProperties();
- qreal createAnimators(QSGAbstractAnimator *, QObject *, bool, qreal);
-
-private:
- QQuickItem *m_item;
- QList<QSGAnimatedTransform*> m_transform;
- bool m_initialized;
- QSGTopLevelAnimator m_topLevelAnimator;
- QElapsedTimer m_timer;
- int m_frameCounter;
- qreal m_stableVsync;
- qreal m_currentAnimationTime;
- qreal m_currentAnimationDelay;
- qreal m_currentAnimationCatchup;
- qreal m_thresholdForCatchup;
- qreal m_catchupRatio;
- QHash<QString, QSGAnimatedProperty*> m_registeredProperties;
-};
-
-#endif
diff --git a/animators/src/qsganimatorhost.h b/animators/src/qsganimatorhost.h
deleted file mode 100644
index e3991e8..0000000
--- a/animators/src/qsganimatorhost.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATORHOST_H
-#define QSGANIMATORHOST_H
-
-class QSGAnimatorHost
-{
-public:
- virtual void registerAnimation(QSGAbstractAnimation *) = 0;
-};
-
-
-#endif // QSGANIMATORHOST_H
diff --git a/animators/src/qsganimatoritem.cpp b/animators/src/qsganimatoritem.cpp
deleted file mode 100644
index 0f239ef..0000000
--- a/animators/src/qsganimatoritem.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsganimatoritem.h"
-#include "qsganimatorcontroller.h"
-#include "qsganimatornode.h"
-#include "qsgabstractanimation.h"
-#include <QtQuick/QQuickItem>
-#include <QDebug>
-
-QSGAnimatorItem::QSGAnimatorItem(QQuickItem *parent)
- : QQuickItem(parent)
- , m_animatorNode(0)
-{
- setFlag(ItemHasContents);
-}
-
-QSGAnimatorItem::~QSGAnimatorItem()
-{
-}
-
-QSGNode *QSGAnimatorItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
-{
- QSGTransformNode *transformNode = static_cast<QSGTransformNode*>(QQuickItemPrivate::get(this)->itemNode());
- QSGOpacityNode *opacityNode = static_cast<QSGOpacityNode*>(QQuickItemPrivate::get(this)->opacityNode());
-
- if (!node) {
- m_animatorNode = new QSGAnimatorNode(this);
- m_animatorNode->setFlag(QSGNode::UsePreprocess, true);
- }
-
- if (m_animatorNode) {
- for (int i = 0; i < m_pendingAnimations.count(); i++) {
- QSGAbstractAnimation *a = m_pendingAnimations.at(i);
- m_animatorNode->controller().registerAnimation(a);
- m_registeredAnimations.append(a);
- }
- m_pendingAnimations.clear();
-
- m_animatorNode->controller().sync();
- m_animatorNode->setTransformNode(transformNode);
- m_animatorNode->setOpacityNode(opacityNode);
- }
-
- return m_animatorNode;
-}
-
-void QSGAnimatorItem::registerAnimation(QSGAbstractAnimation *a)
-{
- if (!m_registeredAnimations.contains(a) && !m_pendingAnimations.contains(a))
- m_pendingAnimations.append(a);
-
- update();
-}
diff --git a/animators/src/qsganimatoritem.h b/animators/src/qsganimatoritem.h
deleted file mode 100644
index 6423b5e..0000000
--- a/animators/src/qsganimatoritem.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATORITEM_H
-#define QSGANIMATORITEM_H
-
-#include <QtQuick/QQuickItem>
-#include "qsganimatorcontroller.h"
-#include "qsganimatorhost.h"
-
-class QSGAnimatorNode;
-class QSGAnimatorController;
-
-class QSGAnimatorItem : public QQuickItem, public QSGAnimatorHost
-{
- Q_OBJECT
-public:
- QSGAnimatorItem(QQuickItem *parent = 0);
- ~QSGAnimatorItem();
-
- virtual void registerAnimation(QSGAbstractAnimation *);
-
-protected:
- virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
-
-private:
- QSGAnimatorNode *m_animatorNode;
- QList<QSGAbstractAnimation*> m_pendingAnimations;
- QList<QSGAbstractAnimation*> m_registeredAnimations;
- Q_DISABLE_COPY(QSGAnimatorItem)
-};
-
-#endif // QSGANIMATORITEM_H
diff --git a/animators/src/qsganimatornode.cpp b/animators/src/qsganimatornode.cpp
deleted file mode 100644
index fd522af..0000000
--- a/animators/src/qsganimatornode.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatornode.h"
-#include "qsganimatorcontroller.h"
-
-#define MIN_OPACITY 0.001
-#define MAX_OPACITY 0.999
-
-QSGAnimatorNode::QSGAnimatorNode(QQuickItem *item)
- : m_item(item)
- , m_controller(0)
- , m_transformNode(0)
- , m_opacityNode(0)
-{
- m_controller = new QSGAnimatorController(item);
-}
-
-QSGAnimatorNode::~QSGAnimatorNode()
-{
- delete m_controller;
-}
-
-void QSGAnimatorNode::setTransformNode(QSGTransformNode *n)
-{
- m_transformNode = n;
-}
-
-void QSGAnimatorNode::setOpacityNode(QSGOpacityNode *n)
-{
- m_opacityNode = n;
-}
-
-void QSGAnimatorNode::preprocess()
-{
- QSGNode::preprocess();
- if (m_controller->isInitialized()) {
- if (m_transformNode) {
- qreal x = m_controller->registeredProperty("x")->value().toReal();
- qreal y = m_controller->registeredProperty("y")->value().toReal();
- QMatrix4x4 m = m_controller->transformMatrix();
- QPointF transformOrigin = m_controller->registeredProperty("transformOriginPoint")->value().toPointF();
- qreal scale = m_controller->registeredProperty("scale")->value().toReal();
- qreal rotation = m_controller->registeredProperty("rotation")->value().toReal();
- m.translate(transformOrigin.x(), transformOrigin.y());
- m.translate(x, y);
- m.scale(scale);
- m.rotate(rotation, 0, 0, 1);
- m.translate(-transformOrigin.x(), -transformOrigin.y());
- m_transformNode->setMatrix(m);
-
- if (m_controller->isUpdating())
- m_transformNode->markDirty(QSGNode::DirtyMatrix);
- }
-
- if (m_opacityNode) {
- qreal opacity = m_controller->registeredProperty("opacity")->value().toReal();
- m_opacityNode->setOpacity(qMin(qreal(MAX_OPACITY), qMax(qreal(MIN_OPACITY), opacity)));
-
- if (m_controller->isUpdating())
- m_opacityNode->markDirty(QSGNode::DirtyOpacity);
- }
- }
-}
-
-QSGAnimatorController& QSGAnimatorNode::controller()
-{
- return *m_controller;
-}
-
diff --git a/animators/src/qsganimatornode.h b/animators/src/qsganimatornode.h
deleted file mode 100644
index 28a5cb3..0000000
--- a/animators/src/qsganimatornode.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATORNODE_H
-#define QSGANIMATORNODE_H
-
-#include <QtQuick/private/qquickitem_p.h>
-
-class QSGAnimatorController;
-
-class QSGAnimatorNode : public QSGNode
-{
-public:
- QSGAnimatorNode(QQuickItem *item);
- ~QSGAnimatorNode();
- virtual void preprocess();
- QSGAnimatorController& controller();
- void setTransformNode(QSGTransformNode *);
- void setOpacityNode(QSGOpacityNode *);
-
-protected:
- QQuickItem *m_item;
- QSGAnimatorController *m_controller;
- QSGTransformNode *m_transformNode;
- QSGOpacityNode *m_opacityNode;
-};
-
-#endif // QSGANIMATORNODE_H
diff --git a/animators/src/qsganimatorplugin.cpp b/animators/src/qsganimatorplugin.cpp
deleted file mode 100644
index 947339c..0000000
--- a/animators/src/qsganimatorplugin.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include <QtQml/qqmlextensionplugin.h>
-#include "qsganimatoritem.h"
-#include "qsganimatorshadereffect.h"
-#include "qsgpauseanimation.h"
-#include "qsgpropertyanimation.h"
-#include "qsgsequentialanimation.h"
-#include "qsgparallelanimation.h"
-#include "qsgnumberanimation.h"
-#include "qsgcoloranimation.h"
-#include "qsgvector3danimation.h"
-
-class QSGAnimatorPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
-public:
- virtual void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("Animators"));
- Q_UNUSED(uri);
- qmlRegisterType<QSGAnimatorItem>(uri, 1, 0, "Item");
- qmlRegisterType<QSGAnimatorShaderEffect>(uri, 1, 0, "ShaderEffect");
- qmlRegisterType<QSGPauseAnimation>(uri, 1, 0, "PauseAnimation");
- qmlRegisterType<QSGPropertyAnimation>(uri, 1, 0, "PropertyAnimation");
- qmlRegisterType<QSGColorAnimation>(uri, 1, 0, "ColorAnimation");
- qmlRegisterType<QSGNumberAnimation>(uri, 1, 0, "NumberAnimation");
- qmlRegisterType<QSGVector3DAnimation>(uri, 1, 0, "Vector3DAnimation");
- qmlRegisterType<QSGSequentialAnimation>(uri, 1, 0, "SequentialAnimation");
- qmlRegisterType<QSGParallelAnimation>(uri, 1, 0, "ParallelAnimation");
- }
-};
-
-#include "qsganimatorplugin.moc"
diff --git a/animators/src/qsganimatorshadereffect.cpp b/animators/src/qsganimatorshadereffect.cpp
deleted file mode 100644
index b392bc5..0000000
--- a/animators/src/qsganimatorshadereffect.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsganimatorshadereffect.h"
-#include "qsganimatornode.h"
-
-class QSGShaderEffectAnimatorNode : public QSGAnimatorNode
-{
-public:
- QSGShaderEffectAnimatorNode(QSGAnimatorShaderEffect *item)
- : QSGAnimatorNode(item)
- , m_shaderEffectNode(0)
- {
- }
-
- ~QSGShaderEffectAnimatorNode()
- {
- }
-
- void preprocess()
- {
- QSGAnimatorNode::preprocess();
- if (m_controller->isInitialized()) {
- QQuickShaderEffectMaterial *material = static_cast<QQuickShaderEffectMaterial *>(m_shaderEffectNode->material());
-
- for (int shaderType = 0; shaderType < Key::ShaderTypeCount; ++shaderType) {
- for (int i = 0; i < material->uniforms[shaderType].size(); ++i) {
- QQuickShaderEffectMaterial::UniformData &d = material->uniforms[shaderType][i];
- QSGAnimatedProperty *ap = m_controller->registeredProperty(d.name);
- if (ap) d.value = ap->value();
- }
- }
-
- m_shaderEffectNode->markDirty(QSGNode::DirtyMaterial);
- }
- }
-
- void setShaderEffectNode(QQuickShaderEffectNode *n)
- {
- m_shaderEffectNode = n;
- }
-
-private:
- typedef QQuickShaderEffectMaterialKey Key;
- QQuickShaderEffectNode *m_shaderEffectNode;
-};
-
-QSGAnimatorShaderEffect::QSGAnimatorShaderEffect(QQuickItem *parent)
- : QQuickShaderEffect(parent)
- , m_animatorNode(0)
-{
- setFlag(ItemHasContents);
-}
-
-QSGAnimatorShaderEffect::~QSGAnimatorShaderEffect()
-{
-}
-
-QSGNode *QSGAnimatorShaderEffect::updatePaintNode(QSGNode *node, UpdatePaintNodeData *data)
-{
- QSGTransformNode *transformNode = static_cast<QSGTransformNode*>(QQuickItemPrivate::get(this)->itemNode());
- QSGOpacityNode *opacityNode = static_cast<QSGOpacityNode*>(QQuickItemPrivate::get(this)->opacityNode());
- m_shaderEffectNode = static_cast<QQuickShaderEffectNode*>(QQuickShaderEffect::updatePaintNode(node, data));
-
- if (!node) {
- if (m_shaderEffectNode) {
- m_animatorNode = new QSGShaderEffectAnimatorNode(this);
- m_animatorNode->setFlag(QSGNode::UsePreprocess, true);
- m_shaderEffectNode->appendChildNode(m_animatorNode);
- }
- }
-
- if (m_animatorNode) {
- for (int i = 0; i < m_pendingAnimations.count(); i++) {
- QSGAbstractAnimation *a = m_pendingAnimations.at(i);
- m_animatorNode->controller().registerAnimation(a);
- m_registeredAnimations.append(a);
- }
- m_pendingAnimations.clear();
-
- m_animatorNode->controller().sync();
- m_animatorNode->setTransformNode(transformNode);
- m_animatorNode->setOpacityNode(opacityNode);
- m_animatorNode->setShaderEffectNode(m_shaderEffectNode);
- }
-
- return m_shaderEffectNode;
-}
-
-void QSGAnimatorShaderEffect::registerAnimation(QSGAbstractAnimation *a)
-{
- if (!m_registeredAnimations.contains(a) && !m_pendingAnimations.contains(a))
- m_pendingAnimations.append(a);
-
- update();
-}
diff --git a/animators/src/qsganimatorshadereffect.h b/animators/src/qsganimatorshadereffect.h
deleted file mode 100644
index eea13e8..0000000
--- a/animators/src/qsganimatorshadereffect.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGANIMATORSHADEREFFECT_H
-#define QSGANIMATORSHADEREFFECT_H
-
-#include <QSGNode>
-#include <QtQuick/private/qquickshadereffect_p.h>
-#include <QtQuick/private/qquickshadereffectnode_p.h>
-#include "qsganimatorcontroller.h"
-#include "qsganimatorhost.h"
-
-class QSGShaderEffectAnimatorNode;
-
-class QSGAnimatorShaderEffect : public QQuickShaderEffect, public QSGAnimatorHost
-{
- Q_OBJECT
-public:
- QSGAnimatorShaderEffect(QQuickItem *parent = 0);
- ~QSGAnimatorShaderEffect();
-
- virtual void registerAnimation(QSGAbstractAnimation *);
-
-protected:
- virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
-
-private:
- QList<QSGAbstractAnimation*> m_pendingAnimations;
- QList<QSGAbstractAnimation*> m_registeredAnimations;
- QQuickShaderEffectNode *m_shaderEffectNode;
- QSGShaderEffectAnimatorNode *m_animatorNode;
- Q_DISABLE_COPY(QSGAnimatorShaderEffect)
-};
-
-#endif // QSGANIMATORSHADEREFFECT_H
diff --git a/animators/src/qsgcoloranimation.cpp b/animators/src/qsgcoloranimation.cpp
deleted file mode 100644
index 0eb09a4..0000000
--- a/animators/src/qsgcoloranimation.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgcoloranimation.h"
-
-QSGColorAnimation::QSGColorAnimation(QObject *parent)
- : QSGPropertyAnimation(parent)
-{
-}
-
-QColor QSGColorAnimation::from()
-{
- return qvariant_cast<QColor>(QSGPropertyAnimation::from());
-}
-
-void QSGColorAnimation::setFrom(QColor a)
-{
- QSGPropertyAnimation::setFrom(a);
-}
-
-QColor QSGColorAnimation::to()
-{
- return qvariant_cast<QColor>(QSGPropertyAnimation::to());
-}
-
-void QSGColorAnimation::setTo(QColor a)
-{
- QSGPropertyAnimation::setTo(a);
-}
diff --git a/animators/src/qsgcoloranimation.h b/animators/src/qsgcoloranimation.h
deleted file mode 100644
index 39f2243..0000000
--- a/animators/src/qsgcoloranimation.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGCOLORANIMATION_H
-#define QSGCOLORANIMATION_H
-
-#include "qsgpropertyanimation.h"
-
-class QSGColorAnimation : public QSGPropertyAnimation
-{
- Q_OBJECT
-
- Q_PROPERTY(QColor from READ from WRITE setFrom)
- Q_PROPERTY(QColor to READ to WRITE setTo)
-
-public:
- QSGColorAnimation(QObject *parent = 0);
-
- QColor from();
- void setFrom(QColor);
-
- QColor to();
- void setTo(QColor);
-
-private:
- Q_DISABLE_COPY(QSGColorAnimation)
-};
-
-#endif // QSGCOLORANIMATION_H
diff --git a/animators/src/qsgnumberanimation.cpp b/animators/src/qsgnumberanimation.cpp
deleted file mode 100644
index 4848221..0000000
--- a/animators/src/qsgnumberanimation.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgnumberanimation.h"
-#include <QDebug>
-
-QSGNumberAnimation::QSGNumberAnimation(QObject *parent)
- : QSGPropertyAnimation(parent)
-{
-}
-
-qreal QSGNumberAnimation::from()
-{
- return QSGPropertyAnimation::from().toReal();
-}
-
-void QSGNumberAnimation::setFrom(qreal a)
-{
- QSGPropertyAnimation::setFrom(a);
-}
-
-qreal QSGNumberAnimation::to()
-{
- return QSGPropertyAnimation::to().toReal();
-}
-
-void QSGNumberAnimation::setTo(qreal a)
-{
- QSGPropertyAnimation::setTo(a);
-}
diff --git a/animators/src/qsgnumberanimation.h b/animators/src/qsgnumberanimation.h
deleted file mode 100644
index 9f46b7b..0000000
--- a/animators/src/qsgnumberanimation.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGNUMBERANIMATION_H
-#define QSGNUMBERANIMATION_H
-
-#include "qsgpropertyanimation.h"
-
-class QSGNumberAnimation : public QSGPropertyAnimation
-{
- Q_OBJECT
-
- Q_PROPERTY(qreal from READ from WRITE setFrom)
- Q_PROPERTY(qreal to READ to WRITE setTo)
-
-public:
- QSGNumberAnimation(QObject *parent = 0);
-
- qreal from();
- void setFrom(qreal);
-
- qreal to();
- void setTo(qreal);
-
-private:
- Q_DISABLE_COPY(QSGNumberAnimation)
-};
-
-#endif // QSGNUMBERANIMATION_H
diff --git a/animators/src/qsgparallelanimation.cpp b/animators/src/qsgparallelanimation.cpp
deleted file mode 100644
index 8546d2c..0000000
--- a/animators/src/qsgparallelanimation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgparallelanimation.h"
-#include <private/qpauseanimationjob_p.h>
-
-QSGParallelAnimation::QSGParallelAnimation(QObject *parent)
- : QSGAbstractAnimation(parent)
-{
- connect(this, SIGNAL(runningChanged(bool)), SLOT(prepare(bool)));
-}
-
-void QSGParallelAnimation::prepare(bool v)
-{
- int count = children().count();
- for (int i = 0; i < count; i++) {
- QSGAbstractAnimation *a = qobject_cast<QSGAbstractAnimation*>(children().at(i));
- if (a)
- a->prepare(v);
- }
-}
-
-QAbstractAnimationJob* QSGParallelAnimation::transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- if (!isRunning())
- m_transitionRunning = true;
-
- prepareTransition(actions, modified, direction, defaultTarget);
-
- QPauseAnimationJob *job = new QPauseAnimationJob();
- job->setLoopCount(loops());
- job->setDuration(-1);
- return job;
-}
-
-void QSGParallelAnimation::prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- if (direction != Forward)
- qWarning("QSGParallelAnimation::prepareTransition - Backward transition not yet supported.");
-
- if (actions.count() > 0) {
- registerToHost(actions.at(0).property.object());
- }
-
- int count = children().count();
- for (int i = 0; i < count; i++) {
- QSGAbstractAnimation* a = dynamic_cast<QSGAbstractAnimation*> (children().at(i));
- if (a)
- a->prepareTransition(actions, modified, direction, defaultTarget);
- }
-}
diff --git a/animators/src/qsgparallelanimation.h b/animators/src/qsgparallelanimation.h
deleted file mode 100644
index a2a82c3..0000000
--- a/animators/src/qsgparallelanimation.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGPARALLELANIMATION_H
-#define QSGPARALLELANIMATION_H
-
-#include "qsgabstractanimation.h"
-
-class QSGParallelAnimation : public QSGAbstractAnimation
-{
- Q_OBJECT
-public:
- QSGParallelAnimation(QObject *parent = 0);
- virtual QAbstractAnimationJob* transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget = 0);
-
- void prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget);
-
-public Q_SLOTS:
- virtual void prepare(bool);
-
-private:
- Q_DISABLE_COPY(QSGParallelAnimation)
-
-};
-
-#endif // QSGPARALLELANIMATION_H
diff --git a/animators/src/qsgparallelanimator.cpp b/animators/src/qsgparallelanimator.cpp
deleted file mode 100644
index 9755f4f..0000000
--- a/animators/src/qsgparallelanimator.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgparallelanimator.h"
-#include "qsgparallelanimation.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGParallelAnimator::QSGParallelAnimator(QSGAnimatorController* controller, QSGAbstractAnimator *parent, QSGParallelAnimation *qmlObject, qreal startTime)
- : QSGAbstractAnimator(controller, parent, qmlObject, startTime)
-{
-}
-
-void QSGParallelAnimator::advance(qreal t)
-{
- if ((!m_running || m_paused) && !m_runningToEnd)
- return;
-
- QSGAbstractAnimator::advance(t);
-
- if (m_elapsed > m_startTime && ((m_elapsed < m_startTime + m_loops * m_duration) || (m_loops < 0))) {
- qreal tx = int(m_elapsed - m_startTime) % int(m_duration);
- for (int i = 0; i < m_animators.count(); i++) {
- m_animators.at(i)->setElapsed(tx);
- m_animators.at(i)->advance();
- }
- }
-}
-
-qreal QSGParallelAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- QSGAbstractAnimator::sync(topLevelRunning, startTime);
- qreal duration = 0.0;
-
- for (int i = 0; i < m_animators.count(); i++) {
- qreal childAnimationDuration = m_animators.at(i)->sync(topLevelRunning || (m_running && !m_paused) || m_runningToEnd, startTime);
- duration = qMax(duration, childAnimationDuration);
- }
-
- duration *= m_loops;
- return duration;
-}
diff --git a/animators/src/qsgparallelanimator.h b/animators/src/qsgparallelanimator.h
deleted file mode 100644
index f0ee29c..0000000
--- a/animators/src/qsgparallelanimator.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGPARALLELANIMATOR_H
-#define QSGPARALLELANIMATOR_H
-
-#include "qsgabstractanimator.h"
-
-class QSGPropertyController;
-class QSGParallelAnimation;
-
-class QSGParallelAnimator : public QSGAbstractAnimator
-{
-public:
- QSGParallelAnimator(QSGAnimatorController *, QSGAbstractAnimator *, QSGParallelAnimation *, qreal);
-
- virtual void advance(qreal);
- virtual qreal sync(bool, qreal startTime = 0.0);
-};
-
-#endif // QSGPARALLELANIMATOR_H
diff --git a/animators/src/qsgpauseanimation.cpp b/animators/src/qsgpauseanimation.cpp
deleted file mode 100644
index 47335d3..0000000
--- a/animators/src/qsgpauseanimation.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgpauseanimation.h"
-#include <private/qpauseanimationjob_p.h>
-
-QSGPauseAnimation::QSGPauseAnimation(QObject* parent)
- : QSGAbstractAnimation(parent)
-{
-}
-
-int QSGPauseAnimation::duration()
-{
- return m_duration;
-}
-
-void QSGPauseAnimation::setDuration(int a)
-{
- if (m_duration != a) {
- m_duration = a;
- emit durationChanged(m_duration);
- }
-}
-
-QAbstractAnimationJob* QSGPauseAnimation::transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- prepareTransition(actions, modified, direction, defaultTarget);
-
- QPauseAnimationJob *job = new QPauseAnimationJob();
- job->setLoopCount(loops());
- job->setDuration(m_duration);
- return job;
-}
-
-void QSGPauseAnimation::prepareTransition(QQuickStateActions &,
- QQmlProperties &,
- TransitionDirection,
- QObject *)
-{
- // Nothing to do
-}
diff --git a/animators/src/qsgpauseanimation.h b/animators/src/qsgpauseanimation.h
deleted file mode 100644
index 9ccf6ed..0000000
--- a/animators/src/qsgpauseanimation.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGPAUSEANIMATION_H
-#define QSGPAUSEANIMATION_H
-
-#include "qsgabstractanimation.h"
-
-class QSGPauseAnimation : public QSGAbstractAnimation
-{
- Q_OBJECT
- Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
-
-public:
- QSGPauseAnimation(QObject *parent = 0);
- int duration();
- void setDuration(int);
-
- virtual QAbstractAnimationJob* transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget = 0);
-
- void prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget);
-Q_SIGNALS:
- void durationChanged(int);
-
-private:
- int m_duration;
- Q_DISABLE_COPY(QSGPauseAnimation)
-};
-
-#endif // QSGPAUSEANIMATION_H
diff --git a/animators/src/qsgpauseanimator.cpp b/animators/src/qsgpauseanimator.cpp
deleted file mode 100644
index 8a79758..0000000
--- a/animators/src/qsgpauseanimator.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgpauseanimator.h"
-#include "qsgpauseanimation.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGPauseAnimator::QSGPauseAnimator(QSGAnimatorController* controller, QSGAbstractAnimator *parent, QSGPauseAnimation *qmlObject, qreal startTime)
- : QSGAbstractAnimator(controller, parent, qmlObject, startTime)
- , m_qmlObject(qmlObject)
-{
- if (m_qmlObject)
- m_duration = m_qmlObject->duration();
-}
-
-void QSGPauseAnimator::advance(qreal t)
-{
- QSGAbstractAnimator::advance(t);
-}
-
-qreal QSGPauseAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- QSGAbstractAnimator::sync(topLevelRunning, startTime);
-
- if (m_qmlObject)
- m_duration = m_qmlObject->duration();
-
- return m_duration * m_loops;
-}
diff --git a/animators/src/qsgpauseanimator.h b/animators/src/qsgpauseanimator.h
deleted file mode 100644
index bae07ff..0000000
--- a/animators/src/qsgpauseanimator.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGPAUSEANIMATOR_H
-#define QSGPAUSEANIMATOR_H
-
-#include "qsgabstractanimator.h"
-
-class QSGPropertyController;
-class QSGPauseAnimation;
-
-class QSGPauseAnimator : public QSGAbstractAnimator
-{
-public:
- QSGPauseAnimator(QSGAnimatorController *, QSGAbstractAnimator *, QSGPauseAnimation *, qreal);
-
- virtual void advance(qreal);
- virtual qreal sync(bool, qreal startTime = 0.0);
-
-private:
- QSGPauseAnimation *m_qmlObject;
-};
-
-
-#endif // QSGPAUSEANIMATOR_H
diff --git a/animators/src/qsgpropertyanimation.cpp b/animators/src/qsgpropertyanimation.cpp
deleted file mode 100644
index acad77a..0000000
--- a/animators/src/qsgpropertyanimation.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgpropertyanimation.h"
-#include <private/qpauseanimationjob_p.h>
-
-#define MIN_OPACITY 0.001
-#define MAX_OPACITY 0.999
-
-QSGPropertyAnimation::QSGPropertyAnimation(QObject *parent)
- : QSGAbstractAnimation(parent)
- , m_duration(0)
- , m_from(0)
- , m_to(0)
- , m_target(0)
-{
- connect(this, SIGNAL(runningChanged(bool)), SLOT(prepare(bool)));
-}
-
-int QSGPropertyAnimation::duration()
-{
- return m_duration;
-}
-
-void QSGPropertyAnimation::setDuration(int a)
-{
- if (m_duration != a) {
- m_duration = a;
- emit durationChanged(m_duration);
- }
-}
-
-QVariant QSGPropertyAnimation::from()
-{
- return m_from;
-}
-
-void QSGPropertyAnimation::setFrom(QVariant a)
-{
- if (m_from != a) {
- m_from = a;
- emit fromChanged(m_from);
- }
-}
-
-QVariant QSGPropertyAnimation::to()
-{
- return m_to;
-}
-
-void QSGPropertyAnimation::setTo(QVariant a)
-{
- if (m_to != a) {
- m_to = a;
- emit toChanged(m_to);
- }
-}
-
-const QEasingCurve& QSGPropertyAnimation::easing()
-{
- return m_easing;
-}
-
-void QSGPropertyAnimation::setEasing(const QEasingCurve& a)
-{
- if (m_easing != a) {
- m_easing = a;
- emit easingChanged(m_easing);
- }
-}
-
-QObject* QSGPropertyAnimation::target()
-{
- return m_target;
-}
-
-void QSGPropertyAnimation::setTarget(QObject* a)
-{
- if (m_target != a) {
- m_target = a;
- emit targetChanged();
- }
-}
-
-const QString& QSGPropertyAnimation::property()
-{
- return m_property;
-}
-
-void QSGPropertyAnimation::setProperty(QString a)
-{
- if (m_property != a) {
- m_property = a;
- emit propertyChanged();
- }
-}
-
-const QString& QSGPropertyAnimation::properties()
-{
- return m_properties;
-}
-
-void QSGPropertyAnimation::setProperties(QString a)
-{
- if (m_properties != a) {
- m_properties = a;
- emit propertiesChanged();
- }
-}
-
-void QSGPropertyAnimation::complete()
-{
- if (m_target) {
- QVariant v = m_to;
- QString p = m_property;
-
- int index = m_property.indexOf(".");
- if (index > 0)
- p.chop(m_property.length() - index);
-
- QVariant value = m_target->property(p.toLatin1().constData());
-
- switch (value.type()) {
- case QMetaType::QVector3D:
- {
- if (m_property.contains(".x")) {
- QVector3D vec = qvariant_cast<QVector3D>(value);
- vec.setX(m_to.toReal());
- v = vec;
- } else if (m_property.contains(".y")) {
- QVector3D vec = qvariant_cast<QVector3D>(value);
- vec.setY(m_to.toReal());
- v = vec;
- } else if (m_property.contains(".z")) {
- QVector3D vec = qvariant_cast<QVector3D>(value);
- vec.setZ(m_to.toReal());
- v = vec;
- }
- break;
- }
- case QMetaType::QPoint:
- {
- if (m_property.contains(".x")) {
- QPoint vec = qvariant_cast<QPoint>(value);
- vec.setX(m_to.toReal());
- v = vec;
- } else if (m_property.contains(".y")) {
- QPoint vec = qvariant_cast<QPoint>(value);
- vec.setY(m_to.toReal());
- v = vec;
- }
- break;
- }
- case QMetaType::QPointF:
- {
- if (m_property.contains(".x")) {
- QPointF vec = qvariant_cast<QPointF>(value);
- vec.setX(m_to.toReal());
- v = vec;
- } else if (m_property.contains(".y")) {
- QPointF vec = qvariant_cast<QPointF>(value);
- vec.setY(m_to.toReal());
- v = vec;
- }
- break;
- }
-
- default:
- break;
- }
-
- m_target->setProperty(p.toLatin1().constData(), v);
- }
- QSGAbstractAnimation::complete();
-}
-
-void QSGPropertyAnimation::prepare(bool v)
-{
- // Make sure opacity node exists
- QQuickItem *t = qobject_cast<QQuickItem*> (m_target);
- if (t && v && m_property == "opacity") {
- if (t->opacity() < MIN_OPACITY) {
- t->setOpacity(MIN_OPACITY);
- }
- else if (t->opacity() > MAX_OPACITY) {
- t->setOpacity(MAX_OPACITY);
- }
- }
-
- registerToHost(m_target);
-}
-
-QAbstractAnimationJob* QSGPropertyAnimation::transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- if (!isRunning())
- m_transitionRunning = true;
-
- prepareTransition(actions, modified, direction, defaultTarget);
-
- QPauseAnimationJob *job = new QPauseAnimationJob();
- job->setLoopCount(loops());
- job->setDuration(m_duration);
- return job;
-}
-
-void QSGPropertyAnimation::prepareTransition(QQuickStateActions &actions,
- QQmlProperties &,
- TransitionDirection direction,
- QObject *)
-{
- if (direction != Forward)
- qWarning("QSGPropertyAnimation::prepareTransition - Backward transition not yet supported.");
-
- for (int i = 0; i < actions.count(); i++) {
- if (actions.at(i).property.object() != actions.at(0).property.object()) {
- qWarning("QSGPropertyAnimation::prepareTransition - Multiple targets not yet supported.");
- continue;
- }
-
- if (m_property == actions.at(i).property.name() || m_property.isEmpty() ) {
- m_property = actions.at(i).property.name();
- m_target = actions.at(i).property.object();
- m_from = actions.at(i).fromValue;
- m_to = actions.at(i).toValue;
- }
- }
-
- prepare(true);
-}
diff --git a/animators/src/qsgpropertyanimation.h b/animators/src/qsgpropertyanimation.h
deleted file mode 100644
index 1acbbbc..0000000
--- a/animators/src/qsgpropertyanimation.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGPROPERTYANIMATION_H
-#define QSGPROPERTYANIMATION_H
-
-#include "qsgabstractanimation.h"
-
-class QSGPropertyAnimation : public QSGAbstractAnimation
-{
- Q_OBJECT
- Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
- Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged)
- Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
- Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
- Q_PROPERTY(QObject* target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
- Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
-
-public:
- QSGPropertyAnimation(QObject *parent = 0);
-
- int duration();
- void setDuration(int);
-
- QVariant from();
- void setFrom(QVariant);
-
- QVariant to();
- void setTo(QVariant);
-
- const QEasingCurve& easing();
- void setEasing(const QEasingCurve&);
-
- QObject* target();
- void setTarget(QObject *);
-
- const QString& property();
- void setProperty(QString);
-
- const QString& properties();
- void setProperties(QString);
-
- virtual QAbstractAnimationJob* transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget = 0);
-
- void prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget);
-
-public Q_SLOTS:
- virtual void complete();
- virtual void prepare(bool);
-
-Q_SIGNALS:
- void durationChanged(int);
- void fromChanged(QVariant);
- void toChanged(QVariant);
- void easingChanged(const QEasingCurve &);
- void targetChanged();
- void propertyChanged();
- void propertiesChanged();
-
-private:
- int m_duration;
- QVariant m_from;
- QVariant m_to;
- QEasingCurve m_easing;
- QObject *m_target;
- QString m_property;
- QString m_properties;
- Q_DISABLE_COPY(QSGPropertyAnimation)
-};
-
-#endif // QSGPROPERTYANIMATION_H
diff --git a/animators/src/qsgpropertyanimator.cpp b/animators/src/qsgpropertyanimator.cpp
deleted file mode 100644
index b4b4c3c..0000000
--- a/animators/src/qsgpropertyanimator.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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$
-**
-****************************************************************************/
-
-#include "qsgpropertyanimator.h"
-#include "qsgpropertyanimation.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGPropertyAnimator::QSGPropertyAnimator(QSGAnimatorController* controller, QSGAbstractAnimator *parent, QSGPropertyAnimation *qmlObject, qreal startTime)
- : QSGAbstractAnimator(controller, parent, qmlObject, startTime)
- , m_qmlObject(qmlObject)
- , m_target(0)
- , m_property("")
- , m_from(0.0)
- , m_to(0.0)
-{
- copyQmlObjectData();
-}
-
-void QSGPropertyAnimator::updateProperty(QObject *target, const QString& p)
-{
- QSGAnimatedProperty *ap = m_controller->registeredProperty(p, target);
- if (ap && m_duration > 0) {
- if (m_elapsed > m_startTime && ((m_elapsed < m_startTime + m_loops * m_duration) || (m_loops < 0))) {
-
- QVariant value = ap->value();
- qreal tx = int(m_elapsed - m_startTime) % int(m_duration);
-
- switch (value.type()) {
- case QMetaType::Double:
- value = QVariant(m_from.toReal() + (m_to.toReal() - m_from.toReal()) * m_easing.valueForProgress(tx / m_duration));
- break;
- case QMetaType::QColor:
- {
- QColor from = qvariant_cast<QColor>(m_from);
- QColor to = qvariant_cast<QColor>(m_to);
- QColor result = qvariant_cast<QColor>(value);
- result.setRed(from.red() + (to.red() - from.red()) * m_easing.valueForProgress(tx / m_duration));
- result.setGreen(from.green() + (to.green() - from.green()) * m_easing.valueForProgress(tx / m_duration));
- result.setBlue(from.blue() + (to.blue() - from.blue()) * m_easing.valueForProgress(tx / m_duration));
- result.setAlpha(from.alpha() + (to.alpha() - from.alpha()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::Int:
- value = QVariant(m_from.toInt() + (m_to.toInt() - m_from.toInt()) * m_easing.valueForProgress(tx / m_duration));
- break;
- case QMetaType::QSize:
- {
- QSize from = m_from.toSize();
- QSize to = m_to.toSize();
- QSize result = value.toSize();
- result.setWidth(from.width() + (to.width() - from.width()) * m_easing.valueForProgress(tx / m_duration));
- result.setHeight(from.height() + (to.height() - from.height()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QSizeF:
- {
- QSizeF from = m_from.toSize();
- QSizeF to = m_to.toSize();
- QSizeF result = value.toSize();
- result.setWidth(from.width() + (to.width() - from.width()) * m_easing.valueForProgress(tx / m_duration));
- result.setHeight(from.height() + (to.height() - from.height()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QPoint:
- {
- QPoint from = m_from.toPoint();
- QPoint to = m_to.toPoint();
- QPoint result = value.toPoint();
- result.setX(from.x() + (to.x() - from.x()) * m_easing.valueForProgress(tx / m_duration));
- result.setY(from.y() + (to.y() - from.y()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QPointF:
- {
- QPointF from = m_from.toPointF();
- QPointF to = m_to.toPointF();
- QPointF result = value.toPointF();
- result.setX(from.x() + (to.x() - from.x()) * m_easing.valueForProgress(tx / m_duration));
- result.setY(from.y() + (to.y() - from.y()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QRect:
- {
- QRect from = m_from.toRect();
- QRect to = m_to.toRect();
- QRect result = value.toRect();
- result.setX(from.x() + (to.x() - from.x()) * m_easing.valueForProgress(tx / m_duration));
- result.setY(from.y() + (to.y() - from.y()) * m_easing.valueForProgress(tx / m_duration));
- result.setWidth(from.width() + (to.width() - from.width()) * m_easing.valueForProgress(tx / m_duration));
- result.setHeight(from.height() + (to.height() - from.height()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QRectF:
- {
- QRectF from = m_from.toRectF();
- QRectF to = m_to.toRectF();
- QRectF result = value.toRectF();
- result.setX(from.x() + (to.x() - from.x()) * m_easing.valueForProgress(tx / m_duration));
- result.setY(from.y() + (to.y() - from.y()) * m_easing.valueForProgress(tx / m_duration));
- result.setWidth(from.width() + (to.width() - from.width()) * m_easing.valueForProgress(tx / m_duration));
- result.setHeight(from.height() + (to.height() - from.height()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- case QMetaType::QVector3D:
- {
- QVector3D from = qvariant_cast<QVector3D>(m_from);
- QVector3D to = qvariant_cast<QVector3D>(m_to);
- QVector3D result = qvariant_cast<QVector3D>(value);
- result.setX(from.x() + (to.x() - from.x()) * m_easing.valueForProgress(tx / m_duration));
- result.setY(from.y() + (to.y() - from.y()) * m_easing.valueForProgress(tx / m_duration));
- result.setZ(from.z() + (to.z() - from.z()) * m_easing.valueForProgress(tx / m_duration));
- value = result;
- break;
- }
- default:
- break;
- }
- ap->setValue(value);
- }
- }
-}
-
-void QSGPropertyAnimator::advance(qreal t)
-{
- if ((!m_running || m_paused) && !m_runningToEnd)
- return;
-
- QSGAbstractAnimator::advance(t);
-
- if (!m_target)
- return;
-
- QStringList properties;
- if (!m_properties.isEmpty()) {
- properties = m_properties.split(",");
- for (int i = 0; i < properties.count(); i++)
- updateProperty(m_target, properties[i].trimmed());
- } else {
- updateProperty(m_target, m_property);
- }
-}
-
-qreal QSGPropertyAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- QSGAbstractAnimator::sync(topLevelRunning, startTime);
- copyQmlObjectData();
- return m_duration;
-}
-
-void QSGPropertyAnimator::copyQmlObjectData()
-{
- if (m_qmlObject) {
- m_target = m_qmlObject->target();
- m_property = m_qmlObject->property();
- m_properties = m_qmlObject->properties();
- m_from = m_qmlObject->from();
- m_to = m_qmlObject->to();
- m_duration = m_qmlObject->duration();
- m_easing = m_qmlObject->easing();
- }
-}
-
-
-QObject* QSGPropertyAnimator::target()
-{
- return m_target;
-}
-
-void QSGPropertyAnimator::setTarget(QObject* a)
-{
- m_target = a;
-}
-
-const QString& QSGPropertyAnimator::property()
-{
- return m_property;
-}
-
-void QSGPropertyAnimator::setProperty(QString a)
-{
- m_property = a;
-}
-
-QVariant QSGPropertyAnimator::from()
-{
- return m_from;
-}
-
-void QSGPropertyAnimator::setFrom(QVariant a)
-{
- m_from = a;
-}
-
-QVariant QSGPropertyAnimator::to()
-{
- return m_to;
-}
-
-void QSGPropertyAnimator::setTo(QVariant a)
-{
- m_to = a;
-}
-
-const QEasingCurve& QSGPropertyAnimator::easing()
-{
- return m_easing;
-}
-
-void QSGPropertyAnimator::setEasing(const QEasingCurve& a)
-{
- m_easing = a;
-}
diff --git a/animators/src/qsgpropertyanimator.h b/animators/src/qsgpropertyanimator.h
deleted file mode 100644
index 6aaf9b2..0000000
--- a/animators/src/qsgpropertyanimator.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGPROPERTYANIMATOR_H
-#define QSGPROPERTYANIMATOR_H
-
-#include "qsgabstractanimator.h"
-
-class QSGPropertyController;
-class QSGPropertyAnimation;
-
-class QSGPropertyAnimator : public QSGAbstractAnimator
-{
-public:
- QSGPropertyAnimator(QSGAnimatorController *, QSGAbstractAnimator *, QSGPropertyAnimation *, qreal);
-
- virtual void advance(qreal);
- virtual qreal sync(bool, qreal startTime = 0.0);
-
- QObject* target();
- void setTarget(QObject *);
-
- const QString& property();
- void setProperty(QString);
-
- QVariant from();
- void setFrom(QVariant);
-
- QVariant to();
- void setTo(QVariant);
-
- const QEasingCurve& easing();
- void setEasing(const QEasingCurve &);
-
-private:
- void updateProperty(QObject *, const QString &);
- void copyQmlObjectData();
-
-private:
- QSGPropertyAnimation *m_qmlObject;
- QObject *m_target;
- QList<QObject*> m_targets;
- QList<QObject*> m_excluded;
- QString m_property;
- QString m_properties;
- QString m_exludedProperties;
- QVariant m_from;
- QVariant m_to;
- QEasingCurve m_easing;
-};
-
-#endif // QSGPROPERTYANIMATOR_H
diff --git a/animators/src/qsgsequentialanimation.cpp b/animators/src/qsgsequentialanimation.cpp
deleted file mode 100644
index 4bcef1b..0000000
--- a/animators/src/qsgsequentialanimation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsgsequentialanimation.h"
-#include <private/qpauseanimationjob_p.h>
-
-QSGSequentialAnimation::QSGSequentialAnimation(QObject *parent)
- : QSGAbstractAnimation(parent)
-{
- connect(this, SIGNAL(runningChanged(bool)), SLOT(prepare(bool)));
-}
-
-void QSGSequentialAnimation::prepare(bool v)
-{
- int count = children().count();
- for (int i = 0; i < count; i++) {
- QSGAbstractAnimation *a = qobject_cast<QSGAbstractAnimation*>(children().at(i));
- if (a)
- a->prepare(v);
- }
-}
-
-QAbstractAnimationJob* QSGSequentialAnimation::transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- if (!isRunning())
- m_transitionRunning = true;
-
- prepareTransition(actions, modified, direction, defaultTarget);
-
- QPauseAnimationJob *job = new QPauseAnimationJob();
- job->setLoopCount(loops());
- job->setDuration(-1);
- return job;
-}
-
-void QSGSequentialAnimation::prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget)
-{
- if (direction != Forward)
- qWarning("QSGSequentialAnimation::prepareTransition - Backward transition not yet supported.");
-
- if (actions.count() > 0) {
- registerToHost(actions.at(0).property.object());
- }
-
- int count = children().count();
- for (int i = 0; i < count; i++) {
- QSGAbstractAnimation* a = dynamic_cast<QSGAbstractAnimation*> (children().at(i));
- if (a)
- a->prepareTransition(actions, modified, direction, defaultTarget);
- }
-}
diff --git a/animators/src/qsgsequentialanimation.h b/animators/src/qsgsequentialanimation.h
deleted file mode 100644
index 1679588..0000000
--- a/animators/src/qsgsequentialanimation.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGSEQUENTIALANIMATION_H
-#define QSGSEQUENTIALANIMATION_H
-
-#include "qsgabstractanimation.h"
-
-class QSGSequentialAnimation : public QSGAbstractAnimation
-{
- Q_OBJECT
-public:
- QSGSequentialAnimation(QObject *parent = 0);
-
- virtual QAbstractAnimationJob* transition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget = 0);
-
- void prepareTransition(QQuickStateActions &actions,
- QQmlProperties &modified,
- TransitionDirection direction,
- QObject *defaultTarget);
-
-public Q_SLOTS:
- virtual void prepare(bool);
-
-private:
- Q_DISABLE_COPY(QSGSequentialAnimation)
-};
-
-#endif // QSGSEQUENTIALANIMATION_H
diff --git a/animators/src/qsgsequentialanimator.cpp b/animators/src/qsgsequentialanimator.cpp
deleted file mode 100644
index 54adf34..0000000
--- a/animators/src/qsgsequentialanimator.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsgsequentialanimator.h"
-#include "qsgsequentialanimation.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGSequentialAnimator::QSGSequentialAnimator(QSGAnimatorController* controller, QSGAbstractAnimator *parent, QSGAbstractAnimation *qmlObject, qreal startTime)
- : QSGAbstractAnimator(controller, parent, qmlObject, startTime)
-{
-}
-
-void QSGSequentialAnimator::advance(qreal t)
-{
- if ((!m_running || m_paused) && !m_runningToEnd)
- return;
-
- QSGAbstractAnimator::advance(t);
-
- if (m_elapsed > m_startTime && ((m_elapsed < m_startTime + m_loops * m_duration) || (m_loops < 0))) {
- qreal tx = int(m_elapsed - m_startTime) % int(m_duration);
- for (int i = 0; i < m_animators.count(); i++) {
- QSGAbstractAnimator *child = m_animators.at(i);
- int childStartTime = child->startTime();
- int childDuration = child->duration();
- int childLoops = child->loops();
-
- qreal cx = int(m_startTime + tx - childStartTime) % int(childDuration);
- if (m_startTime + tx > childStartTime && m_startTime + tx < childStartTime + childDuration * childLoops) {
- child->setElapsed(childStartTime + cx);
- child->advance();
- }
- }
- }
-}
-
-qreal QSGSequentialAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- QSGAbstractAnimator::sync(topLevelRunning, startTime);
-
- qreal duration = 0.0;
- for (int i = 0; i < m_animators.count(); i++)
- duration += m_animators.at(i)->sync(topLevelRunning || (m_running && !m_paused) || m_runningToEnd, startTime + duration);
-
- duration *= m_loops;
- return duration;
-}
diff --git a/animators/src/qsgsequentialanimator.h b/animators/src/qsgsequentialanimator.h
deleted file mode 100644
index 6552715..0000000
--- a/animators/src/qsgsequentialanimator.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGSEQUENTIALANIMATOR_H
-#define QSGSEQUENTIALANIMATOR_H
-
-#include "qsgabstractanimator.h"
-
-class QSGPropertyController;
-class QSGAbstractAnimation;
-
-class QSGSequentialAnimator : public QSGAbstractAnimator
-{
-public:
- QSGSequentialAnimator(QSGAnimatorController *, QSGAbstractAnimator *, QSGAbstractAnimation *, qreal);
-
- virtual void advance(qreal);
- virtual qreal sync(bool, qreal startTime = 0.0);
-};
-
-#endif // QSGSEQUENTIALANIMATOR_H
diff --git a/animators/src/qsgtoplevelanimator.cpp b/animators/src/qsgtoplevelanimator.cpp
deleted file mode 100644
index da3996c..0000000
--- a/animators/src/qsgtoplevelanimator.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsgtoplevelanimator.h"
-#include "qsganimatorcontroller.h"
-#include <QDebug>
-
-QSGTopLevelAnimator::QSGTopLevelAnimator()
- : QSGAbstractAnimator(0, 0, 0, 0)
-{
-}
-
-void QSGTopLevelAnimator::advance(qreal t)
-{
- QSGAbstractAnimator::advance(t);
-
- for (int i = 0; i < m_animators.count(); i++) {
- m_animators.at(i)->advance(t);
- }
-}
-
-qreal QSGTopLevelAnimator::sync(bool topLevelRunning, qreal startTime)
-{
- QSGAbstractAnimator::sync(topLevelRunning, startTime);
-
- qreal duration = 0.0;
- for (int i = 0; i < m_animators.count(); i++) {
- qreal childAnimationDuration = m_animators.at(i)->sync(topLevelRunning, startTime);
- duration = qMax(duration, childAnimationDuration);
- }
- duration *= m_loops;
- return duration;
-}
diff --git a/animators/src/qsgtoplevelanimator.h b/animators/src/qsgtoplevelanimator.h
deleted file mode 100644
index de4230e..0000000
--- a/animators/src/qsgtoplevelanimator.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of %MODULE%.
-**
-** $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 QSGTOPLEVELANIMATOR_H
-#define QSGTOPLEVELANIMATOR_H
-
-#include "qsgabstractanimator.h"
-#include <QtQuick/private/qquickanimation_p.h>
-
-class QSGPropertyController;
-
-class QSGTopLevelAnimator : public QSGAbstractAnimator
-{
-public:
- QSGTopLevelAnimator();
-
- virtual void advance(qreal);
- virtual qreal sync(bool, qreal startTime = 0.0);
-};
-
-#endif // QSGTOPLEVELANIMATOR_H
diff --git a/animators/src/qsgvector3danimation.cpp b/animators/src/qsgvector3danimation.cpp
deleted file mode 100644
index a41112f..0000000
--- a/animators/src/qsgvector3danimation.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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$
-**
-****************************************************************************/
-
-#include "qsgvector3danimation.h"
-#include "qsgpropertyanimation.h"
-
-QSGVector3DAnimation::QSGVector3DAnimation(QObject *parent)
- : QSGPropertyAnimation(parent)
-{
-}
-
-QVector3D QSGVector3DAnimation::from()
-{
- return qvariant_cast<QVector3D>(QSGPropertyAnimation::from());
-}
-
-void QSGVector3DAnimation::setFrom(QVector3D a)
-{
- QSGPropertyAnimation::setFrom(a);
-}
-
-QVector3D QSGVector3DAnimation::to()
-{
- return qvariant_cast<QVector3D>(QSGPropertyAnimation::to());
-}
-
-void QSGVector3DAnimation::setTo(QVector3D a)
-{
- QSGPropertyAnimation::setTo(a);
-}
diff --git a/animators/src/qsgvector3danimation.h b/animators/src/qsgvector3danimation.h
deleted file mode 100644
index d91f8b1..0000000
--- a/animators/src/qsgvector3danimation.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Scenegraph Playground 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 QSGVECTOR3DANIMATION_H
-#define QSGVECTOR3DANIMATION_H
-
-#include "qsgpropertyanimation.h"
-
-class QSGVector3DAnimation : public QSGPropertyAnimation
-{
- Q_OBJECT
-
- Q_PROPERTY(QVector3D from READ from WRITE setFrom)
- Q_PROPERTY(QVector3D to READ to WRITE setTo)
-
-public:
- QSGVector3DAnimation(QObject *parent = 0);
-
- QVector3D from();
- void setFrom(QVector3D);
-
- QVector3D to();
- void setTo(QVector3D);
-
-private:
- Q_DISABLE_COPY(QSGVector3DAnimation)
-};
-
-#endif // QSGVECTOR3DANIMATION_H
diff --git a/animators/src/src.pro b/animators/src/src.pro
deleted file mode 100644
index f8cf77b..0000000
--- a/animators/src/src.pro
+++ /dev/null
@@ -1,72 +0,0 @@
-TARGET = animators
-TEMPLATE = lib
-
-QT = core gui v8 qml quick
-QT += quick-private qml-private v8-private gui-private core-private
-
-CONFIG += plugin
-
-DEFINES += ANIMATORS_DEBUG
-
-HEADERS += \
- qsganimatorcontroller.h \
- qsganimatedtransform.h \
- qsganimatedtranslate.h \
- qsganimatedscale.h \
- qsganimatedrotation.h \
- qsganimatoritem.h \
- qsgsequentialanimator.h \
- qsgparallelanimator.h \
- qsgtoplevelanimator.h \
- qsgpauseanimator.h \
- qsganimatedproperty.h \
- qsgpropertyanimator.h \
- qsgabstractanimator.h \
- qsgsequentialanimation.h \
- qsgpropertyanimation.h \
- qsgpauseanimation.h \
- qsgparallelanimation.h \
- qsgabstractanimation.h \
- qsgnumberanimation.h \
- qsgcoloranimation.h \
- qsgvector3danimation.h \
- qsganimatorshadereffect.h \
- qsganimatornode.h \
- qsganimatorhost.h
-
-SOURCES += \
- qsganimatoritem.cpp \
- qsganimatorplugin.cpp \
- qsganimatorcontroller.cpp \
- qsganimatedtransform.cpp \
- qsganimatedtranslate.cpp \
- qsganimatedscale.cpp \
- qsganimatedrotation.cpp \
- qsgsequentialanimator.cpp \
- qsgparallelanimator.cpp \
- qsgtoplevelanimator.cpp \
- qsgpauseanimator.cpp \
- qsganimatedproperty.cpp \
- qsgpropertyanimator.cpp \
- qsgabstractanimator.cpp \
- qsgsequentialanimation.cpp \
- qsgpropertyanimation.cpp \
- qsgpauseanimation.cpp \
- qsgparallelanimation.cpp \
- qsgabstractanimation.cpp \
- qsgvector3danimation.cpp \
- qsgnumberanimation.cpp \
- qsgcoloranimation.cpp \
- qsganimatorshadereffect.cpp \
- qsganimatornode.cpp
-
-target.path = $$[QT_INSTALL_IMPORTS]/Animators
-
-qmldir.files = qmldir
-qmldir.path = $$[QT_INSTALL_IMPORTS]/Animators
-
-INSTALLS = target qmldir
-
-
-
-
diff --git a/animators/test/Control.qml b/animators/test/Control.qml
deleted file mode 100644
index 5bd7788..0000000
--- a/animators/test/Control.qml
+++ /dev/null
@@ -1,186 +0,0 @@
-import QtQuick 2.0
-
-Rectangle {
- id: control
-
- property bool testing: false
- property bool running: false
- property bool paused: false
- property bool blocking: false
-
- onBlockingChanged: {
- blockerStopTimer.running = blocking
- }
-
- Timer {
- id: blockerStartTimer
- interval: 1500
- repeat: false
- running: true
- onTriggered: control.blocking = true
- }
-
- Timer {
- id: blockerStopTimer
- interval: 20000
- repeat: false
- running: false
- onTriggered: control.blocking = false
- }
-
- width: 320
- height: 65
- color: "#2e2e2e"
-
- Rectangle {
- width: parent.width
- height: 4
- gradient: Gradient {
- GradientStop { position: 1.0; color: "#2e2e2e" }
- GradientStop { position: 0.0; color: "black" }
- }
- }
-
- Row {
- x: 10
- y: 10
- spacing: 5
- Rectangle {
- width: 70
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: "Back"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- control.testing = !control.testing
- control.running = false
- control.paused = false
- control.blocking = false
- main.state = ""
- }
- }
- }
- }
-
- Rectangle {
- id: pauseButton
- width: 70
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: control.paused ? "Continue" : "Pause"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- control.paused = !control.paused
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "Paused"
- color: "red"
- font.pixelSize: 10
- visible: control.paused
- }
- }
-
- Rectangle {
- id: stopButton
- width: 70
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: control.running ? "Stop" : "Start"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- control.running = !control.running
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "Running"
- color: "red"
- font.pixelSize: 10
- visible: control.running
- }
- }
-
- Rectangle {
- id: blockButton
- width: 70
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: control.blocking ? "No block" : "Block"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- control.blocking = !control.blocking
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "Blocking"
- color: "red"
- font.pixelSize: 10
- visible: control.blocking
- }
- }
- }
-
- Timer {
- id: blockerTimer
- interval: 200
- repeat: true
- running: control.blocking
- onTriggered: blocker()
- function blocker() {
- var date = new Date();
- while (new Date().getTime() - date.getTime() < 100) {
- var x = 1 + 2;
- }
- }
- }
-}
diff --git a/animators/test/TestBedModel.qml b/animators/test/TestBedModel.qml
deleted file mode 100644
index 9d1498a..0000000
--- a/animators/test/TestBedModel.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 2.0
-
-ListModel {
- id: testcaseModel
- ListElement { name: "TestPosition.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestScale.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestOpacity.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestRotation.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestTransformTranslate.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestTransformScale.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestTransformRotatation.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestTransformRotationOriginPoint.qml"; group: "Item properties"; last: false }
- ListElement { name: "TestMultipleProperties.qml"; group: "Item properties"; last: true }
- ListElement { name: "TestShaderEffect.qml"; group: "ShaderEffect properties"; last: false }
- ListElement { name: "TestShaderEffectOpacity.qml"; group: "ShaderEffect properties"; last: true }
- ListElement { name: "TestPropertyAnimation.qml"; group: "Animations"; last: false }
- ListElement { name: "TestNumberAnimation.qml"; group: "Animations"; last: false }
- ListElement { name: "TestParallelAnimation.qml"; group: "Animations"; last: false }
- ListElement { name: "TestSequentialAnimation.qml"; group: "Animations"; last: true }
- ListElement { name: "TestMultipleAnimation.qml"; group: "Animations"; last: false }
- ListElement { name: "TestSequentialAnimationAlwaysRunToEnd.qml"; group: "Animations"; last: false }
- ListElement { name: "TestNumberAnimationAlwaysRunToEnd.qml"; group: "Animations"; last: true }
- ListElement { name: "TestTransitionPropertyAnimation.qml"; group: "Transitions"; last: false }
- ListElement { name: "TestTransitionSequentialAnimation.qml"; group: "Transitions"; last: true }
- ListElement { name: "TestBehaviorPropertyAnimation.qml"; group: "Behavior"; last: false }
- ListElement { name: "TestBehaviorSequentialAnimation.qml"; group: "Behavior"; last: true }
- ListElement { name: "TestOnPropertyAnimation.qml"; group: "On property"; last: true }
-}
diff --git a/animators/test/TestBehaviorPropertyAnimation.qml b/animators/test/TestBehaviorPropertyAnimation.qml
deleted file mode 100644
index 245655a..0000000
--- a/animators/test/TestBehaviorPropertyAnimation.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- repeat: false
- interval: 1000
- running: true
- onTriggered: {
- console.log("onTriggered: setting rotation to 360")
- renderThreadItem.rotation = 360
- mainThreadItem.rotation = 360
- }
- }
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Behavior on rotation {
- Rt.NumberAnimation {
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onRunningChanged: console.log("onRunningChanged (renderThreadItem): " + running)
- onStarted: console.log("onStarted (renderThreadItem): " + running)
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Behavior on rotation {
- NumberAnimation {
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onRunningChanged: console.log("onRunningChanged (mainThreadItem): " + running)
- onStarted: console.log("onStarted (mainThreadItem): " + running)
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestBehaviorSequentialAnimation.qml b/animators/test/TestBehaviorSequentialAnimation.qml
deleted file mode 100644
index f2869bc..0000000
--- a/animators/test/TestBehaviorSequentialAnimation.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- repeat: false
- interval: 1000
- running: true
- onTriggered: {
- console.log("onTriggered: setting rotation to 360")
- renderThreadItem.rotation = 360
- mainThreadItem.rotation = 360
- }
- }
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Behavior on rotation {
- Rt.SequentialAnimation {
- Rt.NumberAnimation {
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onRunningChanged: console.log("onRunningChanged (renderThreadItem): " + running)
- onStarted: console.log("onStarted (renderThreadItem): " + running)
- }
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Behavior on rotation {
- SequentialAnimation {
- NumberAnimation {
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onRunningChanged: console.log("onRunningChanged (mainThreadItem): " + running)
- onStarted: console.log("onStarted (mainThreadItem): " + running)
- }
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestMultipleAnimation.qml b/animators/test/TestMultipleAnimation.qml
deleted file mode 100644
index 4b80a9e..0000000
--- a/animators/test/TestMultipleAnimation.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.NumberAnimation {
- id: testAnimation
- loops: 1
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: {
- testAnimation2.running = true
- }
- }
- Rt.NumberAnimation {
- id: testAnimation2
- loops: 1
- running: false
- paused: control.paused
- target: renderThreadItem
- property: "scale"
- from: 1.0
- to: 0.5
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- NumberAnimation {
- id: referenceAnimation
- loops: 1
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: referenceAnimation2.running = true
- }
- NumberAnimation {
- id: referenceAnimation2
- loops: 1
- running: false
- paused: control.paused
- target: mainThreadItem
- property: "scale"
- from: 1.0
- to: 0.5
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestMultipleProperties.qml b/animators/test/TestMultipleProperties.qml
deleted file mode 100644
index b05250e..0000000
--- a/animators/test/TestMultipleProperties.qml
+++ /dev/null
@@ -1,116 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- transform: [
- Scale { id: scaleTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: scaleTransform
- properties: "xScale, yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: scaleTransform
- properties: "xScale, yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- transform: [
- Scale { id: referenceScaleTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- running: false
- target: referenceScaleTransform
- properties: "xScale, yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: referenceScaleTransform
- properties: "xScale, yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestNumberAnimation.qml b/animators/test/TestNumberAnimation.qml
deleted file mode 100644
index 9b4b668..0000000
--- a/animators/test/TestNumberAnimation.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.NumberAnimation {
- id: testAnimation
- loops: 1
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: console.log("onCompleted value = " + renderThreadItem.rotation)
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- NumberAnimation {
- id: referenceAnimation
- loops: 1
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestNumberAnimationAlwaysRunToEnd.qml b/animators/test/TestNumberAnimationAlwaysRunToEnd.qml
deleted file mode 100644
index b9a3936..0000000
--- a/animators/test/TestNumberAnimationAlwaysRunToEnd.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.NumberAnimation {
- id: testAnimation
- alwaysRunToEnd: true
- loops: 5
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: console.log("onCompleted")
- onRunningChanged: console.log("Running changed")
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- NumberAnimation {
- id: referenceAnimation
- alwaysRunToEnd: true
- loops: 5
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestOnPropertyAnimation.qml b/animators/test/TestOnPropertyAnimation.qml
deleted file mode 100644
index cc295b0..0000000
--- a/animators/test/TestOnPropertyAnimation.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- repeat: false
- interval: 1000
- running: true
- onTriggered: {
- renderThreadItem.rotation = 360
- mainThreadItem.rotation = 360
- }
- }
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.NumberAnimation on rotation {
- duration: 6000
- from: 0
- to: 360
- target: renderThreadItem // NOTE: target must be specified here.
- property: "rotation" // NOTE: property must be specified here again.
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- NumberAnimation on rotation {
- duration: 6000
- from: 0
- to: 360
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestOpacity.qml b/animators/test/TestOpacity.qml
deleted file mode 100644
index f5a4d69..0000000
--- a/animators/test/TestOpacity.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "opacity"
- from: 0.0
- to: 1.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "opacity"
- from: 1.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- target: mainThreadItem
- property: "opacity"
- from: 0.0
- to: 1.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- target: mainThreadItem
- property: "opacity"
- from: 1.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestParallelAnimation.qml b/animators/test/TestParallelAnimation.qml
deleted file mode 100644
index b281d32..0000000
--- a/animators/test/TestParallelAnimation.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.ParallelAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "opacity"
- from: 1.0
- to: 0.3
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- ParallelAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "opacity"
- from: 1.0
- to: 0.3
- duration: 3*2000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 3*2000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestPosition.qml b/animators/test/TestPosition.qml
deleted file mode 100644
index dc2987b..0000000
--- a/animators/test/TestPosition.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-import ".."
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- x: 150
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.PropertyAnimation {
- id: testAnimation
- loops: 1
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "x"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- PropertyAnimation {
- id: referenceAnimation
- loops: 1
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "x"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestPropertyAnimation.qml b/animators/test/TestPropertyAnimation.qml
deleted file mode 100644
index fe7935d..0000000
--- a/animators/test/TestPropertyAnimation.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.PropertyAnimation {
- id: testAnimation
- loops: 3
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- PropertyAnimation {
- id: referenceAnimation
- loops: 3
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestRectangleRotation.qml b/animators/test/TestRectangleRotation.qml
deleted file mode 100644
index 0792e42..0000000
--- a/animators/test/TestRectangleRotation.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Rectangle {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- color: "red"
- visible: !renderThreadAnimationsDisabled
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.ColorAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "color"
- from: "red"
- to: "blue"
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "opacity"
- from: 1.0
- to: 0.2
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Rectangle {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- color: "red"
- visible: !mainThreadAnimationsDisabled
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- ColorAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "color"
- from: "red"
- to: "blue"
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "opacity"
- from: 1.0
- to: 0.2
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestRotation.qml b/animators/test/TestRotation.qml
deleted file mode 100644
index cd8f1a8..0000000
--- a/animators/test/TestRotation.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
- rotation: control.running ? 180 : 0
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.NumberAnimation {
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- NumberAnimation {
- loops: 1
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestScale.qml b/animators/test/TestScale.qml
deleted file mode 100644
index 7b73e1a..0000000
--- a/animators/test/TestScale.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "scale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "scale"
- from: 2.0
- to: 1.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "scale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "scale"
- from: 2.0
- to: 1.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestSequentialAnimation.qml b/animators/test/TestSequentialAnimation.qml
deleted file mode 100644
index 2cca183..0000000
--- a/animators/test/TestSequentialAnimation.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 360.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 360.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestSequentialAnimationAlwaysRunToEnd.qml b/animators/test/TestSequentialAnimationAlwaysRunToEnd.qml
deleted file mode 100644
index ab600dc..0000000
--- a/animators/test/TestSequentialAnimationAlwaysRunToEnd.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 10
- alwaysRunToEnd: true
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: renderThreadItem
- property: "rotation"
- from: 360.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 10
- alwaysRunToEnd: true
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 0.0
- to: 360.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: mainThreadItem
- property: "rotation"
- from: 360.0
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestShaderEffect.qml b/animators/test/TestShaderEffect.qml
deleted file mode 100644
index 18c8318..0000000
--- a/animators/test/TestShaderEffect.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.ShaderEffect {
- id: effect
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- property variant source: ShaderEffectSource {
- sourceItem: Rectangle { width: 100; height: 100; color: "red" }
- hideSource: true
- }
- property real c: 0.0
-
- fragmentShader:
- "
- varying highp vec2 qt_TexCoord0;
- uniform sampler2D source;
- uniform highp float c;
-
- void main() {
- lowp vec4 color = texture2D(source, qt_TexCoord0);
- gl_FragColor = mix(color, vec4(0.4), c);
- }
- "
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 10
-
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "scale"
- from: 1.0
- to: 0.8
- duration: 1500
- }
-
- Rt.SequentialAnimation {
- loops: 2
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "c"
- from: 0.0
- to: 1.0
- duration: 1500
- }
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "c"
- from: 1.0
- to: 0.0
- duration: 1500
- }
- }
-
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "scale"
- from: 0.8
- to: 1.0
- duration: 1500
- }
-
- }
- }
-
- ShaderEffect {
- id: refeffect
- y: parent.height / 2 + 5
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
- property var source: ShaderEffectSource {
- sourceItem: Rectangle { width: 100; height: 100; color: "red" }
- hideSource: true
- }
- property real c: 0.0
-
- fragmentShader:
- "
- varying highp vec2 qt_TexCoord0;
- uniform sampler2D source;
- uniform highp float c;
-
- void main() {
- lowp vec4 color = texture2D(source, qt_TexCoord0);
- gl_FragColor = mix(color, vec4(0.4), c);
- }
- "
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: refAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 10
-
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "scale"
- from: 1.0
- to: 0.8
- duration: 1500
- }
-
- SequentialAnimation {
- loops: 2
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "c"
- from: 0.0
- to: 1.0
- duration: 1500
- }
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "c"
- from: 1.0
- to: 0.0
- duration: 1500
- }
- }
-
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "scale"
- from: 0.8
- to: 1.0
- duration: 1500
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestShaderEffectOpacity.qml b/animators/test/TestShaderEffectOpacity.qml
deleted file mode 100644
index a63defa..0000000
--- a/animators/test/TestShaderEffectOpacity.qml
+++ /dev/null
@@ -1,151 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- running: true
- interval: 2
- onTriggered: loader.sourceComponent = com
- repeat: false
- }
-
- Loader {
- id: loader
- sourceComponent: undefined
- anchors.fill: parent
- }
-
- Component {
- id: com
- Item {
- anchors.fill: parent
- Rt.ShaderEffect {
- id: effect
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- property variant source: ShaderEffectSource {
- sourceItem: Rectangle { width: 100; height: 100; color: "red" }
- hideSource: true
- }
- property real c: 0.0
-
- fragmentShader:
- "
- varying highp vec2 qt_TexCoord0;
- uniform sampler2D source;
- uniform highp float c;
- uniform highp float qt_Opacity;
-
- void main() {
- lowp vec4 color = texture2D(source, qt_TexCoord0);
- gl_FragColor = mix(color, vec4(0.4), c) * qt_Opacity;
- }
- "
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.ParallelAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 10
-
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "opacity"
- from: 1.0
- to: 0.0
- duration: 3000
- }
- Rt.NumberAnimation {
- loops: 1
- target: effect
- property: "c"
- from: 0.0
- to: 1.0
- duration: 1500
- }
- }
- }
-
- ShaderEffect {
- id: refeffect
- y: parent.height / 2 + 5
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
- property var source: ShaderEffectSource {
- sourceItem: Rectangle { width: 100; height: 100; color: "red" }
- hideSource: true
- }
- property real c: 0.0
-
- fragmentShader:
- "
- varying highp vec2 qt_TexCoord0;
- uniform sampler2D source;
- uniform highp float c;
- uniform highp float qt_Opacity;
-
- void main() {
- lowp vec4 color = texture2D(source, qt_TexCoord0);
- gl_FragColor = mix(color, vec4(0.4), c) * qt_Opacity;
- }
- "
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- ParallelAnimation {
- id: refAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 10
-
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "opacity"
- from: 1.0
- to: 0.0
- duration: 3000
- }
-
- NumberAnimation {
- loops: 1
- target: refeffect
- property: "c"
- from: 0.0
- to: 1.0
- duration: 1500
- }
- }
- }
- }
- }
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransformRotatation.qml b/animators/test/TestTransformRotatation.qml
deleted file mode 100644
index 9ded479..0000000
--- a/animators/test/TestTransformRotatation.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- transform: [
- Rotation { id: rotationTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- Rt.NumberAnimation {
- loops: 1
- target: rotationTransform
- property: "angle"
- from: 0.0
- to: 360
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- target: rotationTransform
- property: "angle"
- from: 360
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- transform: [
- Rotation { id: referenceRotationTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- NumberAnimation {
- loops: 1
- target: referenceRotationTransform
- property: "angle"
- from: 0.0
- to: 360
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- target: referenceRotationTransform
- property: "angle"
- from: 360
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransformRotationOriginPoint.qml b/animators/test/TestTransformRotationOriginPoint.qml
deleted file mode 100644
index 92d25d3..0000000
--- a/animators/test/TestTransformRotationOriginPoint.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- transform: [
- Rotation {
- id: rotationTransform;
- angle: 45; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2;
- onOriginChanged: console.log("onOriginChanged " + origin)
- }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- onRunningChanged: console.log("onRunningChanged " + rotationTransform.origin)
- Rt.NumberAnimation {
- loops: 1
- target: rotationTransform
- property: "origin.x"
- from: 0.0
- to: 360
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- target: rotationTransform
- property: "origin.x"
- from: 360
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- onCompleted: console.log("onCompleted " + rotationTransform.origin)
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- transform: [
- Rotation { id: referenceRotationTransform; angle: 45; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- NumberAnimation {
- loops: 1
- target: referenceRotationTransform
- property: "origin.x"
- from: 0.0
- to: 360
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: console.log("test1")
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- target: referenceRotationTransform
- property: "origin.x"
- from: 360
- to: 0.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- onCompleted: console.log("test2")
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransformScale.qml b/animators/test/TestTransformScale.qml
deleted file mode 100644
index 8c6b6c6..0000000
--- a/animators/test/TestTransformScale.qml
+++ /dev/null
@@ -1,116 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- transform: [
- Scale { id: scaleTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: scaleTransform
- property: "xScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- running: false
- target: scaleTransform
- property: "yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- transform: [
- Scale { id: referenceScaleTransform; origin.x: renderThreadItem.width / 2; origin.y: renderThreadItem.height / 2; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 3
- NumberAnimation {
- loops: 1
- running: false
- target: referenceScaleTransform
- property: "xScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- running: false
- target: referenceScaleTransform
- property: "yScale"
- from: 1.0
- to: 2.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransformTranslate.qml b/animators/test/TestTransformTranslate.qml
deleted file mode 100644
index 8861343..0000000
--- a/animators/test/TestTransformTranslate.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- transform: [
- Translate { id: translateTransform; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- Rt.SequentialAnimation {
- id: testAnimation
- running: control.running && !renderThreadAnimationsDisabled
- paused: control.paused
- loops: 1
- Rt.NumberAnimation {
- loops: 1
- target: translateTransform
- property: "x"
- from: 0.0
- to: 100.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- Rt.PauseAnimation { duration: 2000 }
- Rt.NumberAnimation {
- loops: 1
- target: translateTransform
- property: "y"
- from: 0.0
- to: 50.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- transform: [
- Translate { id: referenceTranslateTransform; }
- ]
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- SequentialAnimation {
- id: referenceAnimation
- running: control.running && !mainThreadAnimationsDisabled
- paused: control.paused
- loops: 1
- NumberAnimation {
- loops: 1
- target: referenceTranslateTransform
- property: "x"
- from: 0.0
- to: 100.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- PauseAnimation { duration: 2000 }
- NumberAnimation {
- loops: 1
- target: referenceTranslateTransform
- property: "y"
- from: 0.0
- to: 50.0
- duration: 6000
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransitionPropertyAnimation.qml b/animators/test/TestTransitionPropertyAnimation.qml
deleted file mode 100644
index 51bc6ee..0000000
--- a/animators/test/TestTransitionPropertyAnimation.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- repeat: false
- interval: 1000
- running: true
- onTriggered: {
- console.log("onTriggered: changing test state.")
- renderThreadItem.state = "moved"
- mainThreadItem.state = "moved"
- }
- }
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: renderThreadItem; rotation: 360 }
- }
-
- transitions: Transition {
- Rt.NumberAnimation {
- target: renderThreadItem
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: mainThreadItem; rotation: 360 }
- }
-
- transitions: Transition {
- NumberAnimation {
- target: mainThreadItem
- property: "rotation"
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/TestTransitionSequentialAnimation.qml b/animators/test/TestTransitionSequentialAnimation.qml
deleted file mode 100644
index 2dbc4c0..0000000
--- a/animators/test/TestTransitionSequentialAnimation.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-import QtQuick 2.0
-import Animators 1.0 as Rt
-
-Rectangle {
- id: root
- width: 320
- height: 480
- color: "black"
- property var out33in60: [ 0.33, 0.0, 0.40, 1.0, 1.0, 1.0 ]
- property var out60in33: [ 0.60, 0.0, 0.67, 1.0, 1.0, 1.0 ]
-
- Timer {
- repeat: false
- interval: 1000
- running: true
- onTriggered: {
- console.log("onTriggered: changing test state.")
- renderThreadItem.state = "moved"
- mainThreadItem.state = "moved"
- }
- }
-
- Rt.Item {
- id: renderThreadItem
- width: parent.width
- height: parent.height / 2
- visible: !renderThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Render thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: renderThreadItem; rotation: 360 }
- }
-
- transitions: Transition {
- Rt.SequentialAnimation {
- Rt.NumberAnimation {
- target: renderThreadItem
- property: "rotation"
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- to: 360
- from: 0
- }
- Rt.NumberAnimation {
- target: renderThreadItem
- property: "scale"
- from: 1.0
- to: 0.3
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- }
- }
- }
- }
-
- Item {
- id: mainThreadItem
- y: parent.height / 2
- width: parent.width
- height: parent.height / 2
- visible: !mainThreadAnimationsDisabled
-
- Text {
- anchors.centerIn: parent
- text: "Main thread animation"
- smooth: true
- color: "white"
- font.pixelSize: 20
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: mainThreadItem; rotation: 360 }
- }
-
- transitions: Transition {
- SequentialAnimation {
- NumberAnimation {
- target: mainThreadItem
- property: "rotation"
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- }
- NumberAnimation {
- target: mainThreadItem
- property: "scale"
- to: 0.3
- easing.type: Easing.Bezier
- easing.bezierCurve: out60in33
- duration: 6000
- }
- }
- }
- }
-
- Control {
- id: control
- anchors.bottom: parent.bottom
- running: true
- }
-}
diff --git a/animators/test/main.qml b/animators/test/main.qml
deleted file mode 100644
index 9c95d9a..0000000
--- a/animators/test/main.qml
+++ /dev/null
@@ -1,262 +0,0 @@
-import QtQuick 2.0
-
-Rectangle {
- id: main
- width: 320
- height: 480
- color: "black"
-
- property string currentTest: ""
- property bool renderThreadAnimationsDisabled: false
- property bool mainThreadAnimationsDisabled: false
-
- Loader {
- id: testLoader
- anchors.left: menuView.right
- width: 320
- height: 480
- }
-
- Component {
- id: sectionHeading
- Text {
- id: sectionText
- text: section
- anchors.left: parent.left
- anchors.leftMargin: 10
- height: 30
- width: parent.width
- color: "white"
- verticalAlignment: Text.AlignVCenter
- font.family: "Nokia Pure Text"
- font.bold: true
- font.pixelSize: 18
- }
- }
-
- Rectangle {
- id: menuView
- width: parent.width
- height: parent.height
- color: "black"
-
- ListView {
- id: testCaseList
-
- anchors.top: parent.top
- anchors.topMargin: 10
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 40
- anchors.left: parent.left
- anchors.right: parent.right
-
- model: TestBedModel {}
-
- section.property: "group"
- section.criteria: ViewSection.FullString
- section.delegate: sectionHeading
-
- Component.onCompleted: contentY = 0
-
- delegate: Item {
- width: testCaseList.width
- height: 50
-
- Rectangle {
- anchors.fill: parent
- anchors.margins: 5
- color: "#2e2e2e"
- }
-
- Text {
- id: delegateText;
- anchors.left: parent.left
- anchors.leftMargin: 10
- text: name.slice(4, name.indexOf("."))
- width: parent.width
- height: 50
- font.family: "Nokia Pure Text"
- font.pixelSize: 16
- verticalAlignment: Text.AlignVCenter
- color: "#e6e6e6"
- }
- MouseArea {
- id: delegateMouseArea
- anchors.fill: parent;
- onClicked: {
- main.state = "testRunning"
- testLoader.source = name
- currentTest = name.slice(4, name.indexOf("."))
- }
- }
- }
- }
- }
-
- states: State {
- name: "testRunning"
- PropertyChanges { target: menuView; x: -width }
- }
-
- transitions: [
- Transition {
- to: "testRunning"
- SequentialAnimation {
- NumberAnimation {
- property: "x"
- duration: 200
- }
- PropertyAction {
- target: menuView
- property: "visible"
- value: false
- }
- }
- },
- Transition {
- to: ""
- SequentialAnimation {
- PropertyAction {
- target: menuView
- property: "visible"
- value: true
- }
- NumberAnimation {
- property: "x"
- duration: 200
- }
- PropertyAction {
- target: testLoader
- property: "source"
- value: ""
- }
- }
- }
- ]
-
- Rectangle {
- id: mainControl
- anchors.bottom: parent.bottom
- property bool keepalive: false
- visible: main.state == ""
-
- width: 320
- height: 65
- color: "#2e2e2e"
-
- Rectangle {
- width: parent.width
- height: 4
- gradient: Gradient {
- GradientStop { position: 1.0; color: "#2e2e2e" }
- GradientStop { position: 0.0; color: "black" }
- }
- }
-
- Row {
- x: 10
- y: 10
- spacing: 5
- Rectangle {
- width: 90
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: !mainControl.keepalive ? "Keepalive" : "No keepalive"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- mainControl.keepalive = !mainControl.keepalive
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "Keepalive"
- color: "red"
- font.pixelSize: 10
- opacity: mainControl.keepalive ? 0.5 : 0.0
- NumberAnimation on opacity {
- running: mainControl.keepalive
- from: 0.5
- to: 0.1
- duration: 2000
- loops: Animation.Infinite
- }
- }
- }
- Rectangle {
- width: 90
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: renderThreadAnimationsDisabled ? "Enable RT" : "Disable RT"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- renderThreadAnimationsDisabled = !renderThreadAnimationsDisabled
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "RT disabled"
- color: "red"
- font.pixelSize: 10
- visible: renderThreadAnimationsDisabled
- }
- }
- Rectangle {
- width: 90
- height: 40
- color: "#3e3e3e"
- Text {
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.fill: parent
- text: mainThreadAnimationsDisabled ? "Enable MT" : "Disable MT"
- color: "white"
- font.pixelSize: 14
- font.family: "Nokia Pure Text"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- mainThreadAnimationsDisabled = !mainThreadAnimationsDisabled
- }
- }
- }
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "RT disabled"
- color: "red"
- font.pixelSize: 10
- visible: mainThreadAnimationsDisabled
- }
- }
- }
- }
-}
diff --git a/scenegraph-playground.pro b/scenegraph-playground.pro
index 1ca74ca..e9501d8 100644
--- a/scenegraph-playground.pro
+++ b/scenegraph-playground.pro
@@ -1,3 +1,3 @@
TEMPLATE=subdirs
-SUBDIRS=animators customcontext
+SUBDIRS=customcontext