headsetcontrol-battery-widget/package/contents/ui/configGeneral.qml

45 lines
924 B
QML
Raw Normal View History

2024-01-19 00:54:33 +00:00
import QtQuick 2.0
2024-01-19 01:57:59 +00:00
import QtQuick.Layouts 1.3
2024-01-19 00:54:33 +00:00
import QtQuick.Controls 2.5 as QQC2
2024-01-19 01:57:59 +00:00
import org.kde.plasma.core 2.0 as PlasmaCore
2024-01-19 00:54:33 +00:00
import org.kde.kirigami 2.4 as Kirigami
QQC2.Pane {
id: root
property alias cfg_pollingrate: pollingrate.value
Kirigami.FormLayout {
anchors.fill: parent
wideMode: false
2024-01-19 01:57:59 +00:00
GridLayout {
columns: 3
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: Slider.SnapAlways
Kirigami.FormData.label: i18nc("@label", "polling rate in seconds:")
onMoved: {
2024-01-19 18:43:45 +00:00
pollingratevalue.text = this.value + " seconds";
2024-01-19 01:57:59 +00:00
}
}
Text {
2024-01-19 18:43:45 +00:00
id: pollingratevalue
2024-01-19 01:57:59 +00:00
text: pollingrate.value + " seconds"
color: PlasmaCore.Theme.textColor
2024-01-19 00:54:33 +00:00
}
}
}
}