This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/nymea-app/ui/mainviews/energy/CurrentPowerBalancePage.qml
Michael Zanetti 32853ce612 More improvements on the energy view
Bring back title headers
allow opening a single chart fullscreen
allow selecting individual series in a chart
2022-11-26 01:27:52 +01:00

42 lines
1.0 KiB
QML

import QtQuick 2.3
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.2
import Nymea 1.0
import "qrc:/ui/components"
Page {
id: root
property EnergyManager energyManager: null
property ThingsProxy consumers: null
property ThingsProxy producers: null
header: NymeaHeader {
text: qsTr("My energy mix")
backButtonVisible: true
onBackPressed: pageStack.pop()
}
GridLayout {
anchors.fill: parent
columns: app.landscape ? 2 : 1
CurrentConsumptionBalancePieChart {
Layout.fillWidth: true
Layout.fillHeight: true
energyManager: root.energyManager
visible: root.producers.count > 0
animationsEnabled: Qt.application.active
}
CurrentProductionBalancePieChart {
Layout.fillWidth: true
Layout.fillHeight: true
energyManager: root.energyManager
visible: root.producers.count > 0
animationsEnabled: Qt.application.active
}
}
}