Index: sources/maintimer.h =================================================================== diff -u -rfee7fabf49befb065c89248c19e15efc9ca194e4 -rfeb3423b373dc2a2c4267ef9fcb4d924d738423d --- sources/maintimer.h (.../maintimer.h) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) +++ sources/maintimer.h (.../maintimer.h) (revision feb3423b373dc2a2c4267ef9fcb4d924d738423d) @@ -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 SINGLETON_DECL(MainTimer) public: - void init(); + bool init(); void quit(); +private: + signals: void didTimeout(); -private slots: - void onTimeout(); +protected: + void timerEvent(QTimerEvent *) override; };