Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -r72a7f822f243d779f0d23e8060671dc59aacc748 -r51a16e937898f4aec639e9dc5ff33bd0d67bf4ab --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 72a7f822f243d779f0d23e8060671dc59aacc748) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 51a16e937898f4aec639e9dc5ff33bd0d67bf4ab) @@ -24,6 +24,7 @@ #include "DeviceController.h" #include "FileHandler.h" #include "crc.h" +#include "TreatmentLog.h" /*! * \brief CloudSyncController::CloudSyncController @@ -90,6 +91,8 @@ this , SLOT( onWatchFileChange (const QString &))); connect(&_MessageDispatcher , SIGNAL(didActionReceive (GuiActionType,const QVariantList &)), this , SLOT( onActionReceive (GuiActionType,const QVariantList &))); + connect(&_TreatmentLog , SIGNAL(didTreatmentLogSave(const QString &, const QString &, const QString &)), + this , SLOT( onTreatmentLogSave(const QString &, const QString &, const QString &))); } /*! @@ -423,7 +426,23 @@ // store the last message data _lastReceivedData[eMessageID_DeviceState] = data; sendUIHistory (eMessageID_DeviceState); + break; + default: break; } } + +/*! + * \brief CloudSyncController::onTreatmentLogSave + * \details The slot being called when the TreatmentLogController notifies the CloudSyncController, about the treatment log being successfully saved. + * \param vPatientID - Patient ID + * \param vDeviceID - Device ID + * \param vFileName - The complete Treatment log path and file name. + */ +void CloudSyncController::onTreatmentLogSave(const QString &vPatientID, const QString &vDeviceID, const QString &vFileName) +{ + QStringList data { vPatientID, vDeviceID, vFileName }; + _lastReceivedData[eMessageID_TxReport] = data; + sendUIHistory (eMessageID_TxReport); +}