Some minor tunings in the EnergyView

This commit is contained in:
Michael Zanetti 2021-12-14 15:47:07 +01:00
parent 7846690cb1
commit 60357716c7
11 changed files with 50 additions and 3 deletions

View File

@ -1776,12 +1776,16 @@
</message>
<message>
<source>Root meter</source>
<translation>Wuzelmesser</translation>
<translation>Wurzelmesser</translation>
</message>
<message>
<source>Consumers</source>
<translation>Verbraucher</translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation>Entferne das Häkchen bei einzelnen Verbrauchern um diese in den Energieansichten auszublenden.</translation>
</message>
</context>
<context>
<name>EnergyView</name>
@ -5147,7 +5151,7 @@ Möchtest Du fortfahren?</translation>
<name>PowerBalanceStats</name>
<message>
<source>Totals</source>
<translation>Gesamt</translation>
<translation>Gesamtsummen</translation>
</message>
<message>
<source>Hours</source>

View File

@ -1776,6 +1776,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1776,6 +1776,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1776,6 +1776,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1780,6 +1780,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1776,6 +1776,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1780,6 +1780,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -1774,6 +1774,10 @@
<source>Consumers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uncheck individual consumers to hide them from the energy charts.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EnergyView</name>

View File

@ -51,7 +51,7 @@ MainViewBase {
trigger: function() {
pageStack.push("energy/EnergySettingsPage.qml", {energyManager: energyManager});
},
visible: true
visible: energyMeters.count > 1 || consumers.count > 0
}
]

View File

@ -239,6 +239,11 @@ StatsBase {
var previous = powerLogs.find(entry.thingId, new Date(categoryAxis.timestamps[categoryAxis.timestamps.length - 1]))
var previousValue = previous ? previous.totalConsumption : 0
var barSet = barSeries.thingBarSetMap[entry.thingId]
if (!barSet) {
return
}
barSet.replace(barSet.count - 1, entry.totalConsumption - previousValue)
}
}

View File

@ -59,6 +59,16 @@ SettingsPageBase {
SettingsPageSectionHeader {
text: qsTr("Consumers")
visible: root.allConsumers.count > 0
}
Label {
Layout.fillWidth: true
Layout.leftMargin: Style.margins
Layout.rightMargin: Style.margins
wrapMode: Text.WordWrap
text: qsTr("Uncheck individual consumers to hide them from the energy charts.")
visible: root.allConsumers.count > 0
}
Repeater {