Index: sources/gui/GuiController.cpp =================================================================== diff -u -r8b044d8ef7db6f72c65aa6109d5f29a79bca92a2 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 8b044d8ef7db6f72c65aa6109d5f29a79bca92a2) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file GuiController.cpp * \author (last) Behrouz NematiPour - * \date (last) 15-Aug-2022 + * \date (last) 10-Feb-2023 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -94,11 +94,17 @@ // Export connect(&_ApplicationController, SIGNAL(didExport()), this , SLOT( onExport())); + connect(&_ApplicationController, SIGNAL(didExportStat (quint32, const QString &, quint8)), + this , SLOT( onExportStat (quint32, const QString &, quint8))); // transmission fail connect(&_ApplicationController, SIGNAL(didFailedTransmit(Sequence)), this , SLOT( onFailedTransmit(Sequence))); + // POST result + connect(&_ApplicationController, SIGNAL(didPOSTPass(bool)), + this , SLOT( onPOSTPass(bool))); + // Device Signal/Slots DEVICE_GUI_INIT_CONNECTIONS_LIST @@ -286,19 +292,6 @@ void GuiController::onSDCardStateChange(bool vIsReady, bool vIsReadOnly) { //DEBUG:0: qDebug() << " ***** GuiController " << Storage::SDCard_Base_Path_Name << vIsReady << vIsReadOnly << gDisableSDCFailLogStop; - - static bool hasAlarm = false; // to clear the alarm, only once. - if ( ( ! vIsReady || vIsReadOnly ) && ! gDisableSDCFailLogStop ) { - hasAlarm = true; - AlarmStatusData data = AlarmGenerator::ALARM_ID_UI_POST_FAILURE_SDCARD(); - emit didActionReceive(data); - } - else if ( hasAlarm ) { - hasAlarm = false; - AlarmStatusData data = AlarmGenerator::ALARM_ID_NO_ALARM(); - emit didActionReceive(data); - } - emit didSDCardStateChange(vIsReady, vIsReadOnly); } @@ -331,6 +324,12 @@ emit didExport(); } +void GuiController::onExportStat(quint32 vIndex, const QString &vFileName, quint8 vPercent) +{ + //DEBUG: qDebug() << "2" << vIndex << vFileName << vPercent; + emit didExportStat(vIndex, vFileName, vPercent); +} + /*! * \brief GuiController::doExportLog * \details emits didExportLog signal to notify other classes (ApplicationController) @@ -372,3 +371,22 @@ AlarmStatusData data = AlarmGenerator::ALARM_ID_HD_COMM_TIMEOUT(); emit didActionReceive(data); } + +/*! + * \brief GuiController::onPOSTPass + * \details Passes on the Post status + * \param vPass - True if passed + */ +void GuiController::onPOSTPass(bool vPass) +{ + emit didPOSTPass(vPass); +} + +/*! + * \brief GuiController::doQuitApplication + * \details emit the didQuitApplication signal to ask ApplicationController to Quit the application gracefully. + */ +void GuiController::doQuitApplication() +{ + emit didQuitApplication(); +}