-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRightArea.qml
117 lines (96 loc) · 2.79 KB
/
RightArea.qml
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
import QtQuick 2.12
import QtQuick.Controls 2.12
Item {
id: root
width: 310
height: 720
readonly property int buttonHeight: 225
property int selected: -1
Column {
anchors.fill: parent
anchors.left: root.left; anchors.rightMargin: 10
anchors.top: root.top; anchors.topMargin: 20
Button {
id: buttonModes
width: 270
height: 90
contentItem: Item {
Image {
source: root.selected === 0 ?
("qrc:///images/btn-Modes-on.png") :
("qrc:///images/btn-modes-normal.png")
}
}
background: Rectangle {
opacity: 0
}
onClicked: {
if ( selected === 0) {
selected = -1
} else {
selected = 0
}
}
}
ModesWidget {
id: modesWidget
opacity: selected === 0 ? 1 : 0
width: 270
height: selected === 0 ? 430 : 0
Behavior on height { NumberAnimation { duration: 300} }
Behavior on opacity { NumberAnimation { duration: 300} }
}
Button {
id: buttonControls
width: 270
height: 90
contentItem: Item {
Image {
source: root.selected === 1 ?
("qrc:///images/btn-controls-on.png") :
("qrc:///images/btn-controls-normal.png")
}
}
onClicked: {
if (selected === 1) {
selected = -1
} else {
selected = 1
}
}
background: Rectangle {
opacity: 0
}
}
Item {
id: controlsWidget
opacity: selected === 1 ? 1 : 0
width: 270
height: selected === 1 ? 430 : 0
Behavior on height { NumberAnimation { duration: 300} }
Behavior on opacity { NumberAnimation { duration: 300} }
}
Button {
id: buttonAlarms
width: 270
height: 90
contentItem: Item {
Image {
source: buttonAlarms.pressed ?
("qrc:///images/btn-Modes-on.png") :
("qrc:///images/btn-modes-normal.png")
}
}
onClicked: {
if (selected === 2) {
selected = -1
} else {
selected = 2
}
}
background: Rectangle {
opacity: 0
}
}
}
}