You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
409 B
C++
24 lines
409 B
C++
#ifndef _WORKCHECKER_H_
|
|
#define _WORKCHECKER_H_
|
|
#include <QObject>
|
|
class WorkChecker : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
WorkChecker();
|
|
~WorkChecker();
|
|
void registerWorking();
|
|
bool isWorking() const ;
|
|
|
|
void start();
|
|
void stop();
|
|
public slots:
|
|
void onChecker();
|
|
private:
|
|
class QTimer *m_pTimer{ nullptr };
|
|
int m_nCheckInterval{ 300 };
|
|
bool m_bWorking{ true };
|
|
long long m_lLastTime{ 0 };
|
|
};
|
|
#endif
|