aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimatorjob_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickanimatorjob_p.h')
-rw-r--r--src/quick/util/qquickanimatorjob_p.h75
1 files changed, 24 insertions, 51 deletions
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index 2aa0e1a380..16e4a7063d 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Gunnar Sletta <gunnar@sletta.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// Copyright (C) 2016 Gunnar Sletta <gunnar@sletta.org>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QQUICKANIMATORJOB_P_H
#define QQUICKANIMATORJOB_P_H
@@ -59,6 +23,7 @@
#include <QtQuick/qquickitem.h>
#include <QtCore/qeasingcurve.h>
+#include <QtCore/qpointer.h>
QT_BEGIN_NAMESPACE
@@ -68,11 +33,10 @@ class QQuickItem;
class QQuickAbstractAnimation;
class QQuickAnimatorController;
-class QQuickAnimatorProxyJobPrivate;
class QSGOpacityNode;
-class Q_QUICK_PRIVATE_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob
+class Q_QUICK_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob
{
Q_OBJECT
@@ -114,16 +78,22 @@ private:
InternalState m_internalState;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickAnimatorJob : public QAbstractAnimationJob
+class Q_QUICK_EXPORT QQuickAnimatorJob : public QAbstractAnimationJob
{
public:
virtual void setTarget(QQuickItem *target);
QQuickItem *target() const { return m_target; }
- void setFrom(qreal from) { m_from = from; }
+ void setFrom(qreal from) {
+ m_from = from;
+ boundValue();
+ }
qreal from() const { return m_from; }
- void setTo(qreal to) { m_to = to; }
+ void setTo(qreal to) {
+ m_to = to;
+ boundValue();
+ }
qreal to() const { return m_to; }
void setDuration(int duration) { m_duration = duration; }
@@ -169,6 +139,7 @@ protected:
void debugAnimation(QDebug d) const override;
qreal progress(int time) const;
+ void boundValue();
QPointer<QQuickItem> m_target;
QQuickAnimatorController *m_controller;
@@ -239,28 +210,28 @@ protected:
Helper *m_helper;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob
+class Q_QUICK_EXPORT QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob
{
public:
void updateCurrentTime(int time) override;
void writeBack() override;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickXAnimatorJob : public QQuickTransformAnimatorJob
+class Q_QUICK_EXPORT QQuickXAnimatorJob : public QQuickTransformAnimatorJob
{
public:
void updateCurrentTime(int time) override;
void writeBack() override;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickYAnimatorJob : public QQuickTransformAnimatorJob
+class Q_QUICK_EXPORT QQuickYAnimatorJob : public QQuickTransformAnimatorJob
{
public:
void updateCurrentTime(int time) override;
void writeBack() override;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob
+class Q_QUICK_EXPORT QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob
{
public:
QQuickRotationAnimatorJob();
@@ -275,7 +246,7 @@ private:
QQuickRotationAnimator::RotationDirection m_direction;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickOpacityAnimatorJob : public QQuickAnimatorJob
+class Q_QUICK_EXPORT QQuickOpacityAnimatorJob : public QQuickAnimatorJob
{
public:
QQuickOpacityAnimatorJob();
@@ -289,9 +260,10 @@ private:
QSGOpacityNode *m_opacityNode;
};
+#if QT_CONFIG(quick_shadereffect)
class QQuickShaderEffect;
-class Q_QUICK_PRIVATE_EXPORT QQuickUniformAnimatorJob : public QQuickAnimatorJob
+class Q_QUICK_EXPORT QQuickUniformAnimatorJob : public QQuickAnimatorJob
{
public:
QQuickUniformAnimatorJob();
@@ -309,8 +281,9 @@ public:
private:
QByteArray m_uniform;
- QQuickShaderEffect *m_effect = nullptr;
+ QPointer<QQuickShaderEffect> m_effect;
};
+#endif
QT_END_NAMESPACE