#ifndef STIMER #define STIMER #include #include #include #include class QTimer; class STimer:public QObject { Q_OBJECT private: std::unique_ptr m_pTimer; QSet m_setTime; int m_nPreviousHour; public: explicit STimer(); explicit STimer(int time); STimer(QVector times); STimer(const STimer& other) = delete; STimer& operator=(const STimer& other) = delete; void start(); void stop(); bool isActive() const; void set(int time); void set(QVector times); void unset(int time); void unset(QVector times); int timerId() const; ~STimer(); private: void init(); signals: void timeout(); private slots: void checkTimeout(); }; #endif // STIMER