Commit e5837cac authored by Gabriel Rodrigues's avatar Gabriel Rodrigues

Connect the normal plots with localisation button & update text_portuguese

parent b34f549d
Pipeline #1516 failed with stages
......@@ -234,6 +234,9 @@ class NativeUI(HEVClient, QMainWindow):
self.widgets.localisation_button.SetLocalisation.connect(
self.widgets.normal_measurements.localise_text
)
self.widgets.localisation_button.SetLocalisation.connect(
self.widgets.normal_plots.localise_text
)
return 0
......
......@@ -15,15 +15,15 @@
"button_label_main_normal": "Normal",
"button_label_main_detailed": "Detalhado",
"ui_window_title": "HEV NativeUI",
"measurement_label_plateau_pressure": "Pressao de Plato",
"measurement_label_respiratory_rate": "RR",
"measurement_label_plateau_pressure": "P<sub>Plato<sub> [cmH<sub>2</sub>O]",
"measurement_label_respiratory_rate": "FREQ<sub>RESP<sub>",
"measurement_label_fio2_percent": "FIO<sub>2</sub> [%]",
"measurement_label_exhaled_tidal_volume": "Volume Exalado [mL]",
"measurement_label_exhaled_tidal_volume": "VOL<sub>EXAL<sub> [mL]",
"measurement_label_exhaled_minute_volume": "MVE [<sup>L</sup>/<sub>min</sub>]",
"measurement_label_peep": "PEEP [cmH<sub>2</sub>O]",
"measurement_label_inhale_exhale_ratio": "I:E",
"measurement_label_mean_airway_pressure": "P<sub>MEAN</sub> [cmH<sub>2</sub>O]",
"measurement_label_mean_airway_pressure": "P<sub>MEDIO</sub> [cmH<sub>2</sub>O]",
"measurement_label_inhaled_tidal_volume": "VTI [mL]",
"measurement_label_inhaled_minute_volume": "MVI [L/min]",
"measurement_label_peak_inspiratory_pressure": "P<sub>PEAK</sub> [cmH<sub>2</sub>O]"
"measurement_label_peak_inspiratory_pressure": "P<sub>PICO</sub> [cmH<sub>2</sub>O]"
}
......@@ -126,6 +126,26 @@ class TimePlotsWidget(QtWidgets.QWidget):
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"])
return 0
class CirclePlotsWidget(QtWidgets.QWidget):
def __init__(self, NativeUI, port=54322, *args, **kwargs):
......
Markdown is supported
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