Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -ra51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision a51b1ec80d65c7cf9f7f3b86f45a637a6d42efc1) @@ -10,8 +10,8 @@ #include // Project -#include "mtreatmentparameters.h" -#include "mtreatmentparametersresp.h" +#include "MTreatmentParameters.h" +#include "MTreatmentParametersResp.h" #include "guicontroller.h" #include "storageglobals.h" #include "filesaver.h" @@ -27,6 +27,29 @@ namespace View { +/*! + * \brief The VCreateTreatment class + * + * The Create Treatment View manages the treatment parameter selection entry and validation. + * + * The Create Treatment View manages data display and translation between the user interface + * and treatment parameter and treatment parameter response models. + * + * Upon HD messaging with confirmation of the current parameter selection, + * the Create Treatment View segues to the Create Treatment confirmation screen. + * + * Upon HD messaging with a list of one or more invalid parameters, the Create Treatment View + * will signal the invalid parameters to the GUI so the user can make adjustments. + * + * The Create Treatment View replicates the validation function used by FW to mitigate + * incompatible parameter selection situations. + * + * When a user modifies treatment parameters: + * - The treatment parameters model is populated with the data + * - The data is validated for correctness and compatibility + * - The continue button is enabled upon success so FW can validate the parameter selection + * + */ class VTreatmentCreate : public QObject { Q_OBJECT @@ -71,8 +94,8 @@ PROPERTY(bool, continueEnabled, false) PROPERTY(bool, saveTreatmentProfile, false) - TreatmentData treatmentData; - bool validate(const TreatmentData &vData); + AdjustTreatmentParametersRequestData treatmentData; + bool validate(const AdjustTreatmentParametersRequestData &vData); QString saveNewTreatment(const QJsonObject &obj, const QString &dir = Treatment_Profiles_Dir); QString getParameterRangesDataCSV(); bool saveTreatmentRangesCSV(const QString &filename); @@ -114,7 +137,6 @@ void onFinishedSaveNewTreatment(bool result); signals: - void didCreateTreatment(const TreatmentData &data); void showCreate(); void showConfirm(); void showPrime();