Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicktimeline.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QDebug>
7#include <QMutex>
8#include <QThread>
9#include <QWaitCondition>
10#include <QEvent>
11#include <QCoreApplication>
12#include <QEasingCurve>
13#include <QTime>
14#include <QtCore/private/qnumeric_p.h>
15#include <QHash>
16
17#include <algorithm>
18
20
21Q_LOGGING_CATEGORY(lcTl, "qt.quick.timeline")
22
23struct Update {
25 : g(_g), v(_v) {}
27 : g(nullptr), v(0), e(_e) {}
28
32};
33
35{
37
38 struct Op {
39 enum Type {
40 Pause, // Pauses any value updates
41 Set, // Instantly changes the value to a target value
42 Move, // Moves towards a target value over time
43 MoveBy, // Same as Move, but target value is now an offset from the starting value
44 Accel, // Moves towards a target value over time with a constant acceleration
46 Execute // Calls back a function
47 };
48 Op() {}
49 Op(Type t, int l, qreal v, qreal v2, int o,
51 : type(t), length(l), value(v), value2(v2), order(o), event(ev),
52 easing(es) {}
56 Op &operator=(const Op &o) {
57 type = o.type; length = o.length; value = o.value;
58 value2 = o.value2; order = o.order; event = o.event;
59 easing = o.easing;
60 return *this;
61 }
62
64 int length;
67
68 int order;
71 };
72 struct TimeLine
73 {
75 QList<Op> ops;
76 int length = 0;
78 qreal base = 0.;
79 };
80
81 int length;
83 typedef QHash<QQuickTimeLineObject *, TimeLine> Ops;
86
87 void add(QQuickTimeLineObject &, const Op &);
88 qreal value(const Op &op, int time, qreal base, bool *) const;
89
90 int advance(int);
91
94
95 int order;
96
99 QList<QPair<int, Update> > *updateQueue;
100};
101
103: length(0), syncPoint(0), q(parent), clockRunning(false), prevTime(0), order(0), syncMode(QQuickTimeLine::LocalSync), syncAdj(0), updateQueue(nullptr)
104{
105}
106
108{
109 if (g._t && g._t != q) {
110 qWarning() << "QQuickTimeLine: Cannot modify a QQuickTimeLineValue owned by"
111 << "another timeline.";
112 return;
113 }
114 g._t = q;
115
117 if (iter == ops.end()) {
118 iter = ops.insert(&g, TimeLine());
119 if (syncPoint > 0)
120 q->pause(g, syncPoint);
121 }
122 if (!iter->ops.isEmpty() &&
123 o.type == Op::Pause &&
124 iter->ops.constLast().type == Op::Pause) {
125 // If the last operation was a pause, and we're adding another, simply prolong it.
126 iter->ops.last().length += o.length;
127 iter->length += o.length;
128 } else {
129 // Add to the list of operations
130 iter->ops.append(o);
131 iter->length += o.length;
132 }
133
134 if (iter->length > length)
135 length = iter->length;
136
137 if (!clockRunning) {
138 q->stop();
139 prevTime = 0;
140 clockRunning = true;
141
143 syncAdj = -1;
144 } else {
145 syncAdj = 0;
146 }
147 q->start();
148/* q->tick(0);
149 if (syncMode == QQuickTimeLine::LocalSync) {
150 syncAdj = -1;
151 } else {
152 syncAdj = 0;
153 }
154 */
155 }
156}
157
158qreal QQuickTimeLinePrivate::value(const Op &op, int time, qreal base, bool *changed) const
159{
160 Q_ASSERT(time >= 0);
161 Q_ASSERT(time <= op.length);
162 *changed = true;
163
164 switch(op.type) {
165 case Op::Pause:
166 *changed = false;
167 return base;
168 case Op::Set:
169 return op.value;
170 case Op::Move:
171 if (time == 0) {
172 return base;
173 } else if (time == (op.length)) {
174 return op.value;
175 } else {
176 qreal delta = op.value - base;
177 qreal pTime = (qreal)(time) / (qreal)op.length;
178 if (op.easing.type() == QEasingCurve::Linear)
179 return base + delta * pTime;
180 else
181 return base + delta * op.easing.valueForProgress(pTime);
182 }
183 case Op::MoveBy:
184 if (time == 0) {
185 return base;
186 } else if (time == (op.length)) {
187 return base + op.value;
188 } else {
189 qreal delta = op.value;
190 qreal pTime = (qreal)(time) / (qreal)op.length;
191 if (op.easing.type() == QEasingCurve::Linear)
192 return base + delta * pTime;
193 else
194 return base + delta * op.easing.valueForProgress(pTime);
195 }
196 case Op::Accel:
197 if (time == 0) {
198 return base;
199 } else {
200 qreal t = (qreal)(time) / 1000.0f;
201 qreal delta = op.value * t + 0.5f * op.value2 * t * t;
202 return base + delta;
203 }
205 if (time == 0) {
206 return base;
207 } else if (time == (op.length)) {
208 return base + op.value2;
209 } else {
210 qreal t = (qreal)(time) / 1000.0f;
211 qreal accel = -1.0f * 1000.0f * op.value / (qreal)op.length;
212 qreal delta = op.value * t + 0.5f * accel * t * t;
213 return base + delta;
214
215 }
216 case Op::Execute:
217 op.event.d0(op.event.d1);
218 *changed = false;
219 return -1;
220 }
221
222 return base;
223}
224
284 : QObject(parent)
285{
286 d = new QQuickTimeLinePrivate(this);
287}
288
294{
296 iter != d->ops.end();
297 ++iter)
298 iter.key()->_t = nullptr;
299
300 delete d; d = nullptr;
301}
302
314
319{
320 d->syncMode = syncMode;
321}
322
327{
328 if (time <= 0) return;
330 d->add(obj, op);
331}
332
337{
339 d->add(*callback.callbackObject(), op);
340}
341
346{
348 d->add(timeLineValue, op);
349}
350
357int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration)
358{
359 if (qFuzzyIsNull(acceleration) || qt_is_nan(acceleration))
360 return -1;
361
362 if ((velocity > 0.0f) == (acceleration > 0.0f))
363 acceleration = acceleration * -1.0f;
364
365 int time = static_cast<int>(-1000 * velocity / acceleration);
366 if (time <= 0) return -1;
367
368 QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
369 d->add(timeLineValue, op);
370
371 return time;
372}
373
384int QQuickTimeLine::accel(QQuickTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance)
385{
386 if (qFuzzyIsNull(maxDistance) || qt_is_nan(maxDistance) || qFuzzyIsNull(acceleration) || qt_is_nan(acceleration))
387 return -1;
388
389 Q_ASSERT(acceleration > 0.0f && maxDistance > 0.0f);
390
391 qreal maxAccel = (velocity * velocity) / (2.0f * maxDistance);
392 if (maxAccel > acceleration)
393 acceleration = maxAccel;
394
395 if ((velocity > 0.0f) == (acceleration > 0.0f))
396 acceleration = acceleration * -1.0f;
397
398 int time = static_cast<int>(-1000 * velocity / acceleration);
399 if (time <= 0) return -1;
400
401 QQuickTimeLinePrivate::Op op(QQuickTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
402 d->add(timeLineValue, op);
403
404 return time;
405}
406
415{
416 if (qFuzzyIsNull(distance) || qt_is_nan(distance) || qFuzzyIsNull(velocity) || qt_is_nan(velocity))
417 return -1;
418
419 Q_ASSERT((distance >= 0.0f) == (velocity >= 0.0f));
420
421 int time = static_cast<int>(1000 * (2.0f * distance) / velocity);
422 if (time <= 0) return -1;
423
425 d->add(timeLineValue, op);
426
427 return time;
428}
429
435{
436 if (time <= 0) return;
438 d->add(timeLineValue, op);
439}
440
446{
447 if (time <= 0) return;
449 d->add(timeLineValue, op);
450}
451
456void QQuickTimeLine::moveBy(QQuickTimeLineValue &timeLineValue, qreal change, int time)
457{
458 if (time <= 0) return;
460 d->add(timeLineValue, op);
461}
462
468{
469 if (time <= 0) return;
471 d->add(timeLineValue, op);
472}
473
478{
479 if (!timeLineValue._t)
480 return;
481 if (timeLineValue._t != this) {
482 qWarning() << "QQuickTimeLine: Cannot reset a QQuickTimeLineValue owned by another timeline.";
483 return;
484 }
485 qCDebug(lcTl) << static_cast<QObject*>(this) << timeLineValue.value();
486 remove(&timeLineValue);
487 timeLineValue._t = nullptr;
488}
489
491{
492 return -1;
493}
494
507{
509 if (iter == d->ops.end())
510 return;
511 int length = iter->length;
512
513 iter = d->ops.find(&timeLineValue);
514 if (iter == d->ops.end()) {
515 pause(timeLineValue, length);
516 } else {
517 int glength = iter->length;
518 pause(timeLineValue, length - glength);
519 }
520}
521
532{
534 if (iter == d->ops.end()) {
535 pause(timeLineValue, d->length);
536 } else {
537 pause(timeLineValue, d->length - iter->length);
538 }
539}
540
541/*
542 Synchronize all currently and future scheduled values in this timeline to
543 the longest action currently scheduled.
544
545 For example:
546 \code
547 value1->setValue(0.);
548 value2->setValue(0.);
549 value3->setValue(0.);
550 QQuickTimeLine tl;
551 ...
552 tl.move(value1, 10, 200);
553 tl.move(value2, 10, 100);
554 tl.sync();
555 tl.move(value2, 20, 100);
556 tl.move(value3, 20, 100);
557 \endcode
558
559 will result in:
560
561 \table
562 \header \li \li 0ms \li 50ms \li 100ms \li 150ms \li 200ms \li 250ms \li 300ms
563 \row \li value1 \li 0 \li 2.5 \li 5.0 \li 7.5 \li 10 \li 10 \li 10
564 \row \li value2 \li 0 \li 5.0 \li 10.0 \li 10.0 \li 10.0 \li 15.0 \li 20.0
565 \row \li value2 \li 0 \li 0 \li 0 \li 0 \li 0 \li 10.0 \li 20.0
566 \endtable
567*/
568
569/*void QQuickTimeLine::sync()
570{
571 for (QQuickTimeLinePrivate::Ops::Iterator iter = d->ops.begin();
572 iter != d->ops.end();
573 ++iter)
574 pause(*iter.key(), d->length - iter->length);
575 d->syncPoint = d->length;
576}*/
577
584{
585 d->syncPoint = sp;
586}
587
594{
595 return d->syncPoint;
596}
597
603{
604 return !d->ops.isEmpty();
605}
606
620{
621 d->advance(d->length);
622}
623
637{
638 for (QQuickTimeLinePrivate::Ops::const_iterator iter = d->ops.cbegin(), cend = d->ops.cend(); iter != cend; ++iter)
639 iter.key()->_t = nullptr;
640 d->ops.clear();
641 d->length = 0;
642 d->syncPoint = 0;
643 //XXX need stop here?
644}
645
647{
648 return d->prevTime;
649}
650
659{
660 if (d->syncAdj == -1)
661 d->syncAdj = v;
662 v -= d->syncAdj;
663
664 int timeChanged = v - d->prevTime;
665#if 0
666 if (!timeChanged)
667 return;
668#endif
669 d->prevTime = v;
670 d->advance(timeChanged);
671 emit updated();
672
673 // Do we need to stop the clock?
674 if (d->ops.isEmpty()) {
675 stop();
676 d->prevTime = 0;
677 d->clockRunning = false;
678 emit completed();
679 } /*else if (pauseTime > 0) {
680 GfxClock::cancelClock();
681 d->prevTime = 0;
682 GfxClock::pauseFor(pauseTime);
683 d->syncAdj = 0;
684 d->clockRunning = false;
685 }*/ else if ( state() != Running) {
686 stop();
687 d->prevTime = 0;
688 d->clockRunning = true;
689 d->syncAdj = 0;
690 start();
691 }
692}
693
695{
696 d << "QuickTimeLine(" << Qt::hex << (const void *) this << Qt::dec << ")";
697}
698
699bool operator<(const QPair<int, Update> &lhs,
700 const QPair<int, Update> &rhs)
701{
702 return lhs.first < rhs.first;
703}
704
706{
707 int pauseTime = -1;
708
709 // XXX - surely there is a more efficient way?
710 do {
711 pauseTime = -1;
712 // Minimal advance time
713 int advanceTime = t;
714 for (Ops::const_iterator iter = ops.constBegin(), cend = ops.constEnd(); iter != cend; ++iter) {
715 const TimeLine &tl = *iter;
716 const Op &op = tl.ops.first();
717 int length = op.length - tl.consumedOpLength;
718
719 if (length < advanceTime) {
720 advanceTime = length;
721 if (advanceTime == 0)
722 break;
723 }
724 }
725 t -= advanceTime;
726
727 // Process until then. A zero length advance time will only process
728 // sets.
729 QList<QPair<int, Update> > updates;
730
731 for (Ops::Iterator iter = ops.begin(); iter != ops.end(); ) {
732 QQuickTimeLineValue *v = static_cast<QQuickTimeLineValue *>(iter.key());
733 TimeLine &tl = *iter;
734 Q_ASSERT(!tl.ops.isEmpty());
735
736 do {
737 Op &op = tl.ops.first();
738 if (advanceTime == 0 && op.length != 0)
739 continue;
740
741 if (tl.consumedOpLength == 0 &&
742 op.type != Op::Pause &&
743 op.type != Op::Execute)
744 tl.base = v->value();
745
746 if ((tl.consumedOpLength + advanceTime) == op.length) {
747 // Finishing operation, the timeline value will be the operation's target value.
748 if (op.type == Op::Execute) {
749 updates << qMakePair(op.order, Update(op.event));
750 } else {
751 bool changed = false;
752 qreal val = value(op, op.length, tl.base, &changed);
753 if (changed)
754 updates << qMakePair(op.order, Update(v, val));
755 }
756 tl.length -= qMin(advanceTime, tl.length);
757 tl.consumedOpLength = 0;
758 tl.ops.removeFirst();
759 } else {
760 // Partially finished operation, the timeline value will be between the base
761 // value and the target value, depending on progress and type of operation.
762 tl.consumedOpLength += advanceTime;
763 bool changed = false;
764 qreal val = value(op, tl.consumedOpLength, tl.base, &changed);
765 if (changed)
766 updates << qMakePair(op.order, Update(v, val));
767 tl.length -= qMin(advanceTime, tl.length);
768 break;
769 }
770
771 } while(!tl.ops.isEmpty() && advanceTime == 0 && tl.ops.first().length == 0);
772
773
774 if (tl.ops.isEmpty()) {
775 iter = ops.erase(iter);
776 v->_t = nullptr;
777 } else {
778 if (tl.ops.first().type == Op::Pause && pauseTime != 0) {
779 int opPauseTime = tl.ops.first().length - tl.consumedOpLength;
780 if (pauseTime == -1 || opPauseTime < pauseTime)
781 pauseTime = opPauseTime;
782 } else {
783 pauseTime = 0;
784 }
785 ++iter;
786 }
787 }
788
789 length -= qMin(length, advanceTime);
790 syncPoint -= advanceTime;
791
792 std::sort(updates.begin(), updates.end());
793 updateQueue = &updates;
794 for (int ii = 0; ii < updates.size(); ++ii) {
795 const Update &v = updates.at(ii).second;
796 if (v.g) {
797 v.g->setValue(v.v);
798 } else {
799 v.e.d0(v.e.d1);
800 }
801 }
802 updateQueue = nullptr;
803 } while(t);
804
805 return pauseTime;
806}
807
808void QQuickTimeLine::remove(QQuickTimeLineObject *v)
809{
811 Q_ASSERT(iter != d->ops.end());
812
813 int len = iter->length;
814 d->ops.erase(iter);
815 if (len == d->length) {
816 // We need to recalculate the length
817 d->length = 0;
819 iter != d->ops.end();
820 ++iter) {
821
822 if (iter->length > d->length)
823 d->length = iter->length;
824
825 }
826 }
827 if (d->ops.isEmpty()) {
828 stop();
829 d->clockRunning = false;
830 } else if (state() != Running) { // was !GfxClock::isActive()
831 stop();
832 d->prevTime = 0;
833 d->clockRunning = true;
834
836 d->syncAdj = -1;
837 } else {
838 d->syncAdj = 0;
839 }
840 start();
841 }
842
843 if (d->updateQueue) {
844 for (int ii = 0; ii < d->updateQueue->size(); ++ii) {
845 if (d->updateQueue->at(ii).second.g == v ||
846 d->updateQueue->at(ii).second.e.callbackObject() == v) {
847 d->updateQueue->removeAt(ii);
848 --ii;
849 }
850 }
851 }
852
853
854}
855
892
894{
895 if (_t) {
896 _t->remove(this);
897 _t = nullptr;
898 }
899}
900
905
910
915
917{
918 d0 = o.d0;
919 d1 = o.d1;
920 d2 = o.d2;
921 return *this;
922}
923
928
930
931#include "moc_qquicktimeline_p_p.cpp"
std::deque< UpdateRequest > updateQueue
QAbstractAnimationJob::State state() const
\inmodule QtCore
\inmodule QtCore
Type type() const
Returns the type of the easing curve.
qreal valueForProgress(qreal progress) const
Return the effective progress for the easing curve at progress.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
Definition qhash.h:1212
const_iterator cbegin() const noexcept
Definition qhash.h:1214
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
Definition qhash.h:1219
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
Definition qhash.h:1291
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
Definition qhash.h:1215
iterator Iterator
Qt-style synonym for QHash::iterator.
Definition qhash.h:1288
iterator erase(const_iterator it)
Definition qhash.h:1233
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
Definition qhash.h:1216
const_iterator cend() const noexcept
Definition qhash.h:1218
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
Definition qhash.h:951
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
Definition qhash.h:928
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1303
qsizetype size() const noexcept
Definition qlist.h:397
void removeAt(qsizetype i)
Definition qlist.h:590
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
\inmodule QtCore
Definition qobject.h:103
QQuickTimeLineCallback & operator=(const QQuickTimeLineCallback &o)
QQuickTimeLineObject * callbackObject() const
The QQuickTimeLineValue class provides a value that can be modified by QQuickTimeLine.
The QQuickTimeLine class provides a timeline for controlling animations.
void debugAnimation(QDebug d) const override
friend struct QQuickTimeLinePrivate
void reset(QQuickTimeLineValue &)
Cancel (but don't complete) all scheduled actions for timeLineValue.
void setSyncMode(SyncMode)
Set the timeline's synchronization mode to syncMode.
int accel(QQuickTimeLineValue &, qreal velocity, qreal accel)
Decelerate timeLineValue from the starting velocity to zero at the given acceleration rate.
void callback(const QQuickTimeLineCallback &)
Execute the event.
bool isActive() const
Returns true if the timeline is active.
void complete()
Completes the timeline.
void clear()
Resets the timeline.
void updateCurrentTime(int) override
QQuickTimeLine(QObject *parent=nullptr)
Construct a new QQuickTimeLine with the specified parent.
int syncPoint() const
int accelDistance(QQuickTimeLineValue &, qreal velocity, qreal distance)
Decelerate timeLineValue from the starting velocity to zero over the given distance.
void set(QQuickTimeLineValue &, qreal)
Set the value of timeLineValue.
SyncMode syncMode() const
Return the timeline's synchronization mode.
void move(QQuickTimeLineValue &, qreal destination, int time=500)
Linearly change the timeLineValue from its current value to the given destination value over time mil...
void moveBy(QQuickTimeLineValue &, qreal change, int time=500)
Linearly change the timeLineValue from its current value by the change amount over time milliseconds.
void updated()
Emitted each time the timeline modifies QQuickTimeLineValues.
~QQuickTimeLine()
Destroys the time line.
int duration() const override
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.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char * destination
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition qfloat16.h:349
#define qWarning
Definition qlogging.h:166
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
static Q_DECL_CONST_FUNCTION bool qt_is_nan(double d)
Definition qnumeric_p.h:112
GLint GLfloat GLfloat GLfloat v2
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLenum GLuint GLenum GLsizei length
GLfloat GLfloat f
GLsizei GLsizei GLfloat distance
GLenum type
GLboolean GLboolean g
struct _cl_event * event
GLhandleARB obj
[2]
GLuint GLfloat * val
GLdouble GLdouble t
Definition qopenglext.h:243
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
GLenum GLsizei len
GLfixed GLfixed GLint GLint order
QT_BEGIN_NAMESPACE constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
Definition qpair.h:19
bool operator<(const QPair< int, Update > &lhs, const QPair< int, Update > &rhs)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define sp
#define emit
double qreal
Definition qtypes.h:187
static const uint base
Definition qurlidna.cpp:20
QObject::connect nullptr
QDate d1(1995, 5, 17)
[0]
QDate d2(1995, 5, 20)
QEasingCurve easing(QEasingCurve::InOutQuad)
[typedef]
Op & operator=(const Op &o)
Op(Type t, int l, qreal v, qreal v2, int o, const QQuickTimeLineCallback &ev=QQuickTimeLineCallback(), const QEasingCurve &es=QEasingCurve())
QQuickTimeLineCallback event
QQuickTimeLine::SyncMode syncMode
qreal value(const Op &op, int time, qreal base, bool *) const
void add(QQuickTimeLineObject &, const Op &)
QQuickTimeLinePrivate(QQuickTimeLine *)
QHash< QQuickTimeLineObject *, TimeLine > Ops
QList< QPair< int, Update > > * updateQueue
Definition moc.h:23
QQuickTimeLineValue * g
QQuickTimeLineCallback e
Update(const QQuickTimeLineCallback &_e)
Update(QQuickTimeLineValue *_g, qreal _v)