forked from mastermune/InputRedirectionClient-Qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtouchscreen.h
47 lines (36 loc) · 976 Bytes
/
touchscreen.h
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
41
42
43
44
45
46
47
#include "global.h"
#include "gpmanager.h"
#include "tsshortcut.h"
#include <QPainter>
#ifndef TOUCHSCREEN_H
#define TOUCHSCREEN_H
#include "tsshortcut.h"
struct TouchScreen : public QWidget {
Q_OBJECT
public slots:
void ShowContextMenu(const QPoint& pos);
private:
QLabel *bgLabel;
public:
TouchScreen(QWidget *parent = nullptr);
TsShortcut tsShortcutGui;
bool ellipNeedDraw;
void resizeEvent(QResizeEvent* e);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
void mouseReleaseEvent(QMouseEvent *ev);
void closeEvent(QCloseEvent *ev);
QPoint getTouchScreenPosition();
QSize getTouchScreenSize();
bool isTouchScreenPressed();
void setTouchScreenPressed(bool b);
void updatePixmap(void);
void clearImage(void);
void paintEvent(QPaintEvent* e);
~TouchScreen(void)
{
qDebug() << "DECON";
tsShortcutGui.close();
}
};
#endif // TOUCHSCREEN_H