Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r159f2bb0317c7c3c0336e4cb80c7fef3f87e329a -re5ae6f8513673d1c09bd04ec3da08e71bfded5e2 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 159f2bb0317c7c3c0336e4cb80c7fef3f87e329a) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision e5ae6f8513673d1c09bd04ec3da08e71bfded5e2) @@ -37,6 +37,15 @@ #define UNSET 9999 +/* PARAMETER_PAIR macro allows defining two properties for each parameter. + * One property for the current value used towards treatment and a secondary for pre-populating + * a treatement on the create treatment screen. Done this way for better syncing when adding/removing + * a parameter. Adding here since it's only used here, in VTreatmentCreate + */ +#define PARAMETER_PAIR( vTYPE , vVARIABLE , vDEFVALUE ) \ + VALUESET( vTYPE , vVARIABLE , vDEFVALUE ) \ + VALUESET( vTYPE , vVARIABLE##_confirmed , vDEFVALUE ) + namespace View { /*! @@ -74,26 +83,28 @@ // friends friend class::tst_views; - VALUESET(quint32 , bloodFlowRate , 0) - VALUESET(quint32 , dialysateFlowRate , 0) - VALUESET(quint32 , treatmentDuration , 0) - VALUESET(float , heparinDispensingRate , 0) - VALUESET(float , heparinBolusVolume , 0) - VALUESET(quint32 , heparinStopTime , 0) - VALUESET(quint32 , salineBolusVolume , 0) + PARAMETER_PAIR(quint32 , bloodFlowRate , 0) + PARAMETER_PAIR(quint32 , dialysateFlowRate , 0) + PARAMETER_PAIR(quint32 , treatmentDuration , 0) + PARAMETER_PAIR(float , heparinDispensingRate , 0) + PARAMETER_PAIR(float , heparinBolusVolume , 0) + PARAMETER_PAIR(quint32 , heparinStopTime , 0) + PARAMETER_PAIR(quint32 , salineBolusVolume , 0) - VALUESET(quint32 , heparinType , 0) - VALUESET(quint32 , acidConcentrate , 0) - VALUESET(quint32 , bicarbonateConcentrate , 0) - VALUESET(quint32 , dialyzerType , 0) + PARAMETER_PAIR(quint32 , heparinType , 0) + PARAMETER_PAIR(quint32 , acidConcentrate , 0) + PARAMETER_PAIR(quint32 , bicarbonateConcentrate , 0) + PARAMETER_PAIR(quint32 , dialyzerType , 0) - VALUESET(qreal , dialysateTemp , 0) - VALUESET(qint32 , arterialPressureLimitWindow , 0) - VALUESET(qint32 , venousPressureLimitWindow , 0) - VALUESET(qint32 , venousPressureLimitAsymtrc , 0) - VALUESET(quint32 , bloodPressureMeasureInterval , 0) - VALUESET(quint32 , rinsebackFlowRate , 0) + PARAMETER_PAIR(qreal , dialysateTemp , 0) + PARAMETER_PAIR(qint32 , arterialPressureLimitWindow , 0) + PARAMETER_PAIR(qint32 , venousPressureLimitWindow , 0) + PARAMETER_PAIR(qint32 , venousPressureLimitAsymtrc , 0) + PARAMETER_PAIR(quint32 , bloodPressureMeasureInterval , 0) + PARAMETER_PAIR(quint32 , rinsebackFlowRate , 0) + PROPERTY( bool , isLastConfirmedParametersPopulated , false ) // for enabling/disabling the populate button in QML + VALUESET(QString , patientID ,"") VALUESET(bool , continueEnabled , 0) @@ -117,12 +128,12 @@ TRIGGER (quint32 , bloodPressureMeasureIntervalRejectReason , 0 ) TRIGGER (quint32 , rinsebackFlowRateRejectReason , 0 ) - VIEW_DEC_CLASS(VTreatmentCreate) VIEW_DEC_SLOT(AdjustParametersValidationResponseData) private: QString enumToString(GuiRequestReasons vEnum); + AdjustParametersStoredData _storedParameters; signals: void didAdjustment(const AdjustParametersValidationRequestData &data); @@ -138,5 +149,7 @@ QStringList doGetPrescriptionParameterValues(); QStringList doGetOperatingParameterValues(); + + void doConfirmParameters(); }; }