From 2eda97537b63d68b2e9ba06500e3fb491894d10c Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Sat, 7 Feb 2026 17:29:48 +0100 Subject: feat: camper van energy monitoring widget for Plasma 6 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 --- package/contents/ui/CompactRepresentation.qml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/contents/ui/CompactRepresentation.qml (limited to 'package/contents/ui/CompactRepresentation.qml') 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 + } + } +} -- cgit v1.2.3