Index: sources/applicationcontroller.cpp =================================================================== diff -u -r93b6ad6b18c505fedab37d95dc87be61db48641c -r69ca2ed68829029cff732de622d684e6a21069de --- sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision 93b6ad6b18c505fedab37d95dc87be61db48641c) +++ sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision 69ca2ed68829029cff732de622d684e6a21069de) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file applicationcontroller.cpp - * \author (last) Peter Lucia - * \date (last) 25-Jun-2020 + * \author (last) Behrouz NematiPour + * \date (last) 25-Aug-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 * @@ -24,6 +24,9 @@ #include "filehandler.h" #include "guicontroller.h" + +using namespace Storage; + /*! * \brief ApplicationController::ApplicationController * \details Constructor @@ -101,13 +104,19 @@ connect(&_MessageDispatcher, SIGNAL(didFailedTransmit(Sequence)), this , SLOT( onFailedTransmit(Sequence))); + // USB drive connect(&_GuiController , SIGNAL(didUSBDriveUmount()), this , SLOT( onUSBDriveUmount())); connect(&_DriveWatcher , SIGNAL(didUSBDriveMount ()), this , SLOT( onUSBDriveMount ())); connect(&_DriveWatcher , SIGNAL(didUSBDriveRemove()), this , SLOT( onUSBDriveRemove())); + // SD Card + connect(&_DriveWatcher , SIGNAL(didSDCardStateChange(bool, bool)), + this , SLOT( onSDCardStateChange(bool, bool))); + + connect(&_GuiController , SIGNAL(didExportLog()), this , SLOT( onExportLog())); @@ -237,6 +246,21 @@ // coco end /*! + * \brief ApplicationController::onSDCardStateChange + * \details This is the slot which connects to the _DriveWatcher didSDCardStateChange signal + * and notifies the other classes (GuiController) by emitting its signal didSDCardStateChange + * \param vIsReady - SdCard is Ready + * \param vIsReadOnly - SdCard is ReadOnly + */ +void ApplicationController::onSDCardStateChange(bool vIsReady, bool vIsReadOnly) +{ + // coco begin validated: This needs user interaction to plug-in SD Card + // has been tested manually + emit didSDCardStateChange(vIsReady, vIsReadOnly); +} +// coco end + +/*! * \brief ApplicationController::onExportLog * \details the slot which will be called by UI to so the log export. */