/*! * * 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 * 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() // 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; SINGLETON_DECL(MainTimer) public: void init(); void quit(); signals: void didTimeout(); private slots: void onTimeout(); };