2024-06-07 00:05:50 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
2024-03-07 11:44:01 +00:00
|
|
|
import org.kde.plasma.core as PlasmaCore
|
|
|
|
import org.kde.plasma.components as PlasmaComponents
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
import org.kde.kquickcontrols as KQControls
|
|
|
|
import org.kde.kcmutils as KCM
|
2024-01-22 02:08:31 +00:00
|
|
|
|
|
|
|
import "../lib/helper.js" as Helper
|
|
|
|
|
2024-03-07 11:44:01 +00:00
|
|
|
KCM.SimpleKCM {
|
2024-01-22 02:08:31 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
property alias cfg_debug_active: debug_active.checked
|
|
|
|
property alias cfg_debug_charge: debug_charge.value
|
|
|
|
|
2024-06-07 00:05:50 +00:00
|
|
|
property bool debug_activeDefault
|
|
|
|
property int debug_chargeDefault
|
|
|
|
|
|
|
|
property int cfg_pollingrate
|
|
|
|
property int cfg_batteryheight
|
|
|
|
property string cfg_colorEmpty
|
|
|
|
property string cfg_colorHalf
|
|
|
|
property string cfg_colorFull
|
|
|
|
property bool cfg_notifications
|
|
|
|
property int cfg_batteryThreshold
|
|
|
|
|
|
|
|
property int cfg_pollingrateDefault
|
|
|
|
property int cfg_batteryheightDefault
|
|
|
|
property string cfg_colorEmptyDefault
|
|
|
|
property string cfg_colorHalfDefault
|
|
|
|
property string cfg_colorFullDefault
|
|
|
|
property bool cfg_notificationsDefault
|
|
|
|
property int cfg_batteryThresholdDefault
|
|
|
|
|
2024-01-22 02:08:31 +00:00
|
|
|
Kirigami.FormLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
wideMode: false
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: 3
|
|
|
|
rows: 2
|
|
|
|
rowSpacing: 10
|
|
|
|
|
|
|
|
// first row
|
|
|
|
Text {
|
|
|
|
text: "debug:"
|
|
|
|
color: PlasmaCore.Theme.textColor
|
|
|
|
}
|
|
|
|
PlasmaComponents.CheckBox {
|
|
|
|
id: debug_active
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// second row
|
|
|
|
Text {
|
|
|
|
text: "battery charge:"
|
|
|
|
color: PlasmaCore.Theme.textColor
|
|
|
|
}
|
2024-03-07 11:44:01 +00:00
|
|
|
Slider {
|
2024-01-22 02:08:31 +00:00
|
|
|
id: debug_charge
|
|
|
|
value: 0
|
2024-06-07 00:05:50 +00:00
|
|
|
from: 0
|
2024-03-07 11:44:01 +00:00
|
|
|
to: 100
|
2024-01-22 02:08:31 +00:00
|
|
|
stepSize: 1
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: cfg_debug_charge + "%"
|
|
|
|
color: PlasmaCore.Theme.textColor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|