Commit bab23525 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Use updateRateLimit in the Pie chart face

parent 9a41abe9
......@@ -40,6 +40,7 @@ Faces.SensorFace {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignCenter
updateRateLimit: root.controller.updateRateLimit
}
QQC2.Label {
id: label
......
......@@ -65,6 +65,7 @@ Faces.SensorFace {
: 5 * Kirigami.Units.gridUnit
Layout.preferredHeight: 8 * Kirigami.Units.gridUnit
Layout.maximumHeight: Math.max(root.width, Layout.minimumHeight)
updateRateLimit: root.controller.updateRateLimit
}
Faces.ExtendedLegend {
......@@ -78,6 +79,7 @@ Faces.SensorFace {
chart: compactRepresentation.chart
sourceModel: root.showLegend ? compactRepresentation.sensorsModel : null
sensorIds: root.showLegend ? root.controller.lowPrioritySensorIds : []
updateRateLimit: root.controller.updateRateLimit
}
}
}
......@@ -38,6 +38,8 @@ ChartControls.PieChartControl {
property alias sensors: sensorsModel.sensors
property alias sensorsModel: sensorsModel
property int updateRateLimit
Layout.minimumHeight: root.formFactor == Faces.SensorFace.Vertical ? width : Kirigami.Units.gridUnit
leftPadding: 0
......@@ -61,6 +63,7 @@ ChartControls.PieChartControl {
model: Sensors.SensorDataModel {
id: sensorsModel
sensors: root.controller.highPrioritySensorIds
updateRateLimit: chart.updateRateLimit
}
roleName: "Value"
indexColumns: true
......@@ -80,6 +83,7 @@ ChartControls.PieChartControl {
Sensors.Sensor {
id: sensor
sensorId: root.controller.totalSensors.length > 0 ? root.controller.totalSensors[0] : ""
updateRateLimit: chart.updateRateLimit
}
UsedTotalDisplay {
......@@ -89,6 +93,7 @@ ChartControls.PieChartControl {
totalSensor: root.controller.totalSensors.length > 1 ? root.controller.totalSensors[1] : ""
contentMargin: chart.chart.thickness
updateRateLimit: chart.updateRateLimit
}
}
......@@ -32,6 +32,8 @@ Item {
property alias usedSensor: usedSensorObject.sensorId
property alias totalSensor: totalSensorObject.sensorId
property int updateRateLimit
property real contentMargin: 10
ColumnLayout {
......@@ -100,10 +102,12 @@ Item {
Sensors.Sensor {
id: usedSensorObject
updateRateLimit: root.updateRateLimit
}
Sensors.Sensor {
id: totalSensorObject
updateRateLimit: root.updateRateLimit
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment