srunninglistwidget 추가 git-svn-id: svn://192.168.0.12/source@298 8346c931-da38-4b9b-9d4c-e48b93cbd075
49 lines
817 B
C++
49 lines
817 B
C++
#ifndef STIMER
|
|
#define STIMER
|
|
|
|
#include <QObject>
|
|
#include <memory>
|
|
#include <QSet>
|
|
#include <QVector>
|
|
|
|
class QTimer;
|
|
|
|
class STimer:public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
std::unique_ptr<QTimer> m_pTimer;
|
|
QSet<int> m_setTime;
|
|
int m_nPreviousHour;
|
|
|
|
public:
|
|
explicit STimer();
|
|
explicit STimer(int time);
|
|
STimer(QVector<int> 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<int> times);
|
|
void unset(int time);
|
|
void unset(QVector<int> times);
|
|
int timerId() const;
|
|
|
|
~STimer();
|
|
|
|
|
|
signals:
|
|
void timeout();
|
|
|
|
private slots:
|
|
void checkTimeout();
|
|
};
|
|
|
|
|
|
|
|
#endif // STIMER
|
|
|