Index: sources/maintimer.h =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d --- sources/maintimer.h (.../maintimer.h) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/maintimer.h (.../maintimer.h) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) @@ -17,21 +17,29 @@ #include // Project +#include "main.h" +// 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. + */ class MainTimer : public QObject { Q_OBJECT static const int _timeout = 1000; //ms - QTimer *_timer = nullptr; - static MainTimer *_instance; - explicit MainTimer(QObject *parent = nullptr); +SINGLETON_DECL(MainTimer) public: - static MainTimer *I(); void init(); + void quit(); signals: void timeout();