Index: TD_TreatmentAdjustmentsPressures/interface.ui =================================================================== diff -u -r85dcfe80f3e4c9d51423fa66d98647f83ebcd85c -red7623100acac16c74aeaacdbf66151829623741 --- TD_TreatmentAdjustmentsPressures/interface.ui (.../interface.ui) (revision 85dcfe80f3e4c9d51423fa66d98647f83ebcd85c) +++ TD_TreatmentAdjustmentsPressures/interface.ui (.../interface.ui) (revision ed7623100acac16c74aeaacdbf66151829623741) @@ -6,8 +6,8 @@ 0 0 - 424 - 209 + 473 + 183 @@ -25,304 +25,7 @@ &3 Treatment/Adjustments/&3 Pressure - - 5 - - - 5 - - - 5 - - - 5 - - - 5 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - - - 0 - 0 - - - - - 352 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - - - - color: rgb(238, 238, 236); -background-color: rgb(92, 53, 102); - - - - 114 : [0x7200] : Pressure Adjustments Req - - - Qt::AlignCenter - - - - - - - - 10 - - - - Reset - - - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 10 - - - - QFrame::Box - - - QFrame::Raised - - - -- - - - Qt::AlignCenter - - - - - - - - 180 - 0 - - - - - 10 - - - - Venous Window (mmHg) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 180 - 0 - - - - - 10 - - - - Venous Asymmetric Window (mmHg) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 180 - 0 - - - - - 10 - - - - TMP Window (mmHg) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 10 - - - - QFrame::Box - - - QFrame::Raised - - - -- - - - Qt::AlignCenter - - - - - - - - 10 - - - - QFrame::Box - - - QFrame::Raised - - - -- - - - Qt::AlignCenter - - - - - - - - 10 - - - - QFrame::Box - - - QFrame::Raised - - - -- - - - Qt::AlignCenter - - - - - - - - 180 - 0 - - - - - 10 - - - - Arterial Window (mmHg) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - + QFrame::StyledPanel @@ -361,7 +64,7 @@ - 115 : [0x7300] : Pressure Adjustments Rsp + 115 : [0x7300] : Pressure Adjustments Qt::AlignCenter @@ -380,58 +83,276 @@ - - - - - 10 - - - - Reset - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 2 - - - 2 - - - - - - 10 - - - - Rejection Reason - - + + + + + + + + 10 + + + + Qt::AlignCenter + + + 100 + + + + + + + + 180 + 0 + + + + + 10 + + + + Venous Window (mmHg) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 180 + 0 + + + + + 10 + + + + Arterial Window (mmHg) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + + + + Qt::AlignCenter + + + 100 + + + + + + + + 10 + + + + Qt::AlignCenter + + + 100 + + + + + + + + 10 + + + + QFrame::Box + + + QFrame::Raised + + + -- + + + Qt::AlignCenter + + + + + + + + 10 + + + + QFrame::Box + + + QFrame::Raised + + + -- + + + Qt::AlignCenter + + + + + + + + 10 + + + + QFrame::Box + + + QFrame::Raised + + + -- + + + Qt::AlignCenter + + + + + + + + 50 + 0 + + + + + 10 + + + + QFrame::Box + + + QFrame::Raised + + + -- + + + Qt::AlignCenter + + + + + + + + 180 + 0 + + + + + 10 + + + + Venous Asymmetric Window (mmHg) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + + + + Qt::AlignCenter + + + 100 + + + + + + + Accepted + + + true + + + + + + + + 180 + 0 + + + + + 10 + + + + TMP Window (mmHg) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 80 + 16777215 + + + + + 10 + + + + Req [0x7200] + + + + - - - - - 10 - - - - Qt::AlignCenter - - - 100 - - - Index: TD_TreatmentAdjustmentsPressures/loader.py =================================================================== diff -u -r5bcfcac949d3a6c28ea9555ec5dcf7de978a06fd -red7623100acac16c74aeaacdbf66151829623741 --- TD_TreatmentAdjustmentsPressures/loader.py (.../loader.py) (revision 5bcfcac949d3a6c28ea9555ec5dcf7de978a06fd) +++ TD_TreatmentAdjustmentsPressures/loader.py (.../loader.py) (revision ed7623100acac16c74aeaacdbf66151829623741) @@ -43,42 +43,40 @@ finds and creates widgets :return: none """ - self.tbReqReset = self.find_widget(QtWidgets.QToolButton , 'tbReqReset' ) self.lbArterialWindowValue = self.find_widget(QtWidgets.QLabel , 'lbArterialWindowValue' ) self.lbVenousWindowValue = self.find_widget(QtWidgets.QLabel , 'lbVenousWindowValue' ) self.lbVenousAsymmetricValue = self.find_widget(QtWidgets.QLabel , 'lbVenousAsymmetricValue' ) self.lbTmpWindowValue = self.find_widget(QtWidgets.QLabel , 'lbTmpWindowValue' ) self.tbRspSend = self.find_widget(QtWidgets.QToolButton , 'tbRspSend' ) - self.tbRspReset = self.find_widget(QtWidgets.QToolButton , 'tbRspReset' ) - self.sbRejectionReason = self.find_widget(QtWidgets.QSpinBox , 'sbRejectionReason' ) + self.cbAccepted = self.find_widget(QtWidgets.QCheckBox , 'cbAccepted' ) + self.spnArterialWindowRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnArterialWindowRejectReason' ) + self.spnVenousWindowRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnVenousWindowRejectReason' ) + self.spnVenousAsymmetricRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnVenousAsymmetricRejectReason' ) + self.spnTmpWindowRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnTmpWindowRejectReason' ) def _init_connections(self): """ initializes the widgets connections :return: none """ - self.tbReqReset .clicked .connect(self.init_pressure_adjustments_request ) self.tbRspSend .clicked .connect(self.do_pressure_adjustments_response ) - self.tbRspReset .clicked .connect(self.init_pressure_adjustments_response ) def _init_widgets(self): """ initializes the widgets' properties :return: none """ - self.init_pressure_adjustments_request() - self.init_pressure_adjustments_response() - - - @Slot() - def init_pressure_adjustments_request(self): self.lbArterialWindowValue .setText("--") self.lbVenousWindowValue .setText("--") self.lbVenousAsymmetricValue.setText("--") self.lbTmpWindowValue .setText("--") + self.spnArterialWindowRejectReason .setValue(0) + self.spnVenousWindowRejectReason .setValue(0) + self.spnVenousAsymmetricRejectReason .setValue(0) + self.spnTmpWindowRejectReason .setValue(0) @Slot() @@ -101,20 +99,14 @@ @Slot() - def init_pressure_adjustments_response(self): - self.sbRejectionReason .setValue(0) - - - @Slot() def do_pressure_adjustments_response(self): """ the slot for sending pressure adjustments response :return: none """ - self.td_interface.cmd_send_general_response( - message_id = MsgIds.MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, - accepted = 1 if self.sbRejectionReason.value() == 0 else 0, - reason = self.sbRejectionReason.value(), - is_pure_data = False, - has_parameters = False, - ) + self.td_interface.td_pressures_adjustment_response(self.cbAccepted .isChecked(), + self.spnArterialWindowRejectReason .value(), + self.spnVenousWindowRejectReason .value(), + self.spnVenousAsymmetricRejectReason .value(), + self.spnTmpWindowRejectReason .value()) +