Index: simulator/plugins/HDOpMode/interface.ui
===================================================================
diff -u -rdb6abd41ec9e5a31e858ac8a286cb59520a93ff2 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/HDOpMode/interface.ui (.../interface.ui) (revision db6abd41ec9e5a31e858ac8a286cb59520a93ff2)
+++ simulator/plugins/HDOpMode/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- HD Op Mode
+ &1 States/&1 HD Op Mode
-
Index: simulator/plugins/accelerometer/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/accelerometer/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/accelerometer/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Extra/&Accelerometer
+ &0 Device/&Accelerometer
-
Index: simulator/plugins/bloodPrime/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/bloodPrime/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/bloodPrime/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -23,7 +23,7 @@
- P&re-Treatment/&Blood Prime
+ &2 Pre-Treatment/&9 Blood Prime
Index: simulator/plugins/createtreatment/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/createtreatment/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/createtreatment/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- P&re-Treatment/&Create Treatment
+ &2 Pre-Treatment/&1 Create Treatment
-
Index: simulator/plugins/disposablesPrime/interface.ui
===================================================================
diff -u
--- simulator/plugins/disposablesPrime/interface.ui (revision 0)
+++ simulator/plugins/disposablesPrime/interface.ui (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,274 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 375
+ 115
+
+
+
+
+ 375
+ 115
+
+
+
+
+ 16777215
+ 115
+
+
+
+ &2 Pre-Treatment/&Disposables Prime
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
-
+
+
-
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Countdown
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldCountdown
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(32, 74, 135);
+
+
+ Disposables Prime Progress Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 0
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Timeout
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(32, 74, 135);
+
+
+ Disposables Prime
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldTimeout
+ valueChanged(int)
+ lblTimeout
+ setNum(int)
+
+
+ 244
+ 182
+
+
+ 469
+ 184
+
+
+
+
+ sldCountdown
+ valueChanged(int)
+ lblCountdown
+ setNum(int)
+
+
+ 413
+ 202
+
+
+ 468
+ 207
+
+
+
+
+
Index: simulator/plugins/disposablesPrime/loader.py
===================================================================
diff -u
--- simulator/plugins/disposablesPrime/loader.py (revision 0)
+++ simulator/plugins/disposablesPrime/loader.py (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,63 @@
+"""
+The Disposable Prime ui loader class
+"""
+
+# Python
+import os
+# Qt
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+# parent
+from simulator.dynamicloader import DynamicLoader
+# hd Simulator
+from dialin.ui.hd_simulator import HDSimulator
+# plugin specific
+# -- none --
+
+
+class Loader(DynamicLoader):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ sldTimeout: QtWidgets.QSlider
+ sldCountdown: QtWidgets.QSlider
+
+ def __init__(self, hd_simulator: HDSimulator):
+ super().__init__(os.path.dirname(__file__), hd_simulator)
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # blood prime data
+ self.sldTimeout = self.find_slider('sldTimeout')
+ self.sldCountdown = self.find_slider('sldCountdown')
+
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline data
+ self.sldTimeout.valueChanged.connect(self.do_data)
+ self.sldCountdown.valueChanged.connect(self.do_data)
+
+ @Slot()
+ def do_data(self):
+ """
+ the slot which is called to send the data
+ by calling the denaliMessage API cmd_send_treatment_blood_prime_data
+ :return: none
+ """
+ timeout = self.sldTimeout.value()
+ countdown = self.sldCountdown.value()
+ self.hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout, countdown)
Index: simulator/plugins/filterFlush/interface.ui
===================================================================
diff -u
--- simulator/plugins/filterFlush/interface.ui (revision 0)
+++ simulator/plugins/filterFlush/interface.ui (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,274 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 375
+ 115
+
+
+
+
+ 375
+ 115
+
+
+
+
+ 16777215
+ 115
+
+
+
+ &2 Pre-Treatment/&2 Filter Flush
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Countdown
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldCountdown
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(78, 157, 236);
+
+
+ Filter Flush Progress Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 0
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Timeout
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(78, 157, 236);
+
+
+ Filter Flush
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldTimeout
+ valueChanged(int)
+ lblTimeout
+ setNum(int)
+
+
+ 244
+ 182
+
+
+ 469
+ 184
+
+
+
+
+ sldCountdown
+ valueChanged(int)
+ lblCountdown
+ setNum(int)
+
+
+ 413
+ 202
+
+
+ 468
+ 207
+
+
+
+
+
Index: simulator/plugins/filterFlush/loader.py
===================================================================
diff -u
--- simulator/plugins/filterFlush/loader.py (revision 0)
+++ simulator/plugins/filterFlush/loader.py (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,63 @@
+"""
+The Disposable Prime ui loader class
+"""
+
+# Python
+import os
+# Qt
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+# parent
+from simulator.dynamicloader import DynamicLoader
+# hd Simulator
+from dialin.ui.hd_simulator import HDSimulator
+# plugin specific
+# -- none --
+
+
+class Loader(DynamicLoader):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ sldTimeout: QtWidgets.QSlider
+ sldCountdown: QtWidgets.QSlider
+
+ def __init__(self, hd_simulator: HDSimulator):
+ super().__init__(os.path.dirname(__file__), hd_simulator)
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # blood prime data
+ self.sldTimeout = self.find_slider('sldTimeout')
+ self.sldCountdown = self.find_slider('sldCountdown')
+
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline data
+ self.sldTimeout.valueChanged.connect(self.do_data)
+ self.sldCountdown.valueChanged.connect(self.do_data)
+
+ @Slot()
+ def do_data(self):
+ """
+ the slot which is called to send the data
+ by calling the denaliMessage API cmd_send_treatment_blood_prime_data
+ :return: none
+ """
+ timeout = self.sldTimeout.value()
+ countdown = self.sldCountdown.value()
+ self.hd_simulator.cmd_send_pre_treatment_filter_flush_progress_data(timeout, countdown)
Index: simulator/plugins/heparin/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/heparin/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/heparin/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -23,7 +23,7 @@
- &In-Treatment/&Heparin
+ &3 In-Treatment/&3 Heparin
-
Index: simulator/plugins/inlinebloodpressures/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/inlinebloodpressures/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/inlinebloodpressures/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &In-Treatment/In-Line Blood Pressures
+ &3 In-Treatment/&1 In-Line Blood Pressures
-
Index: simulator/plugins/pretreatmentstates/interface.ui
===================================================================
diff -u -red2d7cb5c8c2059444fd17cd4e1c0975461a903c -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/pretreatmentstates/interface.ui (.../interface.ui) (revision ed2d7cb5c8c2059444fd17cd4e1c0975461a903c)
+++ simulator/plugins/pretreatmentstates/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Pre-Treatment/Pre-Treatment &States
+ &1 States/&2 Pre-Treatment &States
-
Index: simulator/plugins/recirculate/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/recirculate/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/recirculate/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Treatment/&Recirculate
+ &4 End-Treatment/&2 Recirculate
-
Index: simulator/plugins/rinseback/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/rinseback/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/rinseback/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -23,7 +23,7 @@
- &Treatment/&Rinseback
+ &4 End-Treatment/&1 Rinseback
-
Index: simulator/plugins/salinebolus/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/salinebolus/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/salinebolus/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &In-Treatment/&Saline Bolus
+ &3 In-Treatment/&4 Saline Bolus
-
Index: simulator/plugins/selftestDry/interface.ui
===================================================================
diff -u
--- simulator/plugins/selftestDry/interface.ui (revision 0)
+++ simulator/plugins/selftestDry/interface.ui (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,274 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 375
+ 115
+
+
+
+
+ 375
+ 115
+
+
+
+
+ 16777215
+ 115
+
+
+
+ &2 Pre-Treatment/&Self Test Dry
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
-
+
+
-
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Countdown
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldCountdown
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(57, 71, 253);
+
+
+ Self Test Dry Progress Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 0
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Timeout
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(57, 71, 253);
+
+
+ Self Test Dry
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldTimeout
+ valueChanged(int)
+ lblTimeout
+ setNum(int)
+
+
+ 244
+ 182
+
+
+ 469
+ 184
+
+
+
+
+ sldCountdown
+ valueChanged(int)
+ lblCountdown
+ setNum(int)
+
+
+ 413
+ 202
+
+
+ 468
+ 207
+
+
+
+
+
Index: simulator/plugins/selftestDry/loader.py
===================================================================
diff -u
--- simulator/plugins/selftestDry/loader.py (revision 0)
+++ simulator/plugins/selftestDry/loader.py (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,63 @@
+"""
+The Disposable Prime ui loader class
+"""
+
+# Python
+import os
+# Qt
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+# parent
+from simulator.dynamicloader import DynamicLoader
+# hd Simulator
+from dialin.ui.hd_simulator import HDSimulator
+# plugin specific
+# -- none --
+
+
+class Loader(DynamicLoader):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ sldTimeout: QtWidgets.QSlider
+ sldCountdown: QtWidgets.QSlider
+
+ def __init__(self, hd_simulator: HDSimulator):
+ super().__init__(os.path.dirname(__file__), hd_simulator)
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # blood prime data
+ self.sldTimeout = self.find_slider('sldTimeout')
+ self.sldCountdown = self.find_slider('sldCountdown')
+
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline data
+ self.sldTimeout.valueChanged.connect(self.do_data)
+ self.sldCountdown.valueChanged.connect(self.do_data)
+
+ @Slot()
+ def do_data(self):
+ """
+ the slot which is called to send the data
+ by calling the denaliMessage API cmd_send_treatment_blood_prime_data
+ :return: none
+ """
+ timeout = self.sldTimeout.value()
+ countdown = self.sldCountdown.value()
+ self.hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(timeout, countdown)
Index: simulator/plugins/selftestNoCartridge/interface.ui
===================================================================
diff -u
--- simulator/plugins/selftestNoCartridge/interface.ui (revision 0)
+++ simulator/plugins/selftestNoCartridge/interface.ui (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,274 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 375
+ 115
+
+
+
+
+ 375
+ 115
+
+
+
+
+ 16777215
+ 115
+
+
+
+ &2 Pre-Treatment/&Self Test No Cartridge
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Countdown
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldCountdown
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(69, 115, 208);
+
+
+ Self Test No Cartridge Progress Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 0
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Timeout
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 0
+
+
+ 300
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(69, 115, 208);
+
+
+ Self Test No Cartridge
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldTimeout
+ valueChanged(int)
+ lblTimeout
+ setNum(int)
+
+
+ 244
+ 182
+
+
+ 469
+ 184
+
+
+
+
+ sldCountdown
+ valueChanged(int)
+ lblCountdown
+ setNum(int)
+
+
+ 413
+ 202
+
+
+ 468
+ 207
+
+
+
+
+
Index: simulator/plugins/selftestNoCartridge/loader.py
===================================================================
diff -u
--- simulator/plugins/selftestNoCartridge/loader.py (revision 0)
+++ simulator/plugins/selftestNoCartridge/loader.py (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -0,0 +1,63 @@
+"""
+The Disposable Prime ui loader class
+"""
+
+# Python
+import os
+# Qt
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+# parent
+from simulator.dynamicloader import DynamicLoader
+# hd Simulator
+from dialin.ui.hd_simulator import HDSimulator
+# plugin specific
+# -- none --
+
+
+class Loader(DynamicLoader):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ sldTimeout: QtWidgets.QSlider
+ sldCountdown: QtWidgets.QSlider
+
+ def __init__(self, hd_simulator: HDSimulator):
+ super().__init__(os.path.dirname(__file__), hd_simulator)
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # blood prime data
+ self.sldTimeout = self.find_slider('sldTimeout')
+ self.sldCountdown = self.find_slider('sldCountdown')
+
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline data
+ self.sldTimeout.valueChanged.connect(self.do_data)
+ self.sldCountdown.valueChanged.connect(self.do_data)
+
+ @Slot()
+ def do_data(self):
+ """
+ the slot which is called to send the data
+ by calling the denaliMessage API cmd_send_treatment_blood_prime_data
+ :return: none
+ """
+ timeout = self.sldTimeout.value()
+ countdown = self.sldCountdown.value()
+ self.hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(timeout, countdown)
Index: simulator/plugins/treatmentend/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/treatmentend/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/treatmentend/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Treatment/&Treatment End
+ &4 End-Treatment/&3 Treatment End
-
Index: simulator/plugins/treatmentranges/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/treatmentranges/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/treatmentranges/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &In-Treatment/&Adjustment Ranges
+ &3 In-Treatment/&0 Adjustment Ranges
-
Index: simulator/plugins/treatmentstates/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/treatmentstates/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/treatmentstates/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Treatment/&Treatment States
+ &1 States/&3 Treatment States
-
Index: simulator/plugins/ultrafiltration/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/ultrafiltration/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/ultrafiltration/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &In-Treatment/&Ultrafiltration
+ &3 In-Treatment/&2 Ultrafiltration
-
Index: simulator/plugins/version/interface.ui
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/plugins/version/interface.ui (.../interface.ui) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/plugins/version/interface.ui (.../interface.ui) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -11,7 +11,7 @@
- &Extra/&Versions
+ &0 Device/&Versions
-
Index: simulator/simulator/loader.py
===================================================================
diff -u -r8bfab5e4d1dd4e3bc638f28e77b4811218b84c39 -reb6acf9c1a4748852875c350568192999be9d3dd
--- simulator/simulator/loader.py (.../loader.py) (revision 8bfab5e4d1dd4e3bc638f28e77b4811218b84c39)
+++ simulator/simulator/loader.py (.../loader.py) (revision eb6acf9c1a4748852875c350568192999be9d3dd)
@@ -8,6 +8,7 @@
from PySide2 import QtWidgets
from PySide2.QtCore import Qt
+from PySide2.QtCore import Slot
from simulator.dynamicloader import DynamicLoader
@@ -66,7 +67,8 @@
# from within the __init__.py in the plugins folder
# folders with '__' and '.' have been ignored.
for plugin in available_plugins:
- self.__register_plugin(eval(plugin)(self.hd_simulator))
+ self.plugins.append(eval(plugin)(self.hd_simulator))
+ self.__register_plugin()
def __init_actions(self):
"""
@@ -105,31 +107,40 @@
menu = self.menuBar.addMenu(top_menu_name)
action = menu.addAction(sub_menu_name)
- action.setCheckable(True)
- action.toggled.connect(window.setVisible)
+ action.triggered.connect(lambda: self.__action_triggered(window))
self.action_show_all.toggled.connect(action.setChecked)
- def __register_plugin(self, obj: DynamicLoader, add_separator: bool = False):
+ def __action_triggered(self, window):
+ if window.isVisible():
+ if self.mdiArea.activeSubWindow() == window:
+ window.setVisible(False)
+ else:
+ self.mdiArea.setActiveSubWindow(window)
+ else:
+ window.setVisible(True)
+
+ def __register_plugin(self):
"""
creates the plugin object and adds it to the mdi and creates an action menu for it
:param obj: the plugin object
:return: False if the passed obj is None
"""
- self.plugins.append(obj)
- wgt = obj.window
- sub = self.mdiArea.addSubWindow(wgt)
- sub.setWindowFlags(Qt.WindowMinimizeButtonHint | Qt.WindowTitleHint)
- sub.setWindowFlag(Qt.WindowMaximizeButtonHint, obj.canMaximize)
- sub.setVisible(obj.isVisible)
+ titles = {}
+ for obj in self.plugins:
+ titles[obj.window.windowTitle()] = obj
- title = wgt.windowTitle()
- self.__create_actions(title, sub)
- wgt.setWindowTitle(wgt.setWindowTitle(title.replace('&', '')))
+ for title in sorted(titles):
+ wgt = titles[title].window
+ sub = self.mdiArea.addSubWindow(wgt)
- if add_separator:
- self.menuView.addSeparator()
+ sub.setWindowFlags(Qt.WindowMinimizeButtonHint | Qt.WindowTitleHint)
+ sub.setWindowFlag(Qt.WindowMaximizeButtonHint, obj.canMaximize)
+ sub.setVisible(obj.isVisible)
+ self.__create_actions(title, sub)
+ wgt.setWindowTitle(wgt.setWindowTitle(title.replace('&', '')))
+
def set_all_windows_visible(self, visible: bool):
"""
sets all the windows (in)visible