Index: sources/gui/GuiView.h =================================================================== diff -u -r8b044d8ef7db6f72c65aa6109d5f29a79bca92a2 -r5687815256ae070a9a207107088e3f72dd464da0 --- sources/gui/GuiView.h (.../GuiView.h) (revision 8b044d8ef7db6f72c65aa6109d5f29a79bca92a2) +++ sources/gui/GuiView.h (.../GuiView.h) (revision 5687815256ae070a9a207107088e3f72dd464da0) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 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 GuiView.h * \author (last) Behrouz NematiPour - * \date (last) 28-Sep-2022 + * \date (last) 10-Jul-2024 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -16,6 +16,7 @@ // Qt #include +#include // Project #include "main.h" @@ -43,6 +44,9 @@ // disabled coco begin validated: This needs user interaction to plug-in/out SD Card // has been tested manually + + PROPERTY(QString, platform , QGuiApplication::platformName()) + PROPERTY(bool , sdIsReady , false ) PROPERTY(bool , sdIsReadOnly , false ) @@ -71,8 +75,32 @@ PROPERTY(bool , exportRunning , false ) PROPERTY(quint32, exportCount , 0 ) - QMap _exportList; + PROPERTY(quint32, exportIndex , 0 ) + PROPERTY(QString, exportFile , "" ) + PROPERTY(quint64, exportPercent , 0 ) + PROPERTY(QString, qrImageSource , "" ) + + PROPERTY(GuiStringIndexMap , exportList , {}) + READONLY(GuiUint08IndexMap , exportListPercent , {}) + + READONLY(bool , dryDemoMode , gEnableDryDemo ) + READONLY(bool , manufactSetup , gEnableManufacturing ) + READONLY(bool , updateSetup , gEnableUpdating ) + READONLY(bool , manufactMode , false ) + READONLY(bool , updateMode , false ) + + TRIGGER (bool , postPass , false ) + + READONLY(bool , useLogLongName, gLogLongName ) + READONLY(bool , useLogUpload , gLogUpload ) + READONLY(bool , useLogCompress, gLogCompress ) + +#ifdef BUILD_FOR_DESKTOP + READONLY(bool , runOnDevice , false ) +#else + READONLY(bool , runOnDevice , true ) +#endif public: explicit GuiView(QObject *parent = nullptr); @@ -87,11 +115,13 @@ void onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent); void onExport (); + void onExportStat (quint32 vIndex, const QString &vFileName, quint8 vPercent); void onSDCardStateChange(bool vIsReady, bool vIsReadOnly); void onSDCardSpaceTooLow(quint8 vAvailablePercent); void onSDCardSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent); + void onPOSTPass (bool vPassed); public slots: // is public since will be used in the UI and is in the same thread. void doActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG @@ -102,11 +132,18 @@ void doExportService (); void doExportTreatment (); - void doExportListInsert (quint32 vIndex, const QString &vFilename ) { /* DEBUG: qDebug() << vIndex; */ _exportList [vIndex] = vFilename; exportCount( _exportList.count() ); } - void doExportListDelete (quint32 vIndex ) { /* DEBUG: qDebug() << vIndex; */ _exportList.remove (vIndex) ; exportCount( _exportList.count() ); } - bool doExportListSelect (quint32 vIndex ) { /* DEBUG: qDebug() << vIndex; */ return _exportList.contains(vIndex) ; } - void doExportListRemove ( ) { _exportList.clear ( ) ; exportCount( _exportList.count() ); } + void doExportListInsert (quint32 vIndex, const QString &vFilename ); + void doExportListDelete (quint32 vIndex ); + bool doExportListSelect (quint32 vIndex ); + void doExportListRemove ( ); + quint8 doExportListPercent(quint32 vIndex ); + bool isPathSymLink (const QString vFilePath ); + + void doQuitApplication(); + + void doGenerateQRImage (const QString &vText ); + signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG @@ -120,5 +157,8 @@ void didExportService (const GuiStringIndexMap &vExportList); void didExportTreatment (const GuiStringIndexMap &vExportList); void didExport (); + void didExportStat (quint32 vIndex, const QString &vFileName, quint8 vPercent); + + void didQuitApplication (); }; }