-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfirmButton.qml
More file actions
59 lines (51 loc) · 1.37 KB
/
ConfirmButton.qml
File metadata and controls
59 lines (51 loc) · 1.37 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
import QtQuick 2.0
Button {
id: button
onClicked: confirming.visible = true
Rectangle {
id: confirming
anchors.fill: parent
visible: false
color: "#00BB00"
Label {
text: "Really?"
}
Label {
text: "Yes"
anchors.fill: none
anchors.bottom: parent.bottom
anchors.right: nope.left
}
MouseArea {
anchors.fill: parent
onClicked: {
var hide = typeof(hideAfter) !== 'undefined' ? hideAfter : false;
// console.debug(hide);
if (hide)
root.hideView();
confirming.visible = false
console.debug("Running cmd '" + action + "'");
// run action
root.runCommand(action);
}
}
Rectangle {
id: nope
color: "#b00"
anchors.fill: parent
anchors.leftMargin: parent.width * 0.75
Label {
text: "No"
anchors.fill: none
anchors.bottom: parent.bottom
anchors.left: nope.left
}
MouseArea {
anchors.fill: parent
onClicked: {
confirming.visible = false
}
}
}
}
}