Index: sources/gui/guiview.cpp =================================================================== diff -u -r296e0e140bfeb193a9f571873afa6934143b1075 -r56e378f7504701b9e9a9dccaf205aef2fd52c58e --- sources/gui/guiview.cpp (.../guiview.cpp) (revision 296e0e140bfeb193a9f571873afa6934143b1075) +++ sources/gui/guiview.cpp (.../guiview.cpp) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) @@ -1,14 +1,15 @@ /*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. - * \copyright \n - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n - * IN PART OR IN WHOLE, \n - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n + * \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 guiview.cpp - * \date 2019/09/30 - * \author Behrouz NematiPour + * \file guiview.cpp + * \author (last) Behrouz NematiPour + * \date (last) 25-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 24-Sep-2019 * */ #include "guiview.h" @@ -56,6 +57,10 @@ connect(&_GuiController, SIGNAL(didUSBDriveRemove()), this , SLOT( doUSBDriveRemove())); + // SD Card + connect(&_GuiController, SIGNAL(didSDCardStateChange(bool,bool)), + this , SLOT( doSDCardStateChange(bool,bool))); + connect(&_GuiController, SIGNAL(didExport()), this , SLOT( doExport())); @@ -74,7 +79,6 @@ void GuiView::onActionReceive (GuiActionType vAction, const QVariantList &vData) { // process the evaluation and notify GUI - // process ... emit didActionReceive (vAction, vData); } @@ -87,8 +91,12 @@ */ void GuiView::doActionTransmit(GuiActionType vAction, const QVariantList &vData) { + // TODO : Remove this code later when Investigated thoroughly. + // coco begin validated: This code later needs to be removed when Investigated thoroughly. + // has been tested manually emit didActionTransmit(vAction, vData); } +// coco end /*! * \brief GuiView::doActionTransmit @@ -101,20 +109,27 @@ void GuiView::doActionTransmit(GuiActionType vAction, const QVariant &vData) { + // TODO : Remove this code later when Investigated thoroughly. + // coco begin validated: This code later needs to be removed when Investigated thoroughly. + // has been tested manually QVariantList mData; mData += vData; emit didActionTransmit(vAction, mData); } +// coco end /*! * \brief GuiView::doUSBDriveMount - * \details emits didUSBDriveMount signal to notify other classes (GuiController) + * \details emits didUSBDriveMount signal to notify other classes (UI) * , the USB drive has been mounted. */ void GuiView::doUSBDriveMount () { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didUSBDriveMount (); } +// coco end /*! * \brief GuiView::doUSBDriveUmount @@ -123,28 +138,53 @@ */ void GuiView::doUSBDriveUmount() { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didUSBDriveUmount(); } +// coco end /*! * \brief GuiView::doUSBDriveRemove - * \details emits didUSBDriveRemove signal to notify other classes (GuiController) + * \details emits didUSBDriveRemove signal to notify other classes (UI) * , the USB drive has been removed. */ void GuiView::doUSBDriveRemove() { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didUSBDriveRemove(); } +// coco end /*! + * \brief GuiView::doSDCardStateChange + * \details emits didSDCardStateChange signal to notify other classes (UI) + * , the SD Card Stte has been changed. + * \param vIsReady - SdCard is Ready + * \param vIsReadOnly - SdCard is ReadOnly + */ +void GuiView::doSDCardStateChange(bool vIsReady, bool vIsReadOnly) +{ + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually + sdIsReady (vIsReady ); + sdIsReadOnly(vIsReadOnly); +} +// coco end + +/*! * \brief GuiView::onExport * \details The slot which will be called to notify the export is done * by emitting the didExport signal. */ void GuiView::doExport() { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didExport(); } +// coco end /*! * \brief GuiView::doExportLog @@ -153,41 +193,8 @@ */ void GuiView::doExportLog() { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didExportLog(); } - -/*! - * \brief GuiView::alarmPriorityName - * \details this code is the place holder for the alarms description mapping - * since it is another feature - * it returns the enum name for now - * \param vEnum - The Alarm priority - * \return String representation of the Alarm priority Enum name - */ -QString GuiView::alarmPriorityName(GuiAlarmPriority vEnum) -{ - // this code is the place holder for the alarms description mapping - // since it is another feature - // it returns the enum name for now - const QMetaObject *mo = qt_getEnumMetaObject(vEnum); - int enumIdx = mo->indexOfEnumerator(qt_getEnumName(vEnum)); - return mo->enumerator(enumIdx).valueToKey(vEnum); -} - -/*! - * \brief GuiView::alarmIDName - * \details this code is the place holder for the alarms description mapping - * since it is another feature - * it returns the enum name for now - * \param vEnum - The Alarm ID - * \return String representation of the Alarm Id Enum name - */ -QString GuiView::alarmIDName(GuiAlarmID vEnum) -{ - // TEST : this code is the place holder for the alarms description mapping - // since it is another feature - // it returns the enum name for now - const QMetaObject *mo = qt_getEnumMetaObject(vEnum); - int enumIdx = mo->indexOfEnumerator(qt_getEnumName(vEnum)); - return mo->enumerator(enumIdx).valueToKey(vEnum); -} +// coco end