Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -re5ae6f8513673d1c09bd04ec3da08e71bfded5e2 -r656a6e14a253c7125fa8408ae2aa0c1223009565 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision e5ae6f8513673d1c09bd04ec3da08e71bfded5e2) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 656a6e14a253c7125fa8408ae2aa0c1223009565) @@ -37,15 +37,6 @@ #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 { /*! @@ -83,28 +74,26 @@ // friends friend class::tst_views; - 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 , 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 , heparinType , 0) - PARAMETER_PAIR(quint32 , acidConcentrate , 0) - PARAMETER_PAIR(quint32 , bicarbonateConcentrate , 0) - PARAMETER_PAIR(quint32 , dialyzerType , 0) + VALUESET(quint32 , heparinType , 0) + VALUESET(quint32 , acidConcentrate , 0) + VALUESET(quint32 , bicarbonateConcentrate , 0) + VALUESET(quint32 , dialyzerType , 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) + VALUESET(qreal , dialysateTemp , 0) + VALUESET(qint32 , arterialPressureLimitWindow , 0) + VALUESET(qint32 , venousPressureLimitWindow , 0) + VALUESET(qint32 , venousPressureLimitAsymtrc , 0) + VALUESET(quint32 , bloodPressureMeasureInterval , 0) + VALUESET(quint32 , rinsebackFlowRate , 0) - PROPERTY( bool , isLastConfirmedParametersPopulated , false ) // for enabling/disabling the populate button in QML - VALUESET(QString , patientID ,"") VALUESET(bool , continueEnabled , 0) @@ -128,13 +117,17 @@ TRIGGER (quint32 , bloodPressureMeasureIntervalRejectReason , 0 ) TRIGGER (quint32 , rinsebackFlowRateRejectReason , 0 ) + PROPERTY( bool , isLastConfirmedParametersPopulated , false ) // for enabling/disabling the populate button in QML + VIEW_DEC_CLASS(VTreatmentCreate) VIEW_DEC_SLOT(AdjustParametersValidationResponseData) private: QString enumToString(GuiRequestReasons vEnum); - AdjustParametersStoredData _storedParameters; + void updateConfirmedTreatmentParams(); + AdjustParametersValidationRequestData _confirmedTxParamsData; + signals: void didAdjustment(const AdjustParametersValidationRequestData &data); void didAdjustment(const AdjustParametersConfirmRequestData &data); @@ -146,10 +139,9 @@ void doValidation (); void doConfirm (); void doCancel (); + void prepopulateParameters(); QStringList doGetPrescriptionParameterValues(); QStringList doGetOperatingParameterValues(); - - void doConfirmParameters(); }; }