Index: sources/maintimer.h =================================================================== diff -u -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d -re1605219ac2baf49ef21d0889f845ac53d59c3c1 --- sources/maintimer.h (.../maintimer.h) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) +++ sources/maintimer.h (.../maintimer.h) (revision e1605219ac2baf49ef21d0889f845ac53d59c3c1) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2019 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 @@ -22,9 +22,6 @@ // Define #define _MainTimer MainTimer::I() -// Forward declaration -class QTimer; - /*! * \brief The MainTimer class * \details This class is going to be used for subjects which want to keep track of time to a second resolution. @@ -33,17 +30,19 @@ { Q_OBJECT - static const int _timeout = 1000; //ms - QTimer *_timer = nullptr; + static const int _interval = 1000; //ms -SINGLETON_DECL(MainTimer) +// Singleton +SINGLETON(MainTimer) public: - void init(); + bool init(); void quit(); +private: + signals: - void timeout(); + void didTimeout(); -private slots: - void onTimeout(); +protected: + void timerEvent(QTimerEvent *) override; };