import QtQuick 6.0 import QtQuick.Layouts 6.0 import org.kde.kirigami as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents ColumnLayout { IconUtils { id: icons } FormatUtils { id: fmt } anchors.fill: parent spacing: 8 // Header PlasmaComponents.Label { Layout.alignment: Qt.AlignCenter text: "Camper Van Energy System" font.pointSize: 14 font.bold: true } Kirigami.Separator { Layout.fillWidth: true } // Status availability indicator PlasmaComponents.Label { Layout.alignment: Qt.AlignCenter text: root.connected ? "Status: Connected" : "Status: Disconnected" color: root.connected ? "green" : "red" font.pointSize: 10 } // Battery level RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: icons.getBatteryIcon(root.batterySoc) font.pointSize: 16 } PlasmaComponents.Label { text: "Battery Level:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: fmt.formatSoc(root.batterySoc) font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // System power RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf0e7" // font.pointSize: 16 } PlasmaComponents.Label { text: "System Power:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: fmt.formatPower(root.connected, root.batteryPower) font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // Solar power RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf185" // font.pointSize: 16 } PlasmaComponents.Label { text: "Solar Power:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: fmt.formatSolar(root.solarPower) font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // AC input RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf1e6" // font.pointSize: 16 } PlasmaComponents.Label { text: "AC Input:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: fmt.formatAcPower(root.acInputPower) font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // AC load RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf2db" // font.pointSize: 16 } PlasmaComponents.Label { text: "AC Load:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: fmt.formatAcPower(root.acLoadPower) font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // Status direction RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf1fe" // font.pointSize: 16 } PlasmaComponents.Label { text: "Status:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: root.direction font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } // Last updated RowLayout { Layout.fillWidth: true spacing: 8 PlasmaComponents.Label { text: "\uf017" // font.pointSize: 16 } PlasmaComponents.Label { text: "Last Updated:" font.pointSize: 11 } PlasmaComponents.Label { Layout.fillWidth: true text: root.lastUpdated font.pointSize: 11 font.bold: true horizontalAlignment: Text.AlignRight } } Kirigami.Separator { Layout.fillWidth: true } }