7#include <private/qqmlproperty_p.h>
8#include "private/qcontinuinganimationgroupjob_p.h"
10#include <QtCore/qdebug.h>
12#include <private/qobject_p.h>
16#define DELAY_STOP_TIMER_INTERVAL 32
127 , animationTemplate(
priv)
133 if (animationTemplate) {
141 if (
it.value() ==
this) {
201 bool stopped =
false;
205 srcVal = fmod(srcVal,
modulus);
271 if (stopped && old_to ==
to) {
272 if (animationTemplate)
288 <<
"mass:" <<
mass <<
"target:" <<
target.object() <<
"property:" <<
target.name()
289 <<
"to:" <<
to <<
"current velocity:" <<
velocity;
350 it.value()->clearTemplate();
364 return d->maxVelocity;
490 d->useMass =
mass != 1.0;
509 for (
int i = 0;
i < dataActions.
size(); ++
i) {
511 bool needsRestart =
false;
513 if (
d->activeAnimations.contains(
property)) {
537 if (
d->fromIsDefined)
543 if (
d->haveModulus &&
dist >
d->modulus / 2)
552 const auto copy =
d->activeAnimations;
555 anim->clearTemplate();
556 d->activeAnimations.remove(anim->target);
565#include "moc_qquickspringanimation_p.cpp"
virtual void debugAnimation(QDebug d) const
virtual void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
virtual int duration() const
virtual void updateCurrentTime(int)
void appendAnimation(QAbstractAnimationJob *animation)
qint64 elapsed() const noexcept
Returns the number of milliseconds since this QElapsedTimer was last started.
void start() noexcept
Starts this timer.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
iterator Iterator
Qt-style synonym for QHash::iterator.
iterator erase(const_iterator it)
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
static bool write(QObject *, const QQmlPropertyData &, const QVariant &, const QQmlRefPointer< QQmlContextData > &, QQmlPropertyData::WriteFlags flags={})
The QQmlProperty class abstracts accessing properties on objects created from QML.
QAbstractAnimationJob * initInstance(QAbstractAnimationJob *animation)
QQuickStateActions createTransitionActions(QQuickStateActions &actions, QQmlProperties &modified, QObject *defaultTarget=nullptr)
QSpringAnimation::Mode mode
QQuickSpringAnimationPrivate()
QSpringAnimation::ActiveAnimationHash activeAnimations
QQuickSpringAnimation(QObject *parent=nullptr)
\qmltype SpringAnimation \instantiates QQuickSpringAnimation \inqmlmodule QtQuick\inherits NumberAnim...
void setMass(qreal modulus)
void setEpsilon(qreal epsilon)
void setModulus(qreal modulus)
void setDamping(qreal damping)
void setVelocity(qreal velocity)
QAbstractAnimationJob * transition(QQuickStateActions &actions, QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget=nullptr) override
void setSpring(qreal spring)
bool contains(const T &value) const
iterator insert(const T &value)
QSpringAnimation(QQuickSpringAnimationPrivate *=nullptr)
int duration() const override
void updateCurrentTime(int time) override
void updateState(QAbstractAnimationJob::State, QAbstractAnimationJob::State) override
void debugAnimation(QDebug d) const override
QHash< QQmlProperty, QSpringAnimation * > ActiveAnimationHash
ActiveAnimationHash::Iterator ActiveAnimationHashIt
QVariant currentValue
the current value of the animation.
qreal toReal(bool *ok=nullptr) const
Returns the variant as a qreal if the variant has userType() \l QMetaType::Double,...
QSet< QString >::iterator it
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.
static jboolean copy(JNIEnv *, jobject)
constexpr T qAbs(const T &t)
GLenum GLenum GLsizei count
static const qreal epsilon
#define DELAY_STOP_TIMER_INTERVAL
static double elapsed(qint64 after, qint64 before)
#define Q_AUTOTEST_EXPORT
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
std::uniform_real_distribution dist(1, 2.5)
[2]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent