Index: sources/gui/GuiView.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r86e9dfbff50cb7e16fd94c16c1c818cef3b47eac --- sources/gui/GuiView.cpp (.../GuiView.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/gui/GuiView.cpp (.../GuiView.cpp) (revision 86e9dfbff50cb7e16fd94c16c1c818cef3b47eac) @@ -58,6 +58,10 @@ connect(&_GuiController, SIGNAL(didUSBDriveRemove()), this , SLOT( onUSBDriveRemove())); + // USB Drive + connect(&_DeviceController, SIGNAL( didUSBSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onUSBSpaceChange(bool, qint64, qint64, quint8))); + // SD Card connect(&_GuiController, SIGNAL(didSDCardStateChange(bool,bool)), this , SLOT( onSDCardStateChange(bool,bool))); @@ -132,8 +136,8 @@ { // disabled coco begin validated: This needs user interaction to plug-in USB device // has been tested manually - usbReady (true ); - usbRemoved (false); + usbIsReady (true ); + usbIsRemoved(false); emit didUSBDriveMount (); } // disabled coco end @@ -147,8 +151,8 @@ { // disabled coco begin validated: This needs user interaction to plug-in USB device // has been tested manually - usbReady (false); - usbRemoved (false); + usbIsReady (false); + usbIsRemoved(false); emit didUSBDriveUmount(); } // disabled coco end @@ -162,8 +166,8 @@ { // disabled coco begin validated: This needs user interaction to plug-in USB device // has been tested manually - usbReady (false); - usbRemoved (true ); + usbIsReady (false); + usbIsRemoved(true ); emit didUSBDriveRemove(); } // disabled coco end @@ -205,24 +209,21 @@ */ void GuiView::onExport() { - // disabled coco begin validated: This needs user interaction to plug-in USB device - // has been tested manually emit didExport(); + exportRunning(false); } -// disabled coco end + /*! * \brief GuiView::doExportLog * \details emits didExportLog signal to notify other classes (GuiController) * , the User requested to export the log. */ void GuiView::doExportLog() { - // disabled coco begin validated: This needs user interaction to plug-in USB device - // has been tested manually + exportRunning(true); emit didExportLog(); } -// disabled coco end /*! * \brief GuiView::onSDCardSpaceChange @@ -247,3 +248,15 @@ sdIsLow ( vPercent <= Storage::Available_Space_Percent ); } // disabled coco end + +void GuiView::onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) +{ + // has been tested manually + /// DEBUG: qDebug() << vReady << vTotal << vAvailable << vPercent << Storage::Available_Space_Percent; + usbTotal ( vTotal ); + usbAvail ( vAvailable ); + usbPercent ( vPercent ); + usbIsReady ( vReady ); + // TODO : the space check should also be done for the USB as destination but needs calculation has will be done later. + // usbIsLow ( vPercent <= Storage::Available_Space_Percent ); +}