Index: TreatmentLog/interface.ui
===================================================================
diff -u -r76d519616b7d61403ff04c5cc30648fe97d07827 -rdfb07b224d8af91a376cd0a39a6b2c5f83f6fba8
--- TreatmentLog/interface.ui (.../interface.ui) (revision 76d519616b7d61403ff04c5cc30648fe97d07827)
+++ TreatmentLog/interface.ui (.../interface.ui) (revision dfb07b224d8af91a376cd0a39a6b2c5f83f6fba8)
@@ -7,7 +7,7 @@
0
0
438
- 307
+ 571
@@ -19,8 +19,8 @@
Treatment &Log/&1 Treatment Log
-
- -
+
+
-
-
@@ -44,7 +44,7 @@
- -
+
-
QFrame::StyledPanel
@@ -101,7 +101,7 @@
- 59 : [0x3B00] : Treament Log Alarm
+ 106 : [0x6A00] : Treament Log Alarm
Qt::AlignCenter
@@ -222,7 +222,7 @@
- -
+
-
QFrame::StyledPanel
@@ -272,7 +272,7 @@
background-color: rgb(92, 53, 102);
- 61 : [0x3D00] : Treatment Log Event
+ 107 : [0x6B00] : Treatment Log Event
Qt::AlignCenter
@@ -393,6 +393,183 @@
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 300
+ 0
+
+
+
+
+ 10
+
+
+
+ false
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(92, 53, 102);
+
+
+ 173 : [0xAD00] : Treatment Log Average
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ Send
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ Reset
+
+
+
+
+
+ -
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Blood Flow Rate (F32)
+
+
+
+ -
+
+
+ Dialysate Flow Rate (F32)
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ UF Rate (F32)
+
+
+
+ -
+
+
+ Arterial Pressure (F32)
+
+
+
+ -
+
+
+ Venous Pressure (F32)
+
+
+
+ -
+
+
+ TMP Pressure (F32)
+
+
+
+ -
+
+
+ Dialysate Temperature (F32)
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
Index: TreatmentLog/loader.py
===================================================================
diff -u -r2818663f5c66c2ca73ab8d6fadc2040c332bc1df -rdfb07b224d8af91a376cd0a39a6b2c5f83f6fba8
--- TreatmentLog/loader.py (.../loader.py) (revision 2818663f5c66c2ca73ab8d6fadc2040c332bc1df)
+++ TreatmentLog/loader.py (.../loader.py) (revision dfb07b224d8af91a376cd0a39a6b2c5f83f6fba8)
@@ -58,6 +58,18 @@
self.eventNewValue.setValidator(floatValidator)
+ self.avgReset = self.find_widget(QtWidgets.QToolButton , 'tbAvgReset' )
+ self.avgSend = self.find_widget(QtWidgets.QToolButton , 'tbAvgSend' )
+ self.dspBloodFLowRate = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspBloodFLowRate' )
+ self.dspDialysateFlowRate = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspDialysateFlowRate' )
+ self.dspUFRate = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspUFRate' )
+ self.dspArterialPressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspArterialPressure' )
+ self.dspVenousPressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspVenousPressure' )
+ self.dspTMPPressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspTMPPressure' )
+ self.dspDialysateTemp = self.find_widget(QtWidgets.QDoubleSpinBox , 'dspDialysateTemp' )
+
+
+
def _init_connections(self):
"""
initializes the widgets connections
@@ -74,7 +86,10 @@
self.eventOldValue .editingFinished.connect(self.do_lineedit_editing_finished)
self.eventNewValue .editingFinished.connect(self.do_lineedit_editing_finished)
+ self.avgReset .clicked.connect(self.init_avg)
+ self.avgSend .clicked.connect(self.do_avg )
+
@Slot()
def _init_widgets(self):
"""
@@ -83,6 +98,7 @@
"""
self.init_alarm()
self.init_event()
+ self.init_avg()
@Slot()
@@ -133,7 +149,40 @@
)
+
@Slot()
+ def init_avg(self):
+ """
+ the slot for initializing avg data
+ :return: none
+ """
+ self.dspBloodFLowRate .setValue(0)
+ self.dspDialysateFlowRate .setValue(0)
+ self.dspUFRate .setValue(0)
+ self.dspArterialPressure .setValue(0)
+ self.dspVenousPressure .setValue(0)
+ self.dspTMPPressure .setValue(0)
+ self.dspDialysateTemp .setValue(0)
+
+
+ @Slot()
+ def do_avg(self):
+ """
+ the slot sending alarm data
+ :return: none
+ """
+ self.td_interface.td_treatment_log_average_data(
+ self.dspBloodFLowRate .value() ,
+ self.dspDialysateFlowRate .value() ,
+ self.dspUFRate .value() ,
+ self.dspArterialPressure .value() ,
+ self.dspVenousPressure .value() ,
+ self.dspTMPPressure .value() ,
+ self.dspDialysateTemp .value()
+ )
+
+
+ @Slot()
def do_lineedit_editing_finished(self):
if isinstance(self.sender(), QtWidgets.QLineEdit):
value = float("0" if (len(self.sender().text()) == 0 or self.sender().text() == ".") else self.sender().text())