summaryrefslogtreecommitdiffstats
blob: 444fb156f08ca713567a4c01b9c01c444d5c0eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "Swift/Controllers/IdleDetector.h"

#include <QObject>
#include <QPoint>
#include <QTimer>
#include <QDateTime>

namespace Swift {
class QtIdleDetector : public QObject, public IdleDetector {
	Q_OBJECT
	public:
		QtIdleDetector();
		virtual ~QtIdleDetector();
		virtual void forceNotIdle();
	private slots:
		void handleTimerTick();
	private:
		QPoint lastPosition_;
		QDateTime lastMoveTime_;
		QTimer timer_;
		bool signalled_;
};
}