9#include <private/qquickitem_p.h>
10#if QT_CONFIG(quick_shadereffect)
11#include <private/qquickshadereffect_p.h>
13#include <private/qanimationgroupjob_p.h>
41 if (--helper->
ref == 0) {
53 , m_internalState(State_Stopped)
72 qWarning(
"QtQuick: unable to find animation context for RT animation...");
94 if (m_job && m_controller)
95 m_controller->
cancel(m_job);
109 if (m_internalState != State_Running)
140 m_internalState = State_Starting;
142 m_internalState = State_Running;
143 m_controller->
start(m_job);
147 m_internalState = State_Stopped;
149 syncBackCurrentValues();
150 m_controller->
cancel(m_job);
157 d <<
"QuickAnimatorProxyJob("<<
Qt::hex << (
const void *)
this <<
Qt::dec
159 <<
"proxying: (" <<
job() <<
')';
170 if (m_job && m_controller) {
173 m_controller->
cancel(m_job);
176 m_controller =
nullptr;
179 }
else if (!m_controller && m_job) {
181 if (
window->isSceneGraphInitialized())
196void QQuickAnimatorProxyJob::readyToAnimate()
199 if (m_internalState == State_Starting) {
200 m_internalState = State_Running;
201 m_controller->
start(m_job);
218void QQuickAnimatorProxyJob::syncBackCurrentValues()
231 , m_isTransform(
false)
290 qquick_transform_animatorjob_helper_store()->release(
m_helper);
307 qquick_transform_animatorjob_helper_store()->release(
m_helper);
348#if QT_CONFIG(quick_shadereffect)
349 if (
d->extra.isAllocated()
351 &&
d->extra->layer->enabled()) {
364 node =
d->itemNode();
388 if (!wasChanged || !node)
395 m.rotate(rotation, 0, 0, 1);
396 m.translate(-ox, -oy);
473 switch (m_direction) {
516#if QT_CONFIG(quick_shadereffect)
517 if (
d->extra.isAllocated()
519 &&
d->extra->layer->enabled()) {
524 m_opacityNode =
d->opacityNode();
526 if (!m_opacityNode) {
544 if (
child != iNode) {
554 d->extra.value().opacityNode = m_opacityNode;
562 m_opacityNode =
nullptr;
580#if QT_CONFIG(quick_shadereffect)
581QQuickUniformAnimatorJob::QQuickUniformAnimatorJob()
589 if (qobject_cast<QQuickShaderEffect *>(
target) !=
nullptr)
593void QQuickUniformAnimatorJob::updateCurrentTime(
int time)
598 m_value = m_from + (m_to - m_from) * progress(
time);
599 m_effect->updateUniformValue(m_uniform, m_value);
602void QQuickUniformAnimatorJob::writeBack()
605 m_target->setProperty(m_uniform,
value());
608void QQuickUniformAnimatorJob::postSync()
615 m_effect = qobject_cast<QQuickShaderEffect *>(m_target);
618void QQuickUniformAnimatorJob::invalidate()
626#include "moc_qquickanimatorjob_p.cpp"
QAbstractAnimationJob::State m_state
QAbstractAnimationJob::State state() const
void setLoopCount(int loopCount)
bool isRenderThreadJob() const
QAbstractAnimationJob::Direction m_direction
bool m_isRenderThreadProxy
qreal valueForProgress(qreal progress) const
Return the effective progress for the easing curve at progress.
QGraphicsWidget * window() const
bool remove(const Key &key)
Removes the item that has the key from the hash.
T value(const Key &key) const noexcept
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void unlock() noexcept
Unlocks the mutex.
void lock() noexcept
Locks the mutex.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\inmodule QtCore\reentrant
QQuickWindow * window() const
bool isPendingStart(const QSharedPointer< QAbstractAnimationJob > &job) const
void start(const QSharedPointer< QAbstractAnimationJob > &job)
void cancel(const QSharedPointer< QAbstractAnimationJob > &job)
void debugAnimation(QDebug d) const override
QPointer< QQuickItem > m_target
QQuickItem * target() const
virtual void setTarget(QQuickItem *target)
QQuickAnimatorController * m_controller
QQuickAnimatorController * controller() const
qreal progress(int time) const
virtual void initialize(QQuickAnimatorController *controller)
int duration() const override
void updateLoopCount(int) override
~QQuickAnimatorProxyJob()
int duration() const override
const QSharedPointer< QAbstractAnimationJob > & job() const
void sceneGraphInitialized()
QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QQuickAbstractAnimation *animation)
void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override
void debugAnimation(QDebug d) const override
void windowChanged(QQuickWindow *window)
void updateCurrentTime(int) override
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
qreal y
Defines the item's y position relative to its parent.
qreal rotation
\qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clo...
qreal scale
\qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item.
QPointF transformOriginPoint
void writeBack() override
QQuickOpacityAnimatorJob()
void updateCurrentTime(int time) override
void invalidate() override
void updateCurrentTime(int time) override
void writeBack() override
QQuickRotationAnimatorJob()
void writeBack() override
void updateCurrentTime(int time) override
static QQuickWindowPrivate * get(QQuickWindow *c)
QScopedPointer< QQuickAnimatorController > animationController
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
void sceneGraphInitialized()
\qmlsignal QtQuick::Window::frameSwapped()
void updateCurrentTime(int time) override
void writeBack() override
void updateCurrentTime(int time) override
void writeBack() override
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
void reparentChildNodesTo(QSGNode *newParent)
void appendChildNode(QSGNode *node)
Appends node to this node's list of children.
The QSGOpacityNode class is used to change opacity of nodes.
void setOpacity(qreal opacity)
Sets the opacity of this node to opacity.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
float toFloat(bool *ok=nullptr) const
Returns the variant as a float if the variant has userType() \l QMetaType::Double,...
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
QTextStream & dec(QTextStream &stream)
Calls QTextStream::setIntegerBase(10) on stream and returns stream.
QPointer< QCocoaFileDialogHelper > m_helper
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
constexpr const T & qBound(const T &min, const T &val, const T &max)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLenum GLenum GLenum GLenum GLenum scale
QVariant _q_interpolateClockwiseRotation(qreal &f, qreal &t, qreal progress)
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
\qmltype RotationAnimation \instantiates QQuickRotationAnimation \inqmlmodule QtQuick\inherits Proper...
QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal progress)
QVariant _q_interpolateClockwiseRotation(qreal &f, qreal &t, qreal progress)
static void qquick_syncback_helper(QAbstractAnimationJob *job)
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
\qmltype RotationAnimation \instantiates QQuickRotationAnimation \inqmlmodule QtQuick\inherits Proper...
QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal progress)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
myObject disconnect()
[26]