Index: sources/ApplicationController.h =================================================================== diff -u -ra3030123e885fb9f22dea5839c4e988896a257e4 -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 --- sources/ApplicationController.h (.../ApplicationController.h) (revision a3030123e885fb9f22dea5839c4e988896a257e4) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) @@ -5,11 +5,11 @@ * 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 ApplicationController.h - * \author (last) Peter Lucia - * \date (last) 15-Oct-2020 - * \author (original) Behrouz NematiPour - * \date (original) 26-Aug-2020 + * \file ApplicationController.h + * \author (last) Behrouz NematiPour + * \date (last) 29-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 29-Mar-2021 * */ #pragma once @@ -56,6 +56,11 @@ QThread *_thread = nullptr; bool _init = false; + QFutureWatcher _settingsWatcher; + +public: + void initSettings(); + public slots: bool init(); bool init(QThread &vThread); @@ -74,6 +79,8 @@ void createFakeSequencedLongMessage (QVariantList &vData, const int vFakeDataLen); void createFakeSeqAtBeginLongMessage(QVariantList &vData, const int vFakeDataLen); + void settingsInit(); + private slots: // Should be private for thread safety and is connected internally. void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG void onActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG @@ -92,6 +99,8 @@ void onFailedTransmit(Sequence seq); + void onSettingsInit(); + signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG @@ -106,6 +115,20 @@ void didExport (); + /*! + * \brief didSettingsUpdate + * \details when the Settings reads the .conf files and fills the MSettings emits this signal + * this signal can be used buy the other object that need to access the MSettings to let them know data is ready. + */ + void didSettingsUpdate(); + /*! + * \brief didSettingsInit - private signal to start initializing settings + * \details This signal used internally to make the read task of the settings happen in Application_Thread + * It's because no thread assigned to Settings itself, since this class will be used only once + * and doesn't need a thread by itself + */ + void didSettingsInit (QPrivateSignal); + // ---- Signal/Slots ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS