68 lines
1.4 KiB
QML
68 lines
1.4 KiB
QML
import QtQuick 2.0
|
|
import QtQuick.Layouts 1.3
|
|
import QtQuick.Controls 2.5 as QQC2
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
import org.kde.kirigami 2.4 as Kirigami
|
|
|
|
QQC2.Pane {
|
|
id: root
|
|
|
|
property alias cfg_pollingrate: pollingrate.value
|
|
property alias cfg_batteryheight: batteryheight.value
|
|
|
|
Kirigami.FormLayout {
|
|
anchors.fill: parent
|
|
wideMode: false
|
|
|
|
GridLayout {
|
|
columns: 3
|
|
rows: 2
|
|
rowSpacing: 10
|
|
|
|
// first row
|
|
Text {
|
|
text: "polling rate:"
|
|
color: PlasmaCore.Theme.textColor
|
|
}
|
|
QQC2.Slider {
|
|
id: pollingrate
|
|
value: 10.0
|
|
from: 2.0
|
|
to: 60.0
|
|
stepSize: 2.0
|
|
snapMode: QQC2.Slider.SnapAlways
|
|
onMoved: {
|
|
pollingratevalue.text = this.value + " seconds";
|
|
}
|
|
}
|
|
Text {
|
|
id: pollingratevalue
|
|
text: pollingrate.value + " seconds"
|
|
color: PlasmaCore.Theme.textColor
|
|
}
|
|
|
|
// second row
|
|
Text {
|
|
text: "battery height:"
|
|
color: PlasmaCore.Theme.textColor
|
|
}
|
|
QQC2.Slider {
|
|
id: batteryheight
|
|
value: 8.0
|
|
from: 1.0
|
|
to: 10.0
|
|
stepSize: 1.0
|
|
snapMode: QQC2.Slider.SnapAlways
|
|
onMoved: {
|
|
batteryheightvalue.text = this.value
|
|
}
|
|
}
|
|
Text { // dummy
|
|
id: batteryheightvalue
|
|
text: batteryheight.value
|
|
color: PlasmaCore.Theme.textColor
|
|
}
|
|
}
|
|
}
|
|
}
|