Index: sources/gui/GuiController.cpp =================================================================== diff -u -r4a67c01045f365be38f1a12a8572c0070d343e1e -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 4a67c01045f365be38f1a12a8572c0070d343e1e) +++ 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) 22-Sep-2021 + * \date (last) 10-Feb-2023 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -80,21 +80,31 @@ this , SLOT( onUSBDriveMount ())); connect(&_ApplicationController, SIGNAL(didUSBDriveRemove()), this , SLOT( onUSBDriveRemove())); + connect(&_ApplicationController, SIGNAL(didUSBSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onUSBSpaceChange(bool, qint64, qint64, quint8))); // SD card connect(&_ApplicationController, SIGNAL(didSDCardStateChange(bool,bool)), this , SLOT( onSDCardStateChange(bool,bool))); + connect(&_ApplicationController, SIGNAL(didSDCardSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onSDCardSpaceChange(bool, qint64, qint64, quint8))); connect(&_ApplicationController, SIGNAL(didSDCardSpaceTooLow(quint8)), this , SLOT( onSDCardSpaceTooLow(quint8))); // 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 @@ -263,12 +273,15 @@ */ void GuiController::onUSBDriveRemove() { - // disabled coco begin validated: This needs user interaction to plug-out the USB device - // has been tested manually emit didUSBDriveRemove(); } -// disabled coco end +void GuiController::onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) +{ + //DEBUG:0: qDebug() << "GuiController::onUSBSpaceChange" << vReady << vTotal << vAvailable << vPercent; + emit didUSBSpaceChange(vReady, vTotal, vAvailable, vPercent); +} + /*! * \brief GuiController::onSDCardStateChange * \details emits didSDCardStateChange signal to notify other classes (GuiView) @@ -278,14 +291,16 @@ */ void GuiController::onSDCardStateChange(bool vIsReady, bool vIsReadOnly) { - // disabled coco begin validated: This needs user interaction to plug-out the SD Card - // has been tested manually - /// DEBUG: qDebug() << " ***** GuiController " << Storage::SDCard_Base_Path_Name << vIsReady; + //DEBUG:0: qDebug() << " ***** GuiController " << Storage::SDCard_Base_Path_Name << vIsReady << vIsReadOnly << gDisableSDCFailLogStop; emit didSDCardStateChange(vIsReady, vIsReadOnly); } -// disabled coco end +void GuiController::onSDCardSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) +{ + emit didSDCardSpaceChange(vReady, vTotal, vAvailable, vPercent); +} + /*! * \brief GuiController::onSDCardSpaceTooLow * \details The handler slot for the didSDCardSpaceTooLow signal comes form ApplicationController. @@ -306,26 +321,46 @@ */ void GuiController::onExport() { - // disabled coco begin validated: This needs user interaction to export to USB device - // has been tested manually emit didExport(); } -// disabled coco end +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) * , the User requested to export the log. */ -void GuiController::doExportLog() +void GuiController::doExportLog(const GuiStringIndexMap &vExportList) { - // disabled coco begin validated: This needs user interaction to export to USB device - // has been tested manually - emit didExportLog(); + emit didExportLog(vExportList); } -// disabled coco end /*! + * \brief GuiController::doExportService + * \details emits didExportService signal to notify other classes (ApplicationController) + * , the User requested to export the log. + */ +void GuiController::doExportService(const GuiStringIndexMap &vExportList) +{ + emit didExportService(vExportList); +} + +/*! + * \brief GuiController::doExportTreatment + * \details emits didExportTreatment signal to notify other classes (ApplicationController) + * , the User requested to export the log. + */ +void GuiController::doExportTreatment(const GuiStringIndexMap &vExportList) +{ + emit didExportTreatment(vExportList); +} + +/*! * \brief GuiController::didFailedTransmit * \details Raises an HD communication timeout alarm if communication with HD is lost. * \param seq - Sequence that failed to transmit @@ -336,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(); +}