blob: b4944947144a03edb46c701826eb894b50b7e7a4 (
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
|
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
Page {
id: splash
property int timeoutInterval: 1600
Column {
width: parent.width * 0.8
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 24
VerticalSpacer {
visible: true
height: root.height * 0.10
}
Image {
id: connectionImage
height: 200
anchors.horizontalCenter: parent.horizontalCenter
source: "../resources/icon-noshield.svg"
fillMode: Image.PreserveAspectFit
}
Spinner {}
}
Timer {
id: splashTimer
}
function delay(delayTime, cb) {
splashTimer.interval = delayTime
splashTimer.repeat = false
splashTimer.triggered.connect(cb)
splashTimer.start()
}
function loadMainViewWhenReady() {
console.debug("ready?")
if (ctx && ctx.isReady) {
console.debug("ready?", ctx.isReady)
// FIXME check errors == None
loader.source = "MainView.qml"
} else {
delay(100, loadMainViewWhenReady)
}
}
Timer {
interval: timeoutInterval
running: true
repeat: false
onTriggered: {
loadMainViewWhenReady()
}
}
Component.onCompleted: {
}
}
|