Index: denali.pro =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r53134008481fd775533e8988b7436f2f75e47336 --- denali.pro (.../denali.pro) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ denali.pro (.../denali.pro) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -51,7 +51,6 @@ common/HDDefs.h \ common/MsgDefs.h \ \ # Main - sources/VTreatmentBegin.h \ sources/main.h \ sources/model/MEndTreatmentResponse.h \ sources/model/MStartTreatmentResponse.h \ @@ -116,6 +115,8 @@ sources/gui/GuiController.h \ \ # ---------- Views ---------- sources/view/VTreatmentCreate.h \ + sources/view/VTreatmentEnd.h \ + sources/view/VTreatmentBegin.h \ sources/view/VEventSpy.h \ sources/view/VView.h \ sources/view/VPowerOff.h \ @@ -166,7 +167,6 @@ \ # common \ # Main main.cpp \ - sources/VTreatmentBegin.cpp \ sources/model/MEndTreatmentResponse.cpp \ sources/model/MStartTreatmentResponse.cpp \ sources/model/hd/data/MPrimingData.cpp \ @@ -225,6 +225,8 @@ sources/gui/GuiController.cpp \ \ # ---------- Views ---------- sources/view/VTreatmentCreate.cpp \ + sources/view/VTreatmentEnd.cpp \ + sources/view/VTreatmentBegin.cpp \ sources/view/VEventSpy.cpp \ sources/view/VPriming.cpp \ sources/view/VPowerOff.cpp \ Index: denali.pro.user =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r53134008481fd775533e8988b7436f2f75e47336 --- denali.pro.user (.../denali.pro.user) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ denali.pro.user (.../denali.pro.user) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -1,6 +1,6 @@ - + EnvironmentId Fisheye: Tag 53134008481fd775533e8988b7436f2f75e47336 refers to a dead (removed) revision in file `sources/VTreatmentBegin.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 53134008481fd775533e8988b7436f2f75e47336 refers to a dead (removed) revision in file `sources/VTreatmentBegin.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r0583a63307936f09e184dfe16acca25f9e3fd81c -r53134008481fd775533e8988b7436f2f75e47336 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 0583a63307936f09e184dfe16acca25f9e3fd81c) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -82,6 +82,7 @@ {Gui::GuiActionType::ID_StartTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_ConfirmTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_EndTreatmentReq , 0 }, + {Gui::GuiActionType::ID_EndTreatmentRsp , 0 }, // ---- {Gui::GuiActionType::ID_TreatmentRanges , 6 * 4 }, // 6 parameters each 4bytes Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r53134008481fd775533e8988b7436f2f75e47336 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -52,6 +52,7 @@ #include "VTreatmentCreate.h" #include "VPriming.h" #include "VTreatmentBegin.h" +#include "VTreatmentEnd.h" #include "VTreatmentAdjustmentDuration.h" #include "VTreatmentAdjustmentFlows.h" #include "VTreatmentAdjustmentUltrafiltrationEdit.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r53134008481fd775533e8988b7436f2f75e47336 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -97,8 +97,8 @@ ID_StartTreatmentReq = 0x3800, // 56 ID_StartTreatmentRsp = 0x3900, // 57 ID_ConfirmTreatmentReq = 0x3A00, // 58 - ID_EndTreatmentReq = 0x3B00, // 59 - ID_EndTreatmentRsp = 0x3C00, // 60 + ID_EndTreatmentReq = 0x3C00, // 60 + ID_EndTreatmentRsp = 0x3D00, // 61 ID_PrimingData = 0x4300, // 67 Index: sources/gui/qml/main.qml =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r53134008481fd775533e8988b7436f2f75e47336 --- sources/gui/qml/main.qml (.../main.qml) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/gui/qml/main.qml (.../main.qml) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -50,6 +50,7 @@ import VDGValvesStates 0.1; import VPriming 0.1; import VTreatmentBegin 0.1; +import VTreatmentEnd 0.1; // Qml imports import "qrc:/globals" @@ -110,6 +111,7 @@ VTreatmentCreate { id: vTreatmentCreate } VPriming { id: vPriming } VTreatmentBegin { id: vTreatmentBegin } + VTreatmentEnd { id: vTreatmentEnd } // ----- Follow the below Z order ----- // 1 - Screens Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -r53134008481fd775533e8988b7436f2f75e47336 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -63,6 +63,23 @@ _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.NoData) } } + + TouchRect { id : _endTreatmentButton + objectName: "_endTreatmentButton" + width: 200 + height: Variables.logoHeight + animated: true + anchors { + top : parent.top + right : _usbButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text.text: qsTr("End Treatment") + button.onPressed: { + vTreatmentEnd.doEndTreatmentRequest(); + } + } } /* Index: sources/model/MEndTreatmentResponse.h =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -r53134008481fd775533e8988b7436f2f75e47336 --- sources/model/MEndTreatmentResponse.h (.../MEndTreatmentResponse.h) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/model/MEndTreatmentResponse.h (.../MEndTreatmentResponse.h) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -27,11 +27,11 @@ } _data; public: - + // coco begin validated: Has been validated manually. Type_Enum typeText () const override { return Type_Enum::eEvent ; } Unit_Enum unitText () const override { return Unit_Enum::eHD ; } QString infoText () const override { return QString("EndTreatmentResponse"); } - +// coco end struct Data { quint32 endTreatmentResponse = 0; }; Index: sources/view/VTreatmentBegin.cpp =================================================================== diff -u --- sources/view/VTreatmentBegin.cpp (revision 0) +++ sources/view/VTreatmentBegin.cpp (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -0,0 +1,15 @@ +#include "VTreatmentBegin.h" + +using namespace View; + +VTreatmentBegin::VTreatmentBegin(QObject *parent) : QObject(parent) { } + +/** + * \brief VTreatmentBegin::doUserModifiedParameters + * Manages enabling / disabling the start treatment button + */ +void VTreatmentBegin::doUserModifiedParameters() +{ + continueEnabled(true); + emit continueEnabledChanged(continueEnabled()); +} Index: sources/view/VTreatmentBegin.h =================================================================== diff -u --- sources/view/VTreatmentBegin.h (revision 0) +++ sources/view/VTreatmentBegin.h (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -0,0 +1,37 @@ +#ifndef VTREATMENTSTART_H +#define VTREATMENTSTART_H + +// Qt +#include + +// Project +#include "main.h" + +// forward declarations +class tst_views; + +namespace View { + +class VTreatmentBegin : public QObject +{ + Q_OBJECT + + // friends + friend class ::tst_views; + +public: + explicit VTreatmentBegin(QObject *parent = nullptr); + +protected: + // coco begin validated: This has been validated manually + // Def Min Max Res + TREATMENT_PARAMETER(float, ufVolume, 0.1, 0, 8.0, 0.1 ) // mL +// coco end +protected: + PROPERTY(bool, continueEnabled, false) + +private slots: + void doUserModifiedParameters(); +}; +} +#endif // VTREATMENTSTART_H Index: sources/view/VTreatmentEnd.cpp =================================================================== diff -u --- sources/view/VTreatmentEnd.cpp (revision 0) +++ sources/view/VTreatmentEnd.cpp (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -0,0 +1,40 @@ + +// Qt + +// Project +#include "VTreatmentEnd.h" +#include "GuiController.h" + +using namespace View; +using namespace Gui; + + +VTreatmentEnd::VTreatmentEnd(QObject *parent) : QObject(parent) +{ + connect(this, SIGNAL(didEndTreatmentRequest(EndTreatmentRequestData)), + &_GuiController, SLOT(doAdjustment(EndTreatmentRequestData))); + + connect(&_GuiController, SIGNAL(didActionReceive(EndTreatmentResponseData)), + this, SLOT(onEndTreatmentResponse(EndTreatmentResponseData))); +} + +/*! + * \brief VTreatmentEnd::onEndTreatmentResponse + * Receives the end teatment response + * \param response The end treatment response + */ +void VTreatmentEnd::onEndTreatmentResponse(EndTreatmentResponseData response) +{ + LOG_DEBUG(tr("End Treatment Response: %1").arg(response.endTreatmentResponse)); +} + +/*! + * \brief VTreatmentEnd::doEndTreatmentRequest + * Sends an end treatment request + */ +void VTreatmentEnd::doEndTreatmentRequest() +{ + LOG_DEBUG(tr("End Treatment Request.")); + EndTreatmentRequestData endTreatmentRequest; + emit didEndTreatmentRequest(endTreatmentRequest); +} Index: sources/view/VTreatmentEnd.h =================================================================== diff -u --- sources/view/VTreatmentEnd.h (revision 0) +++ sources/view/VTreatmentEnd.h (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -0,0 +1,40 @@ +#ifndef VTREATMENTEND_H +#define VTREATMENTEND_H + +// Qt +#include + +// Project +#include "main.h" +#include "MTreatmentAdjustRequests.h" +#include "MEndTreatmentResponse.h" + +using namespace Model; + +// forward declarations +class tst_views; + +namespace View { + +class VTreatmentEnd : public QObject +{ + Q_OBJECT +private: + + // friends + friend class ::tst_views; + +public: + explicit VTreatmentEnd(QObject *parent = nullptr); + +signals: + void didEndTreatmentRequest(EndTreatmentRequestData request); + +public slots: + void doEndTreatmentRequest(); + +private slots: + void onEndTreatmentResponse(EndTreatmentResponseData response); +}; +} +#endif // VTREATMENTEND_H Index: sources/view/VView.h =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r53134008481fd775533e8988b7436f2f75e47336 --- sources/view/VView.h (.../VView.h) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/view/VView.h (.../VView.h) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -133,6 +133,7 @@ REGISTER_TYPE( VTreatmentCreate ) \ REGISTER_TYPE( VPriming ) \ REGISTER_TYPE( VTreatmentBegin ) \ + REGISTER_TYPE( VTreatmentEnd ) \ REGISTER_TYPE( VTreatmentAdjustmentSaline ) //--------------------------------------------------------------------------------// Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r53134008481fd775533e8988b7436f2f75e47336 --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -32,9 +32,6 @@ connect(this, SIGNAL(requestAlarmSilence(AlarmSilenceRequestData)), &_GuiController, SLOT(doAdjustment(AlarmSilenceRequestData))); - - connect(this, SIGNAL(didRequestEndTreatment(EndTreatmentRequestData)), - &_GuiController, SLOT(doAdjustment(EndTreatmentRequestData))); } void VAlarmStatus::onActionReceive(const AlarmStatusData &vData) @@ -156,20 +153,3 @@ emit requestAlarmSilence(data); onSetMinimize(true); } - -/*! - * \brief VAlarmStatus::onRequestEndTreatment - * When an alarm showing an end treatment request is issued, - * if the user decides to end the treatment, this slot will be called - * - * Note that this may have to be moved to another class depending on - * the direction of the alarm design and dialogues. - */ -void VAlarmStatus::doRequestEndTreatment() -{ - // coco begin validated: This has been validated manually as the end treatment request has not yet been implemented in QML - EndTreatmentRequestData endTreatmentRequest; - emit didRequestEndTreatment(endTreatmentRequest); -} -// coco end - Index: sources/view/hd/alarm/VAlarmStatus.h =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r53134008481fd775533e8988b7436f2f75e47336 --- sources/view/hd/alarm/VAlarmStatus.h (.../VAlarmStatus.h) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ sources/view/hd/alarm/VAlarmStatus.h (.../VAlarmStatus.h) (revision 53134008481fd775533e8988b7436f2f75e47336) @@ -83,7 +83,6 @@ void requestActionTransmit(GuiActionType vAction, const QVariantList &vData); void requestAlarmAcknowledge(AlarmAcknowledgeRequestData); void requestAlarmSilence(AlarmSilenceRequestData); - void didRequestEndTreatment(EndTreatmentRequestData); private: QString alarmPriorityText (GuiAlarmPriority vEnum); @@ -98,6 +97,5 @@ void onRequestOkay(GuiAlarmID alarmID); void onRequestSilence(); void onSetMinimize(bool minimize); - void doRequestEndTreatment(); }; }