Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -ra3030123e885fb9f22dea5839c4e988896a257e4 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision a3030123e885fb9f22dea5839c4e988896a257e4) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -333,14 +333,15 @@ if (success) { emit fwValidationSuccess(); - goToNextPage(true); + + // goToNextPage(true); } return success; } /** - * @brief VCreateTreatment::doActionReceive + * \brief VCreateTreatment::doActionReceive * Called when we receive a response back from firmware after requesting * to start selecting treatment parameters, cancel, or start the treatment * @param messageData @@ -351,17 +352,19 @@ if (messageData.startTreatmentResponse != 1) return; - if (startTreatmentRequest.request == StartTreatmentRequestData::eCancel) - goToNextPage(false); - else - goToNextPage(true); + if (startTreatmentRequest.request == StartTreatmentRequestData::eCancel) { + //goToNextPage(false); + } + else { + //goToNextPage(true); + } } /** - * @brief VCreateTreatment::getNextPage - * Updates the current page to the next page after - * moving forward or backward - * @param forward - (bool) true if moving forward, if false pop the page + * \brief VCreateTreatment::getNextPage + * \details Updates the current page to the next page after + * moving forward or backward + * \param forward - (bool) true if moving forward, if false pop the page */ void VTreatmentCreate::goToNextPage(bool forward) { @@ -429,15 +432,13 @@ // coco end /** - * \brief VCreateTreatment::onFinishedConfirm - * Emits treatment data to gui controller, - * who emits to application controller and the - * application controller will save the data to disk. + * \brief VCreateTreatment::onFinishedConfirm + * \details Emits treatment data to gui controller, + * who emits to application controller and the + * application controller will save the data to disk. + * \note Finished create treatment confirm... */ void VTreatmentCreate::doFinishedConfirm() { - qDebug() << "Finished create treatment confirm..."; - - QJsonObject obj { {"bloodFlowRate", QString::number(treatmentData.bloodFlowRate)}, {"dialysateFlowRate", QString::number(treatmentData.dialysateFlowRate)}, @@ -467,13 +468,13 @@ emit requestConfirm(confirmTreatmentRequest); // no FW response required - goToNextPage(true); + // goToNextPage(true); } /** - * \brief ApplicationController::saveNewTreatment - * Saves a new treatment to the filesystem. - * \param doc - QJsonDocument containing the new treatment parameters. + * \brief ApplicationController::saveNewTreatment + * \details Saves a new treatment to the file system. + * \param doc - QJsonDocument containing the new treatment parameters. * \returns QString - the file to be written to * */ @@ -491,9 +492,9 @@ } /** - * @brief VCreateTreatment::getParameterRangesDataCSV - * Gets the parameter ranges data prepared for CSV file format - * @return QString - the data to write to CSV + * \brief VCreateTreatment::getParameterRangesDataCSV + * \details Gets the parameter ranges data prepared for CSV file format + * \return QString - the data to write to CSV */ QString VTreatmentCreate::getParameterRangesDataCSV() { @@ -536,15 +537,14 @@ } /*! - * \brief VCreateTreatment::saveTreatmentRangesCSV - * Saves the treatment ranges to a CSV file - * \param filename - the csv file to save the ranges to - * \return bool - true if successful, false otherwise + * \brief VCreateTreatment::saveTreatmentRangesCSV + * \details Saves the treatment ranges to a CSV file + * \param filename - the csv file to save the ranges to + * \return bool - true if successful, false otherwise */ bool VTreatmentCreate::saveTreatmentRangesCSV(const QString &filename) { QString csvData = getParameterRangesDataCSV(); - return FileHandler::write(filename, csvData); } @@ -558,19 +558,18 @@ } /** - * \brief VCreateTreatment::onFnishedPrime - * Called when priming qml selections are complete. - * TODO: Placed here for now. Likely will be moved eventually. + * \brief VCreateTreatment::onFnishedPrime + * \details Called when priming qml selections are complete. + * \note Finished create treatment prime... + * \todo Placed here for now. Likely will be moved eventually. */ void VTreatmentCreate::doFinishedPrime() { - qDebug() << "Finished create treatment prime..."; - - goToNextPage(true); + // goToNextPage(true); } /** - * \brief VCreateTreatment::start - * Called when user is ready to begin a new treatment. + * \brief VCreateTreatment::start + * \details Called when user is ready to begin a new treatment. */ void VTreatmentCreate::doStartTreatment() { qDebug() << "Requesting to start a treatment..."; @@ -579,10 +578,10 @@ } /** - * \brief VCreateTreatment::validate - * Validates the create new treatment input. - * \param vData - the selected TreatmentParametersData - * \return true on success, false otherwise. + * \brief VCreateTreatment::validate + * \details Validates the create new treatment input. + * \param vData - the selected TreatmentParametersData + * \return true on success, false otherwise. */ bool VTreatmentCreate::validate(const AdjustTreatmentParametersRequestData &vData) { @@ -750,11 +749,11 @@ } /** - * \brief VCreateTreatment::indexInItems - * Checks if the index is in the QStringList - * \param idx (int) the index - * \param items (QStringList) The list of strings to check - * \return True if it is in the list, false otherwise + * \brief VCreateTreatment::indexInItems + * \details Checks if the index is in the QStringList + * \param idx (int) the index + * \param items (QStringList) The list of strings to check + * \return True if it is in the list, false otherwise */ bool VTreatmentCreate::indexInItems(quint32 idx, const QStringList &items) { @@ -777,9 +776,9 @@ } /*! - * \brief VCreateTreatment::doGetPrescriptionParameterNames - * Gets a list of the prescription parameter names. - * \return (QStringList) A list of the prescription parameter names + * \brief VCreateTreatment::doGetPrescriptionParameterNames + * \details Gets a list of the prescription parameter names. + * \return (QStringList) A list of the prescription parameter names */ QStringList VTreatmentCreate::doGetPrescriptionParameterNames() { @@ -794,9 +793,9 @@ } /*! - * \brief VCreateTreatment::doGetPrescriptionParameterValues - * Gets a list of the prescription parameter values - * \return (QStringList) The list of parameter values with units + * \brief VCreateTreatment::doGetPrescriptionParameterValues + * \details Gets a list of the prescription parameter values + * \return (QStringList) The list of parameter values with units */ QStringList VTreatmentCreate::doGetPrescriptionParameterValues() { @@ -829,9 +828,9 @@ } /*! - * \brief VCreateTreatment::doGetOperatingParameterValues - * Gets the operating parameter values - * \return (QStringList) The list of operating parameter values with units where applicable + * \brief VCreateTreatment::doGetOperatingParameterValues + * \details Gets the operating parameter values + * \return (QStringList) The list of operating parameter values with units where applicable */ QStringList VTreatmentCreate::doGetOperatingParameterValues() { @@ -863,45 +862,44 @@ } /** - * @brief VCreateTreatment::doSelectParameters - * Sends a request to FW to start selecting treatment parameters + * \brief VCreateTreatment::doSelectParameters + * \details Sends a request to FW to start selecting treatment parameters + * \note Sending request to FW to select parameters... */ void VTreatmentCreate::doSelectParameters() { - qDebug() << "Sending request to FW to select parameters..."; startTreatmentRequest.request = StartTreatmentRequestData::eSelectParams; emit requestSelectParameters(startTreatmentRequest); } /** - * @brief VCreateTreatment::doCancelSelectingParameters - * Sends a request to FW to cancel selecting parameters + * \brief VCreateTreatment::doCancelSelectingParameters + * \details Sends a request to FW to cancel selecting parameters + * \note Sending request to FW to cancel selecting parameters... */ void VTreatmentCreate::doCancelSelectingParameters() { - qDebug() << "Sending request to FW to cancel selecting parameters..."; startTreatmentRequest.request = StartTreatmentRequestData::eCancel; emit requestSelectParameters(startTreatmentRequest); } /** - * @brief VCreateTreatment::doCancelConfirmParameters - * Notifies FW the user has canceled confirming the treatment parameters + * \brief VCreateTreatment::doCancelConfirmParameters + * \details Notifies FW the user has canceled confirming the treatment parameters + * \note Telling FW user is canceling confirm treatment parameters... */ void VTreatmentCreate::doCancelConfirmParameters() { - // Tell FW we cancel confirm - qDebug() << "Telling FW user is canceling confirm treatment parameters..."; confirmTreatmentRequest.request = ConfirmTreatmentRequestData::eCancel; emit requestConfirm(confirmTreatmentRequest); - goToNextPage(false); + // goToNextPage(false); } /** - * @brief VCreateTreatment::doRequestPop - * Navigates backward in the create treatment process. + * \brief VCreateTreatment::doRequestPop + * \details Navigates backward in the create treatment process. */ void VTreatmentCreate::doRequestPop() { - goToNextPage(false); + // goToNextPage(false); }