diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2018-04-23 18:02:15 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2018-04-27 14:07:23 +0000 |
commit | b2cd5db1e5bfcd168bce025b126d4c5a2fc9e0ae (patch) | |
tree | 5c7c4af9e7c536d1172271b6b2f7849668778c27 /src/imports/timeline/plugins.qmltypes | |
parent | e60155d6af1a9e1c86bfb7679dbd92ce616ad8fd (diff) |
Add TimelineAnimation
* New api to define animation clips
* Special animation type for timeline
* Adding ping pong for TimelineAnimation
* Adjusting manual tests
* Adding new manual tests
Change-Id: Ic670b389062ef4ac92e000bc99574e5fa04a7006
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/imports/timeline/plugins.qmltypes')
-rw-r--r-- | src/imports/timeline/plugins.qmltypes | 101 |
1 files changed, 94 insertions, 7 deletions
diff --git a/src/imports/timeline/plugins.qmltypes b/src/imports/timeline/plugins.qmltypes index a795dd0..b77b587 100644 --- a/src/imports/timeline/plugins.qmltypes +++ b/src/imports/timeline/plugins.qmltypes @@ -9,6 +9,44 @@ import QtQuick.tooling 1.2 Module { dependencies: [] Component { + name: "QQuickAbstractAnimation" + prototype: "QObject" + Enum { + name: "Loops" + values: { + "Infinite": -2 + } + } + Property { name: "running"; type: "bool" } + Property { name: "paused"; type: "bool" } + Property { name: "alwaysRunToEnd"; type: "bool" } + Property { name: "loops"; type: "int" } + Signal { name: "started" } + Signal { name: "stopped" } + Signal { + name: "runningChanged" + Parameter { type: "bool" } + } + Signal { + name: "pausedChanged" + Parameter { type: "bool" } + } + Signal { + name: "alwaysRunToEndChanged" + Parameter { type: "bool" } + } + Signal { + name: "loopCountChanged" + Parameter { type: "int" } + } + Method { name: "restart" } + Method { name: "start" } + Method { name: "pause" } + Method { name: "resume" } + Method { name: "stop" } + Method { name: "complete" } + } + Component { name: "QQuickKeyframe" prototype: "QObject" exports: ["QtQuick.Timeline/Keyframe 1.0"] @@ -19,6 +57,55 @@ Module { Signal { name: "easingCurveChanged" } } Component { + name: "QQuickKeyframeGroup" + defaultProperty: "keyframes" + prototype: "QObject" + exports: ["QtQuick.Timeline/KeyframeGroup 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "target"; type: "QObject"; isPointer: true } + Property { name: "property"; type: "string" } + Property { name: "keyframes"; type: "QQuickKeyframe"; isList: true; isReadonly: true } + } + Component { + name: "QQuickNumberAnimation" + prototype: "QQuickPropertyAnimation" + Property { name: "from"; type: "double" } + Property { name: "to"; type: "double" } + } + Component { + name: "QQuickPropertyAnimation" + prototype: "QQuickAbstractAnimation" + Property { name: "duration"; type: "int" } + Property { name: "from"; type: "QVariant" } + Property { name: "to"; type: "QVariant" } + Property { name: "easing"; type: "QEasingCurve" } + Property { name: "target"; type: "QObject"; isPointer: true } + Property { name: "property"; type: "string" } + Property { name: "properties"; type: "string" } + Property { name: "targets"; type: "QObject"; isList: true; isReadonly: true } + Property { name: "exclude"; type: "QObject"; isList: true; isReadonly: true } + Signal { + name: "durationChanged" + Parameter { type: "int" } + } + Signal { + name: "fromChanged" + Parameter { type: "QVariant" } + } + Signal { + name: "toChanged" + Parameter { type: "QVariant" } + } + Signal { + name: "easingChanged" + Parameter { type: "QEasingCurve" } + } + Signal { + name: "propertiesChanged" + Parameter { type: "string" } + } + } + Component { name: "QQuickTimeline" defaultProperty: "keyframes" prototype: "QObject" @@ -28,16 +115,16 @@ Module { Property { name: "endFrame"; type: "double" } Property { name: "currentFrame"; type: "double" } Property { name: "keyframes"; type: "QQuickKeyframeGroup"; isList: true; isReadonly: true } + Property { name: "animations"; type: "QQuickTimelineAnimation"; isList: true; isReadonly: true } Property { name: "enabled"; type: "bool" } } Component { - name: "QQuickKeyframeGroup" - defaultProperty: "keyframes" - prototype: "QObject" - exports: ["QtQuick.Timeline/KeyframeGroup 1.0"] + name: "QQuickTimelineAnimation" + prototype: "QQuickNumberAnimation" + exports: ["QtQuick.Timeline/TimelineAnimation 1.0"] exportMetaObjectRevisions: [0] - Property { name: "target"; type: "QObject"; isPointer: true } - Property { name: "property"; type: "string" } - Property { name: "keyframes"; type: "QQuickKeyframe"; isList: true; isReadonly: true } + Property { name: "pingPong"; type: "bool" } + Signal { name: "finished" } + Signal { name: "pingPongChanged" } } } |