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
3e62accf
Commit
3e62accf
authored
May 12, 2021
by
Gabriel Rodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add localisation for start, stop and standby buttons
parent
e5837cac
Pipeline
#1517
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
NativeUI.py
NativeUI/NativeUI.py
+4
-1
text_english.json
NativeUI/configs/text_english.json
+3
-0
text_portuguese.json
NativeUI/configs/text_portuguese.json
+3
-0
ventilator_start_stop_buttons_widget.py
...UI/widget_library/ventilator_start_stop_buttons_widget.py
+16
-1
No files found.
NativeUI/NativeUI.py
View file @
3e62accf
...
...
@@ -226,7 +226,7 @@ class NativeUI(HEVClient, QMainWindow):
self
.
PlotSignal
.
connect
(
self
.
widgets
.
detailed_plots
.
update_plot_data
)
self
.
PlotSignal
.
connect
(
self
.
widgets
.
charts_widget
.
update_plot_data
)
# When measurement data is updated, measurement widgets shouldupdate
# When measurement data is updated, measurement widgets should
update
self
.
MeasurementSignal
.
connect
(
self
.
widgets
.
normal_measurements
.
update_value
)
self
.
MeasurementSignal
.
connect
(
self
.
widgets
.
detailed_measurements
.
update_value
)
...
...
@@ -237,6 +237,9 @@ class NativeUI(HEVClient, QMainWindow):
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
normal_plots
.
localise_text
)
self
.
widgets
.
localisation_button
.
SetLocalisation
.
connect
(
self
.
widgets
.
ventilator_start_stop_buttons_widget
.
localise_text
)
return
0
...
...
NativeUI/configs/text_english.json
View file @
3e62accf
{
"language_name"
:
"English"
,
"start_button"
:
"START"
,
"stop_button"
:
"STOP"
,
"standby_button"
:
"STANDBY"
,
"plot_axis_label_pressure"
:
"Pressure [cmH<sub>2</sub>O]"
,
"plot_axis_label_flow"
:
"Flow [L/min]"
,
"plot_axis_label_volume"
:
"Volume [mL]"
,
...
...
NativeUI/configs/text_portuguese.json
View file @
3e62accf
{
"language_name"
:
"Portugues"
,
"start_button"
:
"INICIAR"
,
"stop_button"
:
"PARAR"
,
"standby_button"
:
"ESPERAR"
,
"plot_axis_label_pressure"
:
"Pressao [cmH<sub>2</sub>O]"
,
"plot_axis_label_flow"
:
"Fluxo [L/min]"
,
"plot_axis_label_volume"
:
"Volume [mL]"
,
...
...
NativeUI/widget_library/ventilator_start_stop_buttons_widget.py
View file @
3e62accf
...
...
@@ -15,6 +15,7 @@ __status__ = "Prototype"
import
logging
from
PySide2
import
QtGui
,
QtWidgets
from
PySide2.QtCore
import
QSize
from
PySide2
import
QtCore
from
global_widgets.tab_hold_buttons
import
holdButton
...
...
@@ -40,7 +41,7 @@ class VentilatorStartStopButtonsWidget(QtWidgets.QWidget):
self
.
button_standby
=
holdButton
(
NativeUI
)
# QtWidgets.QPushButton()
self
.
__buttons
=
[
self
.
button_start
,
self
.
button_stop
,
self
.
button_standby
]
self
.
__buttontext
=
[
"START"
,
"STOP"
,
"STANDBY"
]
self
.
localise_text
(
NativeUI
.
text
)
self
.
__buttoncommand
=
[
""
]
for
button
,
text
in
zip
(
self
.
__buttons
,
self
.
__buttontext
):
...
...
@@ -121,3 +122,17 @@ class VentilatorStartStopButtonsWidget(QtWidgets.QWidget):
for
button
in
self
.
__buttons
:
button
.
setFont
(
font
)
return
0
@
QtCore
.
Slot
(
dict
)
def
localise_text
(
self
,
text
:
dict
):
self
.
__buttontext
=
[
text
[
"start_button"
],
text
[
"stop_button"
],
text
[
"standby_button"
]]
self
.
button_start
.
setText
(
text
[
"start_button"
])
self
.
button_stop
.
setText
(
text
[
"stop_button"
])
self
.
button_standby
.
setText
(
text
[
"standby_button"
])
return
0
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