-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrak.qml
60 lines (54 loc) · 1.25 KB
/
Trak.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
import QtQuick 2.15
import QtQuick.Controls 2.15
Item {
property alias max: slider.to
property int index: slider.value
id: root
Button {
id: prev
enabled: slider.value != 0
text: "Предыдущий"
// display: AbstractButton.IconOnly
anchors.left: parent.left
width: 50
height: root.height
// icon.source: "back.png"
onClicked: {
slider.value -= 1
setActive()
}
}
Slider {
id: slider
anchors.left: prev.right
anchors.right: next.left
anchors.leftMargin: 10
anchors.rightMargin: 10
height: root.height
onValueChanged: setActive()
to: 0
}
Button {
id: next
enabled: slider.value != slider.to
text: "Следующий"
// display: AbstractButton.IconOnly
// icon.source: "next.png"
anchors.right: parent.right
width: 50
height: root.height
onClicked: {
slider.value += 1
setActive()
}
}
height: 50
function setActive() {
backend.loadBaritem(slider.value)
}
}
/*##^##
Designer {
D{i:0;formeditorZoom:1.5}
}
##^##*/