-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplash.qml
More file actions
169 lines (150 loc) · 5.03 KB
/
Splash.qml
File metadata and controls
169 lines (150 loc) · 5.03 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Window 2.12
Item{
id: splash
visible: true
width: 1024
height: 600
signal timeout
Grid
{
id:mainGrid
width: parent.width
height: parent.height
rows: 3
Rectangle
{
width: parent.width
height: 100
color: "#002F2F"
Label
{
anchors.centerIn: parent
text: "<b>WELCOME TO 6R ROBOT</b>"
color: "#EFECCA"
font.pointSize: 25
}
}
Rectangle
{
width: parent.width
height: 400
color: "#002F2F"
Image {
id: image
anchors.centerIn: parent
source: "qrc:/icons/sixr_icon.png"
width: 400
height: 400
}
}
Rectangle
{
width: parent.width
height: 100
color: "#002F2F"
ProgressBar
{
id: mainProgressBar
height: 7
width: parent.width * 1/2
anchors.centerIn: parent
from:0
to:60
value: 0
background: Rectangle {
anchors.left: mainProgressBar.left
anchors.verticalCenter: mainProgressBar.verticalCenter
implicitWidth: 50
implicitHeight: 6
color: "#e6e6e6"
radius: 3
}
contentItem: Rectangle {
anchors.left: mainProgressBar.left
anchors.verticalCenter: mainProgressBar.verticalCenter
width: mainProgressBar.visualPosition * mainProgressBar.width
height: mainProgressBar.height
radius: 2
color: "#046380"
}
//*******************************************************************
//*******************************************************************
// Test Animation
// background: Rectangle
// {
// implicitWidth: 200
// implicitHeight: 6
// border.color: "#EFECCA"
// radius: 5
// }
// contentItem: Item {
// implicitWidth: 200
// implicitHeight: 4
// Rectangle {
// id: bar
// width: mainProgressBar.visualPosition * parent.width
// height: parent.height
// radius: 5
// color: "#EFECCA"
// }
// LinearGradient {
// anchors.fill: bar
// start: Qt.point(0, 0)
// end: Qt.point(bar.width, 0)
// source: bar
// gradient: Gradient {
// GradientStop { position: 0.0; color: "#EFECCA" }
// GradientStop { id: grad; position: 0.5; color: Qt.lighter("#EFECCA", 2) }
// GradientStop { position: 1.0; color: "#EFECCA" }
// }
// PropertyAnimation {
// target: grad
// property: "position"
// from: 0.1
// to: 0.9
// duration: 1000
// running: true
// loops: Animation.Infinite
// }
// }
// LinearGradient {
// anchors.fill: bar
// start: Qt.point(0, 0)
// end: Qt.point(0, bar.height)
// source: bar
// gradient: Gradient {
// GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0) }
// GradientStop { position: 0.5; color: Qt.rgba(1,1,1,0.3) }
// GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.05) }
// }
// }
// }
//*******************************************************************
//*******************************************************************
}
}
}
Timer {
interval: 3000; running: true; repeat: false
onTriggered: {
visible = false
splash.timeout()
}
}
Timer
{
interval: 50; running: true; repeat: true
onTriggered:
{
mainProgressBar.value +=1
}
}
Component.onCompleted:
{
visible = true
setX(Screen.width / 2 - width / 2);
setY(Screen.height / 2 - height / 2);
}
}