| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickanimation_p_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | - | |
| 5 | - | |
| 6 | - | |
| 7 | - | |
| 8 | - | |
| 9 | - | |
| 10 | - | |
| 11 | class QAbstractAnimationAction | - |
| 12 | { | - |
| 13 | public: | - |
| 14 | virtual ~QAbstractAnimationAction() {} | - |
| 15 | virtual void doAction() = 0; | - |
| 16 | virtual void debugAction(QDebug, int) const {} | - |
| 17 | }; | - |
| 18 | - | |
| 19 | - | |
| 20 | - | |
| 21 | - | |
| 22 | template<class T, void (T::*method)(), void (T::*debugMethod)(QDebug, int) const> | - |
| 23 | class QAnimationActionProxy : public QAbstractAnimationAction | - |
| 24 | { | - |
| 25 | public: | - |
| 26 | QAnimationActionProxy(T *instance) : m_instance(instance) {} executed 21638 times by 8 tests: end of blockExecuted by:
| 21638 |
| 27 | void doAction() override { (m_instance->*method)(); } executed 18056 times by 8 tests: end of blockExecuted by:
| 18056 |
| 28 | void debugAction(QDebug d, int indentLevel) const override { (m_instance->*debugMethod)(d, indentLevel); } never executed: end of block | 0 |
| 29 | private: | - |
| 30 | T *m_instance; | - |
| 31 | }; | - |
| 32 | - | |
| 33 | - | |
| 34 | class __attribute__((visibility("default"))) QActionAnimation : public QAbstractAnimationJob | - |
| 35 | { | - |
| 36 | QActionAnimation(const QActionAnimation &) = delete; QActionAnimation &operator=(const QActionAnimation &) = delete; | - |
| 37 | public: | - |
| 38 | QActionAnimation(); | - |
| 39 | - | |
| 40 | QActionAnimation(QAbstractAnimationAction *action); | - |
| 41 | ~QActionAnimation() override; | - |
| 42 | - | |
| 43 | int duration() const override; | - |
| 44 | void setAnimAction(QAbstractAnimationAction *action); | - |
| 45 | - | |
| 46 | protected: | - |
| 47 | void updateCurrentTime(int) override; | - |
| 48 | void updateState(State newState, State oldState) override; | - |
| 49 | void debugAnimation(QDebug d) const override; | - |
| 50 | - | |
| 51 | private: | - |
| 52 | QAbstractAnimationAction *animAction; | - |
| 53 | }; | - |
| 54 | - | |
| 55 | class QQuickBulkValueUpdater | - |
| 56 | { | - |
| 57 | public: | - |
| 58 | virtual ~QQuickBulkValueUpdater() {} | - |
| 59 | virtual void setValue(qreal value) = 0; | - |
| 60 | virtual void debugUpdater(QDebug, int) const {} | - |
| 61 | }; | - |
| 62 | - | |
| 63 | - | |
| 64 | class __attribute__((visibility("default"))) QQuickBulkValueAnimator : public QAbstractAnimationJob | - |
| 65 | { | - |
| 66 | QQuickBulkValueAnimator(const QQuickBulkValueAnimator &) = delete; QQuickBulkValueAnimator &operator=(const QQuickBulkValueAnimator &) = delete; | - |
| 67 | public: | - |
| 68 | QQuickBulkValueAnimator(); | - |
| 69 | ~QQuickBulkValueAnimator() override; | - |
| 70 | - | |
| 71 | void setAnimValue(QQuickBulkValueUpdater *value); | - |
| 72 | QQuickBulkValueUpdater *getAnimValue() const { return executed 12 times by 2 tests: animValue;return animValue;Executed by:
executed 12 times by 2 tests: }return animValue;Executed by:
| 12 |
| 73 | - | |
| 74 | void setFromSourcedValue(bool *value) { fromSourced = value; } executed 34524 times by 13 tests: end of blockExecuted by:
| 34524 |
| 75 | - | |
| 76 | int duration() const override { return executed 1162518 times by 13 tests: m_duration;return m_duration;Executed by:
executed 1162518 times by 13 tests: }return m_duration;Executed by:
| 1162518 |
| 77 | void setDuration(int msecs) { m_duration = msecs; } executed 34538 times by 13 tests: end of blockExecuted by:
| 34538 |
| 78 | - | |
| 79 | QEasingCurve easingCurve() const { return executed 2 times by 1 test: easing;return easing;Executed by:
executed 2 times by 1 test: }return easing;Executed by:
| 2 |
| 80 | void setEasingCurve(const QEasingCurve &curve) { easing = curve; } executed 34538 times by 13 tests: end of blockExecuted by:
| 34538 |
| 81 | - | |
| 82 | protected: | - |
| 83 | void updateCurrentTime(int currentTime) override; | - |
| 84 | void topLevelAnimationLoopChanged() override; | - |
| 85 | void debugAnimation(QDebug d) const override; | - |
| 86 | - | |
| 87 | private: | - |
| 88 | QQuickBulkValueUpdater *animValue; | - |
| 89 | bool *fromSourced; | - |
| 90 | int m_duration; | - |
| 91 | QEasingCurve easing; | - |
| 92 | }; | - |
| 93 | - | |
| 94 | - | |
| 95 | template<class T, void (T::*method)(int)> | - |
| 96 | class QTickAnimationProxy : public QAbstractAnimationJob | - |
| 97 | { | - |
| 98 | QTickAnimationProxy(const QTickAnimationProxy &) = delete; QTickAnimationProxy &operator=(const QTickAnimationProxy &) = delete; | - |
| 99 | public: | - |
| 100 | QTickAnimationProxy(T *instance) : QAbstractAnimationJob(), m_instance(instance) {} executed 8 times by 2 tests: end of blockExecuted by:
| 8 |
| 101 | int duration() const override { return executed 226 times by 2 tests: -1;return -1;Executed by:
executed 226 times by 2 tests: }return -1;Executed by:
| 226 |
| 102 | protected: | - |
| 103 | void updateCurrentTime(int msec) override { (m_instance->*method)(msec); } executed 226 times by 2 tests: end of blockExecuted by:
| 226 |
| 104 | - | |
| 105 | private: | - |
| 106 | T *m_instance; | - |
| 107 | }; | - |
| 108 | - | |
| 109 | class __attribute__((visibility("default"))) QQuickAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener | - |
| 110 | { | - |
| 111 | inline QQuickAbstractAnimation* q_func() { return static_cast<QQuickAbstractAnimation *>(q_ptr); } inline const QQuickAbstractAnimation* q_func() const { return static_cast<const QQuickAbstractAnimation *>(q_ptr); } friend class QQuickAbstractAnimation; | - |
| 112 | public: | - |
| 113 | QQuickAbstractAnimationPrivate() | - |
| 114 | : running(false), paused(false), alwaysRunToEnd(false), | - |
| 115 | componentComplete(true), | - |
| 116 | avoidPropertyValueSourceStart(false), disableUserControl(false), | - |
| 117 | registered(false), loopCount(1), group(nullptr), animationInstance(nullptr) {} executed 27504 times by 20 tests: end of blockExecuted by:
| 27504 |
| 118 | - | |
| 119 | bool running:1; | - |
| 120 | bool paused:1; | - |
| 121 | bool alwaysRunToEnd:1; | - |
| 122 | - | |
| 123 | bool componentComplete:1; | - |
| 124 | bool avoidPropertyValueSourceStart:1; | - |
| 125 | bool disableUserControl:1; | - |
| 126 | bool registered:1; | - |
| 127 | - | |
| 128 | int loopCount; | - |
| 129 | - | |
| 130 | void commence(); | - |
| 131 | void animationFinished(QAbstractAnimationJob *) override; | - |
| 132 | - | |
| 133 | QQmlProperty defaultProperty; | - |
| 134 | - | |
| 135 | QQuickAnimationGroup *group; | - |
| 136 | QAbstractAnimationJob* animationInstance; | - |
| 137 | - | |
| 138 | static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr); | - |
| 139 | }; | - |
| 140 | - | |
| 141 | class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate | - |
| 142 | { | - |
| 143 | inline QQuickPauseAnimation* q_func() { return static_cast<QQuickPauseAnimation *>(q_ptr); } inline const QQuickPauseAnimation* q_func() const { return static_cast<const QQuickPauseAnimation *>(q_ptr); } friend class QQuickPauseAnimation; | - |
| 144 | public: | - |
| 145 | QQuickPauseAnimationPrivate() | - |
| 146 | : QQuickAbstractAnimationPrivate(), duration(250) {} executed 4290 times by 11 tests: end of blockExecuted by:
| 4290 |
| 147 | - | |
| 148 | int duration; | - |
| 149 | }; | - |
| 150 | - | |
| 151 | class QQuickScriptActionPrivate : public QQuickAbstractAnimationPrivate | - |
| 152 | { | - |
| 153 | inline QQuickScriptAction* q_func() { return static_cast<QQuickScriptAction *>(q_ptr); } inline const QQuickScriptAction* q_func() const { return static_cast<const QQuickScriptAction *>(q_ptr); } friend class QQuickScriptAction; | - |
| 154 | public: | - |
| 155 | QQuickScriptActionPrivate(); | - |
| 156 | - | |
| 157 | QQmlScriptString script; | - |
| 158 | QString name; | - |
| 159 | QQmlScriptString runScriptScript; | - |
| 160 | bool hasRunScriptScript; | - |
| 161 | bool reversing; | - |
| 162 | - | |
| 163 | void execute(); | - |
| 164 | QAbstractAnimationAction* createAction(); | - |
| 165 | void debugAction(QDebug d, int indentLevel) const; | - |
| 166 | typedef QAnimationActionProxy<QQuickScriptActionPrivate, | - |
| 167 | &QQuickScriptActionPrivate::execute, | - |
| 168 | &QQuickScriptActionPrivate::debugAction> Proxy; | - |
| 169 | }; | - |
| 170 | - | |
| 171 | class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate | - |
| 172 | { | - |
| 173 | inline QQuickPropertyAction* q_func() { return static_cast<QQuickPropertyAction *>(q_ptr); } inline const QQuickPropertyAction* q_func() const { return static_cast<const QQuickPropertyAction *>(q_ptr); } friend class QQuickPropertyAction; | - |
| 174 | public: | - |
| 175 | QQuickPropertyActionPrivate() | - |
| 176 | : QQuickAbstractAnimationPrivate(), target(nullptr) {} executed 3598 times by 11 tests: end of blockExecuted by:
| 3598 |
| 177 | - | |
| 178 | QObject *target; | - |
| 179 | QString propertyName; | - |
| 180 | QString properties; | - |
| 181 | QList<QObject *> targets; | - |
| 182 | QList<QObject *> exclude; | - |
| 183 | - | |
| 184 | QQmlNullableValue<QVariant> value; | - |
| 185 | }; | - |
| 186 | - | |
| 187 | class QQuickAnimationGroupPrivate : public QQuickAbstractAnimationPrivate | - |
| 188 | { | - |
| 189 | inline QQuickAnimationGroup* q_func() { return static_cast<QQuickAnimationGroup *>(q_ptr); } inline const QQuickAnimationGroup* q_func() const { return static_cast<const QQuickAnimationGroup *>(q_ptr); } friend class QQuickAnimationGroup; | - |
| 190 | public: | - |
| 191 | QQuickAnimationGroupPrivate() | - |
| 192 | : QQuickAbstractAnimationPrivate() {} executed 5156 times by 14 tests: end of blockExecuted by:
| 5156 |
| 193 | - | |
| 194 | static void append_animation(QQmlListProperty<QQuickAbstractAnimation> *list, QQuickAbstractAnimation *role); | - |
| 195 | static void clear_animation(QQmlListProperty<QQuickAbstractAnimation> *list); | - |
| 196 | QList<QQuickAbstractAnimation *> animations; | - |
| 197 | }; | - |
| 198 | - | |
| 199 | class QQuickPropertyAnimationPrivate : public QQuickAbstractAnimationPrivate | - |
| 200 | { | - |
| 201 | inline QQuickPropertyAnimation* q_func() { return static_cast<QQuickPropertyAnimation *>(q_ptr); } inline const QQuickPropertyAnimation* q_func() const { return static_cast<const QQuickPropertyAnimation *>(q_ptr); } friend class QQuickPropertyAnimation; | - |
| 202 | public: | - |
| 203 | QQuickPropertyAnimationPrivate() | - |
| 204 | : QQuickAbstractAnimationPrivate(), target(nullptr), fromSourced(false), fromIsDefined(false), toIsDefined(false), | - |
| 205 | defaultToInterpolatorType(0), interpolatorType(0), interpolator(nullptr), duration(250), actions(nullptr) {} executed 10358 times by 16 tests: end of blockExecuted by:
| 10358 |
| 206 | - | |
| 207 | QVariant from; | - |
| 208 | QVariant to; | - |
| 209 | - | |
| 210 | QObject *target; | - |
| 211 | QString propertyName; | - |
| 212 | QString properties; | - |
| 213 | QList<QObject *> targets; | - |
| 214 | QList<QObject *> exclude; | - |
| 215 | QString defaultProperties; | - |
| 216 | - | |
| 217 | bool fromSourced; | - |
| 218 | bool fromIsDefined:1; | - |
| 219 | bool toIsDefined:1; | - |
| 220 | bool defaultToInterpolatorType:1; | - |
| 221 | int interpolatorType; | - |
| 222 | QVariantAnimation::Interpolator interpolator; | - |
| 223 | int duration; | - |
| 224 | QEasingCurve easing; | - |
| 225 | - | |
| 226 | - | |
| 227 | QQuickStateActions *actions; | - |
| 228 | - | |
| 229 | static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress); | - |
| 230 | static void convertVariant(QVariant &variant, int type); | - |
| 231 | }; | - |
| 232 | - | |
| 233 | class QQuickRotationAnimationPrivate : public QQuickPropertyAnimationPrivate | - |
| 234 | { | - |
| 235 | inline QQuickRotationAnimation* q_func() { return static_cast<QQuickRotationAnimation *>(q_ptr); } inline const QQuickRotationAnimation* q_func() const { return static_cast<const QQuickRotationAnimation *>(q_ptr); } friend class QQuickRotationAnimation; | - |
| 236 | public: | - |
| 237 | QQuickRotationAnimationPrivate() : direction(QQuickRotationAnimation::Numerical) {} executed 14 times by 2 tests: end of blockExecuted by:
| 14 |
| 238 | - | |
| 239 | QQuickRotationAnimation::RotationDirection direction; | - |
| 240 | }; | - |
| 241 | - | |
| 242 | class __attribute__((visibility("default"))) QQuickAnimationPropertyUpdater : public QQuickBulkValueUpdater | - |
| 243 | { | - |
| 244 | public: | - |
| 245 | QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromSourced(false), fromDefined(false), wasDeleted(nullptr) {} executed 34502 times by 13 tests: end of blockExecuted by:
| 34502 |
| 246 | ~QQuickAnimationPropertyUpdater() override; | - |
| 247 | - | |
| 248 | void setValue(qreal v) override; | - |
| 249 | - | |
| 250 | void debugUpdater(QDebug d, int indentLevel) const override; | - |
| 251 | - | |
| 252 | QQuickStateActions actions; | - |
| 253 | int interpolatorType; | - |
| 254 | QVariantAnimation::Interpolator interpolator; | - |
| 255 | int prevInterpolatorType; | - |
| 256 | bool reverse; | - |
| 257 | bool fromSourced; | - |
| 258 | bool fromDefined; | - |
| 259 | bool *wasDeleted; | - |
| 260 | }; | - |
| 261 | - | |
| 262 | - | |
| Switch to Source code | Preprocessed file |