Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 -rf7b3e0bcd926f8aabc5caa1e76fce04aa8c5eb89 --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision f7b3e0bcd926f8aabc5caa1e76fce04aa8c5eb89) @@ -16,11 +16,11 @@ connect(&_FileSaver, SIGNAL(fileSaved(bool)), this, SLOT(onFinishedSaveNewTreatment(bool))); - connect(this, SIGNAL(requestValidateParameters(GuiActionType,QVariantList)), - &_GuiController, SLOT(doActionTransmit(GuiActionType,QVariantList))); + connect(this, SIGNAL(requestValidateParameters(AdjustTreatmentParametersRequestData)), + &_GuiController, SLOT(doAdjustment(AdjustTreatmentParametersRequestData))); - connect(&_GuiController, SIGNAL(didActionReceive(GuiActionType,QVariantList)), - this, SLOT(onFWValidationResponse(GuiActionType,QVariantList))); + connect(&_GuiController, SIGNAL(didActionReceive(AdjustTreatmentParametersResponseData)), + this, SLOT(onFWValidationResponse(AdjustTreatmentParametersResponseData))); connect(this, SIGNAL(requestSelectParameters(StartTreatmentRequestData)), &_GuiController, SLOT(doAdjustment(StartTreatmentRequestData))); @@ -187,31 +187,9 @@ return; } - // Request that FW validates the selected parameters - QVariantList messageData = { - treatmentData.bloodFlowRate, - treatmentData.dialysateFlowRate, - treatmentData.duration, - treatmentData.heparinStopTime, - treatmentData.salineBolus, - treatmentData.acidConcentrate, - treatmentData.bicarbonateConcentrate, - treatmentData.dialyzerType, - treatmentData.bloodPressureMeasureInterval, - treatmentData.rinsebackFlowRate, - treatmentData.arterialPressureLimitLow, - treatmentData.arterialPressureLimitHigh, - treatmentData.venousPressureLimitLow, - treatmentData.venousPressureLimitHigh, - treatmentData.heparinDispensingRate, - treatmentData.heparinBolusVolume, - treatmentData.dialysateTemp, - }; - GuiActionType messageAction = GuiActions::ID_CreateTreatmentReq; + emit requestValidateParameters(treatmentData); - emit requestValidateParameters(messageAction, messageData); - LOG_DEBUG("Requesting FW validation of new treatment parameters"); } @@ -240,14 +218,8 @@ * \param messageData The message data must contain the reject reason codes for all parameters * \returns True if FW OK's treatment parameters, false otherwise */ -bool VTreatmentCreate::onFWValidationResponse(const GuiActionType &actionType, const QVariantList &messageData) { +bool VTreatmentCreate::onFWValidationResponse(AdjustTreatmentParametersResponseData data) { - if (actionType != GuiActionType::ID_CreateTreatmentRsp) - return false; - - Model::MTreatmentParametersResponse response; - AdjustTreatmentParametersResponseData data = response.fromVariantList(messageData); - bool success = true; if (data.bloodFlowRate != Gui::GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { if (success) emit scrollToParameter(GET_VARIABLE_NAME(data.bloodFlowRate));