diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2026-02-07 17:29:48 +0100 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2026-02-07 17:29:48 +0100 |
| commit | 2eda97537b63d68b2e9ba06500e3fb491894d10c (patch) | |
| tree | 52873ad380cd97f4327765aac24659a2b00079b1 /package/contents/ui/CompactRepresentation.qml | |
feat: camper van energy monitoring widget for Plasma 6main
Pure QML KPackage widget with Rust background service for real-time
Victron energy system monitoring via MQTT and D-Bus.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'package/contents/ui/CompactRepresentation.qml')
| -rw-r--r-- | package/contents/ui/CompactRepresentation.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/contents/ui/CompactRepresentation.qml b/package/contents/ui/CompactRepresentation.qml new file mode 100644 index 0000000..85d62ee --- /dev/null +++ b/package/contents/ui/CompactRepresentation.qml @@ -0,0 +1,33 @@ +import QtQuick 6.0 +import QtQuick.Layouts 6.0 +import org.kde.plasma.components 3.0 as PlasmaComponents + +RowLayout { + IconUtils { id: icons } + FormatUtils { id: fmt } + spacing: 4 + + PlasmaComponents.Label { + text: icons.getDirectionIcon(root.direction) + font.pointSize: 12 + } + + PlasmaComponents.Label { + text: icons.getBatteryIcon(root.batterySoc) + font.pointSize: 12 + } + + PlasmaComponents.Label { + text: fmt.formatSoc(root.batterySoc) + font.pointSize: 10 + font.bold: true + } + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: (mouse) => { + root.expanded = !root.expanded + } + } +} |
