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()) +