aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/timelineTestApp/test09.qml
blob: a61dab7742930c38cbd675b785e6034e064144ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.0
import QtQuick.Timeline 1.0

Item {
    id: root
    width: 640
    height: 480

    Timeline {
        id: timeline
        startFrame: 0
        endFrame: 1000
        enabled: true

        KeyframeGroup {
            target: rectangle2
            property: "visible"

            Keyframe {
                frame: 0
                value: false
            }

            Keyframe {
                frame: 729
                value: true
            }

            Keyframe {
                frame: 954
                value: false
            }
        }

        KeyframeGroup {
            target: rectangle3
            property: "visible"

            Keyframe {
                frame: 0
                value: false
            }

            Keyframe {
                frame: 793
                value: true
            }

            Keyframe {
                frame: 868
                value: false
            }
        }

        KeyframeGroup {
            target: rectangle1
            property: "visible"

            Keyframe {
                frame: 0
                value: false
            }

            Keyframe {
                frame: 470
                value: true
            }

            Keyframe {
                frame: 757
                value: false
            }
        }

        KeyframeGroup {
            target: rectangle
            property: "visible"

            Keyframe {
                frame: 0
                value: false
            }

            Keyframe {
                frame: 199
                value: true
            }

            Keyframe {
                frame: 546
                value: false
            }
        }
    }

    NumberAnimation {
        id: numberAnimation
        target: timeline
        property: "currentFrame"
        running: true
        loops: -1
        to: timeline.endFrame
        from: timeline.startFrame
        duration: 1000
    }

    Rectangle {
        id: rectangle
        x: 0
        y: 0
        width: 200
        height: 200
        color: "#f12929"
        visible: false
    }

    Rectangle {
        id: rectangle1
        x: 440
        y: 0
        width: 200
        height: 200
        color: "#2851bb"
        visible: false
    }

    Rectangle {
        id: rectangle2
        x: 0
        y: 280
        width: 200
        height: 200
        color: "#2fd21b"
        visible: false
    }

    Rectangle {
        id: rectangle3
        x: 440
        y: 280
        width: 200
        height: 200
        color: "#9119dd"
        visible: false
    }
}

/*##^## Designer {
    D{i:1;currentFrame__AT__NodeInstance:0}D{i:3;timeline_expanded:true}D{i:4;timeline_expanded:true}
D{i:5;timeline_expanded:true}D{i:6;timeline_expanded:true}
}
 ##^##*/