diff --git a/nymea-app/resources.qrc b/nymea-app/resources.qrc
index 97cbb5bd..6afa948e 100644
--- a/nymea-app/resources.qrc
+++ b/nymea-app/resources.qrc
@@ -257,7 +257,6 @@
ui/components/CircleBackground.qml
ui/devicepages/CoolingThingPage.qml
ui/devicepages/EvChargerThingPage.qml
- ui/components/BlurredLabel.qml
ui/components/NymeaSpinBox.qml
ui/mainviews/EnergyPieChartDelegate.qml
ui/mainviews/energy/PowerConsumptionBalanceHistory.qml
diff --git a/nymea-app/ui/components/BlurredLabel.qml b/nymea-app/ui/components/BlurredLabel.qml
deleted file mode 100644
index e80b1af8..00000000
--- a/nymea-app/ui/components/BlurredLabel.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import QtQuick 2.5
-import QtQuick.Controls 2.1
-import QtGraphicalEffects 1.0
-import Nymea 1.0
-
-Item {
- id: root
- implicitWidth: label.implicitWidth + Style.margins * 2
- implicitHeight: label.implicitHeight + Style.margins * 2
-
- property alias text: label.text
- property alias font: label.font
- property alias wrapMode: label.wrapMode
- property alias horizontalAlignment: label.horizontalAlignment
- property alias textFormat: label.textFormat
-
- property bool blurred: false
-
- Label {
- id: label
- anchors.fill: parent
- }
-
- ShaderEffectSource {
- id: effectSource
- anchors.fill: parent
- sourceItem: label
- hideSource: true
- visible: false
- }
-
- FastBlur {
- anchors.fill: parent
- source: effectSource
- radius: root.blurred ? 32 : 0
- Behavior on radius { NumberAnimation { duration: Style.animationDuration } }
- }
-}
diff --git a/nymea-app/ui/devicepages/SmartMeterDevicePage.qml b/nymea-app/ui/devicepages/SmartMeterDevicePage.qml
index ab8b4449..c5d5e475 100644
--- a/nymea-app/ui/devicepages/SmartMeterDevicePage.qml
+++ b/nymea-app/ui/devicepages/SmartMeterDevicePage.qml
@@ -220,54 +220,6 @@ ThingPageBase {
: isDischarging ? qsTr("At the current rate, the battery will last until %1.").arg('' + endTime.toLocaleTimeString(Locale.ShortFormat) + "")
: ""
}
-
- BlurredLabel {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- horizontalAlignment: Text.AlignHCenter
- visible: isEnergyMeter || isConsumer
- blurred: periodConsumptionModel.busy
- font: Style.smallFont
- text: isConsumer ?
- qsTr("A total of %1 kWh has been consumed in the last 24 hours.").arg('' + (totalPeriodConsumption).toFixed(1) + '')
- : qsTr("A total of %1 kWh has been obtained in the last 24 hours.").arg('' + (totalPeriodConsumption).toFixed(1) + '')
- textFormat: Text.RichText
-
- LogsModel {
- id: periodConsumptionModel
- engine: root.isEnergyMeter || root.isConsumer ? _engine : null
- thingId: root.thing.id
- typeIds: isEnergyMeter ? [root.totalEnergyConsumedStateType.id] : []
- viewStartTime: root.startTime
- live: true
- }
- property LogEntry logEntryAtStart: periodConsumptionModel.busy ? null : periodConsumptionModel.findClosest(periodConsumptionModel.viewStartTime)
- property double totalPeriodConsumption: logEntryAtStart && totalEnergyConsumedState ? totalEnergyConsumedState.value - logEntryAtStart.value : 0
- }
-
- BlurredLabel {
- visible: isEnergyMeter || isProducer
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- horizontalAlignment: Text.AlignHCenter
- blurred: periodProductionModel.busy
- font: Style.smallFont
- text: isProducer ?
- qsTr("A total of %1 kWh has been produced in the last 24 hours.").arg('' + (totalPeriodProduction).toFixed(1) + '')
- : qsTr("A total of %1 kWh has been returned in the last 24 hours.").arg('' + (totalPeriodProduction).toFixed(1) + '')
- textFormat: Text.RichText
-
- LogsModel {
- id: periodProductionModel
- engine: root.isEnergyMeter || root.isProducer ? _engine : null
- thingId: root.thing.id
- typeIds: isEnergyMeter ? [root.totalEnergyProducedStateType.id] : []
- viewStartTime: root.startTime
- live: true
- }
- property LogEntry logEntryAtStart: periodProductionModel.busy ? null : periodProductionModel.findClosest(periodProductionModel.viewStartTime)
- property double totalPeriodProduction: logEntryAtStart && totalEnergyProducedState ? totalEnergyProducedState.value - logEntryAtStart.value : 0
- }
}
}
}
diff --git a/nymea-app/ui/mainviews/energy/ConsumerStats.qml b/nymea-app/ui/mainviews/energy/ConsumerStats.qml
index 63de06c6..7f530ad2 100644
--- a/nymea-app/ui/mainviews/energy/ConsumerStats.qml
+++ b/nymea-app/ui/mainviews/energy/ConsumerStats.qml
@@ -388,7 +388,7 @@ StatsBase {
backgroundRect: Qt.rect(chartView.plotArea.x + toolTip.x, chartView.plotArea.y + toolTip.y, toolTip.width, toolTip.height)
property int idx: Math.floor(mouseArea.mouseX * categoryAxis.count / mouseArea.width)
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
x: Math.min(idx * mouseArea.width / categoryAxis.count, mouseArea.width - width)
property double setMaxValue: {
diff --git a/nymea-app/ui/mainviews/energy/ConsumersHistory.qml b/nymea-app/ui/mainviews/energy/ConsumersHistory.qml
index 0a1d70b5..d523cc2a 100644
--- a/nymea-app/ui/mainviews/energy/ConsumersHistory.qml
+++ b/nymea-app/ui/mainviews/energy/ConsumersHistory.qml
@@ -269,12 +269,12 @@ Item {
width: 1
color: Style.foregroundColor
x: mouseArea.mouseX
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
}
NymeaToolTip {
id: toolTip
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
backgroundItem: chartView
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)
diff --git a/nymea-app/ui/mainviews/energy/CurrentConsumptionBalancePieChart.qml b/nymea-app/ui/mainviews/energy/CurrentConsumptionBalancePieChart.qml
index d6850203..f92d39bd 100644
--- a/nymea-app/ui/mainviews/energy/CurrentConsumptionBalancePieChart.qml
+++ b/nymea-app/ui/mainviews/energy/CurrentConsumptionBalancePieChart.qml
@@ -16,6 +16,11 @@ ChartView {
property EnergyManager energyManager: null
+ ThingsProxy {
+ id: batteries
+ engine: _engine
+ shownInterfaces: ["energystorage"]
+ }
PieSeries {
id: consumptionBalanceSeries
diff --git a/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml b/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml
index e815a9e9..05aa7c1b 100644
--- a/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml
+++ b/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml
@@ -343,7 +343,7 @@ StatsBase {
backgroundRect: Qt.rect(chartView.plotArea.x + toolTip.x, chartView.plotArea.y + toolTip.y, toolTip.width, toolTip.height)
property int idx: Math.floor(mouseArea.mouseX * categoryAxis.count / mouseArea.width)
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
x: Math.min(idx * mouseArea.width / categoryAxis.count, mouseArea.width - width)
property double setMaxValue: d.consumptionSet && d.productionSet && d.acquisitionSet && d.returnSet ?
diff --git a/nymea-app/ui/mainviews/energy/PowerConsumptionBalanceHistory.qml b/nymea-app/ui/mainviews/energy/PowerConsumptionBalanceHistory.qml
index 18c4475e..ee52be19 100644
--- a/nymea-app/ui/mainviews/energy/PowerConsumptionBalanceHistory.qml
+++ b/nymea-app/ui/mainviews/energy/PowerConsumptionBalanceHistory.qml
@@ -260,13 +260,13 @@ Item {
width: 1
color: Style.foregroundColor
x: mouseArea.mouseX
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
}
NymeaToolTip {
id: toolTip
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
backgroundItem: chartView
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)
diff --git a/nymea-app/ui/mainviews/energy/PowerProductionBalanceHistory.qml b/nymea-app/ui/mainviews/energy/PowerProductionBalanceHistory.qml
index 79f53881..cd01bf66 100644
--- a/nymea-app/ui/mainviews/energy/PowerProductionBalanceHistory.qml
+++ b/nymea-app/ui/mainviews/energy/PowerProductionBalanceHistory.qml
@@ -252,12 +252,12 @@ Item {
width: 1
color: Style.foregroundColor
x: mouseArea.mouseX
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
}
NymeaToolTip {
id: toolTip
- visible: mouseArea.containsMouse
+ visible: mouseArea.containsMouse || mouseArea.preventStealing
backgroundItem: chartView
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)