Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HEV - High Energy Ventilator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
HEV - High Energy Ventilator
Commits
f405ea25
Commit
f405ea25
authored
May 12, 2021
by
Carlos Ortiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add detailed circleplots localisatio changing
parent
3e62accf
Pipeline
#1518
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
NativeUI.py
NativeUI/NativeUI.py
+11
-0
plot_widget.py
NativeUI/widget_library/plot_widget.py
+46
-0
No files found.
NativeUI/NativeUI.py
View file @
f405ea25
...
...
@@ -240,6 +240,17 @@ class NativeUI(HEVClient, QMainWindow):
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
ventilator_start_stop_buttons_widget
.
localise_text
)
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
detailed_plots
.
localise_text
)
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
circle_plots
.
localise_text
)
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
charts_widget
.
localise_text
)
return
0
...
...
NativeUI/widget_library/plot_widget.py
View file @
f405ea25
...
...
@@ -265,7 +265,42 @@ class CirclePlotsWidget(QtWidgets.QWidget):
plot
.
setXRange
(
self
.
time_range
*
(
-
1
),
0
,
padding
=
0
)
plot
.
enableAutoRange
(
"y"
,
True
)
return
0
@
QtCore
.
Slot
(
dict
)
def
localise_text
(
self
,
text
:
dict
)
->
int
:
"""
Update the text displayed on the axis' and legend of time plots.
"""
self
.
pressure_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_pressure"
])
self
.
pressure_plot
.
legend
.
clear
()
self
.
pressure_plot
.
legend
.
addItem
(
self
.
pressure_line
,
text
[
"plot_line_label_pressure"
])
self
.
flow_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_flow"
])
self
.
flow_plot
.
legend
.
clear
()
self
.
flow_plot
.
legend
.
addItem
(
self
.
flow_line
,
name
=
text
[
"plot_line_label_flow"
])
self
.
volume_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_volume"
])
self
.
volume_plot
.
setLabel
(
"bottom"
,
text
[
"plot_axis_label_time"
])
self
.
volume_plot
.
legend
.
clear
()
self
.
volume_plot
.
legend
.
addItem
(
self
.
volume_line
,
name
=
text
[
"plot_line_label_volume"
])
self
.
pressure_flow_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_pressure"
])
self
.
pressure_flow_plot
.
setLabel
(
"bottom"
,
text
[
"plot_axis_label_flow"
])
self
.
pressure_flow_plot
.
legend
.
clear
()
self
.
pressure_flow_plot
.
legend
.
additem
(
self
.
pressure_flow_line
,
name
=
text
[
"plot_line_label_pressure_flow"
])
self
.
flow_volume_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_flow"
])
self
.
flow_volume_plot
.
setLabel
(
"bottom"
,
text
[
"plot_axis_label_volume"
])
self
.
flow_volume_plot
.
legend
.
clear
()
self
.
flow_volume_plot
.
legend
.
additem
(
self
.
volume_flow_line
,
name
=
text
[
"plot_line_label_flow_volume"
])
self
.
volume_pressure_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_volume"
])
self
.
volume_pressure_plot
.
setLabel
(
"bottom"
,
text
[
"plot_axis_label_pressure"
])
self
.
volume_pressure_plot
.
legend
.
clear
()
self
.
volume_pressure_plot
.
legend
.
additem
(
self
.
volume_pressure_line
,
name
=
text
[
"plot_line_label_volume_pressure"
])
return
0
class
ChartsPlotWidget
(
QtWidgets
.
QWidget
):
def
__init__
(
self
,
port
=
54322
,
*
args
,
colors
:
dict
=
{},
**
kwargs
):
...
...
@@ -346,3 +381,14 @@ class ChartsPlotWidget(QtWidgets.QWidget):
"""
self
.
lines
[
key
]
.
setPen
(
pg
.
mkPen
(
color
=
(
0
,
0
,
0
,
0
),
width
=
0
))
return
0
@
QtCore
.
Slot
(
dict
)
def
localise_text
(
self
,
text
:
dict
)
->
int
:
"""
Update the text displayed on the axis' and legend of time plots.
"""
self
.
pressure_plot
.
setLabel
(
"left"
,
text
[
"plot_axis_label_pressure"
])
self
.
pressure_plot
.
legend
.
clear
()
self
.
pressure_plot
.
legend
.
addItem
(
self
.
pressure_line
,
text
[
"plot_line_label_pressure"
])
return
0
\ No newline at end of file
Write
Preview
Markdown
is supported
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