-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfloatingwindow.h
More file actions
68 lines (57 loc) · 1.28 KB
/
Copy pathfloatingwindow.h
File metadata and controls
68 lines (57 loc) · 1.28 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef FLOATINGWINDOW_H
#define FLOATINGWINDOW_H
#include <QWidget>
#include <QMouseEvent>
#include <QColor>
#include <QPainter>
#include <QBitmap>
#include <string>
#include <algorithm>
#include "listenkeyboard.h"
#include <ctime>
#include <QFont>
#include <QFontMetrics>
#include <QTimer>
#include <QRect>
#define AnimationTime 201
using namespace std;
class QPropertyAnimation;
namespace Ui {
class FloatingWindow;
}
class FloatingWindow : public QWidget
{
Q_OBJECT
public:
explicit FloatingWindow(QWidget *parent = nullptr);
~FloatingWindow();
QColor bgc;
void setWdc(QColor wdc);
void update();
void updatekey();
void updatethread();
private:
Ui::FloatingWindow *ui;
QPoint pos;
void paintEvent(QPaintEvent *event);
QPropertyAnimation *animation;
QTimer *tim;
string nows,pres;
list<int> keys;
ListenKeyboard lk;
bool insc(int v);
bool inst(int v);
bool prestiky,pretext;
string vkvalue[600];
void vkinit();
clock_t LastUpdateTime;
protected:
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private slots:
void showEvent(QShowEvent *event);
void closeEvent(QCloseEvent *event);
void caslot();
void Ontimeover();
};
#endif // FLOATINGWINDOW_H