Index: sources/gui/GuiController.h =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -rc503f43840024e18650c1ac558448dd0f3b70427 --- sources/gui/GuiController.h (.../GuiController.h) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ sources/gui/GuiController.h (.../GuiController.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) @@ -5,7 +5,7 @@ * 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.h + * \file GuiController.h * \author (last) Peter Lucia * \date (last) 25-Jun-2020 * \author (original) Behrouz NematiPour @@ -18,7 +18,7 @@ #include // Project -#include "main.h" +#include "main.h" // Doxygen : don't remove #include "GuiGlobals.h" #include "MModel.h" #include "MessageGlobals.h" @@ -31,16 +31,24 @@ // namespace namespace Gui { +/*! + * \brief The GuiController class + * \details Singleton class which is the main gateway of all signal/slots through GUI. + * This class is the Gui gate keeper for decisions and will decide if a message should pass through the other observers. + * Currently (08/30/2020) is a bridge and will pass all the messages. + * Later with implementation/help of the Gui state machine will decide on the state of the device what needs to be done. + * \note States are like [wait for user , user attention required , Time outs , ... ] + */ class GuiController : public QObject { Q_OBJECT + // singleton + SINGLETON(GuiController) + QThread *_thread = nullptr; bool _init = false; -// singleton -SINGLETON(GuiController); - public slots: bool init(); bool init(QThread &vThread); @@ -62,7 +70,6 @@ void doUSBDriveUmount(); // UI => OS void doExportLog (); // UI => OS - private slots: // Should be private for thread safety and is connected internally. void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG