-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBootyContent.qml
More file actions
104 lines (97 loc) · 2.74 KB
/
BootyContent.qml
File metadata and controls
104 lines (97 loc) · 2.74 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
import QtQuick 2.0
import QtQml 2.12
import QtQuick.Controls 2.12
import sunnygui 1.0
Rectangle {
id : root
anchors.fill : parent
color : "green"
Column {
width : root.width
height : root.height
Text {
id : message
x : parent.x + 8
width : parent.width - 16
height : root.height * .3
color : SunStyles.sunshineYellow
text : qsTrId("app_name")
font.pixelSize : height
horizontalAlignment : Text.AlignHCenter
verticalAlignment : Text.AlignVCenter
font.bold : true
fontSizeMode : Text.Fit
}
BootProgressBar {
id : pb
width : parent.width * 0.4
height : root.height * .3
anchors.horizontalCenter : parent.horizontalCenter
}
Item {
width : parent.width
height : root.height * 0.3
Button {
id : phone_launcher
width : implicitWidth
text : "Phone Launcher"
anchors.horizontalCenter : parent.horizontalCenter
anchors.bottom : parent.bottom
onClicked : {
cdialog.open();
}
}
}
}
BaseDialog {
id : cdialog
modal : true
title : qsTr("Phone Launch?")
buttons: QT_TR_NOOP(['No','Yes'])
bodyWidth: 250
bodyHeight: 150
text : qsTr("Are you sure you want to launch the phone?")
visible : false
onClicked : function(index){
if( index == 1) //index 1 is yes.
{
root.launchPhone();
}
this.close();
}
}
function launchPhone() {
ProgressObj.endJob();
pb.visible = true;
phone_launcher.enabled = false;
loaderSid.source = "qrc:/Phoney.qml"
cdialog.visible = false;
}
ThreeCornerTouch {
anchors {
top : parent.top
left : parent.left
right : parent.right
bottom : phone_launcher.top
}
title : qsTr("Phone Launch?")
testMode : false
message : qsTr("Are you sure you want to launch the phone?")
onAccepted : {
launchPhone();
}
}
Connections {
target : ProgressObj
onStatusChanged : function (new_status) {
console.log("New status : " + new_status);
}
onCurrentChanged : function (new_value) {
console.log("new progress : " + new_value)
pb.message = "Loaded %" + parseInt(new_value * 100);
if (new_value == 1.0) {
launchPhone();
}
}
}
}