Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
libksysguard
Commits
bab23525
Commit
bab23525
authored
Mar 08, 2021
by
Arjen Hiemstra
Browse files
Use updateRateLimit in the Pie chart face
parent
9a41abe9
Changes
4
Hide whitespace changes
Inline
Side-by-side
faces/facepackages/piechart/contents/ui/CompactRepresentation.qml
View file @
bab23525
...
...
@@ -40,6 +40,7 @@ Faces.SensorFace {
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.alignment
:
Qt
.
AlignCenter
updateRateLimit
:
root
.
controller
.
updateRateLimit
}
QQC2.Label
{
id
:
label
...
...
faces/facepackages/piechart/contents/ui/FullRepresentation.qml
View file @
bab23525
...
...
@@ -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
}
}
}
faces/facepackages/piechart/contents/ui/PieChart.qml
View file @
bab23525
...
...
@@ -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
}
}
faces/facepackages/piechart/contents/ui/UsedTotalDisplay.qml
View file @
bab23525
...
...
@@ -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
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment