/*! * * Copyright (c) 2019-2020 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 * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n * * \file maintimer.h * \date 2019/09/30 * \author Behrouz NematiPour * */ #pragma once // Qt #include // Project #include "main.h" // Define #define _MainTimer MainTimer::I() /*! * \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 _interval = 1000; //ms // Singleton SINGLETON(MainTimer) public: bool init(); void quit(); private: bool isDateChanged(); signals: void didTimeout(); void didDateChange(); protected: void timerEvent(QTimerEvent *) override; };