-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrecordthread.cpp
More file actions
40 lines (32 loc) · 842 Bytes
/
recordthread.cpp
File metadata and controls
40 lines (32 loc) · 842 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "recordthread.h"
RecordThread::RecordThread() {
this->state = true;
}
void RecordThread::run() {
alt = false;
prevManhattan = 0;
clicks.clear();
while(state) {
if (GetAsyncKeyState(VK_RBUTTON) & 0x8000) {
if(GetAsyncKeyState(VK_MENU) & 0x8000) {
alt = true;
} else {
alt = false;
}
point = QCursor::pos();
if(prevManhattan != point.manhattanLength()) {
clicks.append(new Click(point.x(), point.y(), alt));
Sleep(50);
}
prevManhattan = point.manhattanLength();
}
Sleep(50);
}
emit updateSettings(clicks);
this->state = true;
}
void RecordThread::stopRecord() {
this->state = false;
}
RecordThread::~RecordThread() {
}