-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathacrylic.h
76 lines (59 loc) · 1.88 KB
/
acrylic.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef ACRYLIC_H
#define ACRYLIC_H
#include <QDialog>
#include <QKeyEvent>
#include "WindowCompositionAttribute.h"
#include "additiontabwidget.h"
#include "ConvertFunc.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Acrylic; }
QT_END_NAMESPACE
class Acrylic : public QDialog
{
Q_OBJECT
public:
Acrylic(QWidget *parent = nullptr);
~Acrylic();
private:
void paintEvent(QPaintEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void leaveEvent(QEvent *event){this->setCursor(Qt::ArrowCursor); pressed = false; mouseState = 0;}
void keyPressEvent(QKeyEvent* event);
//void keyReleaseEvent(QKeyEvent* event);
private:
//Variables of Acrylic | aero window
/****************************************************************************/
HWND hwnd;
HMODULE huser;
pfnSetWindowCompositionAttribute setWindowCompositionAttribute;
AdditionTabWidget* tabPage;
Ui::Acrylic *ui;
QPoint mousePos_strt;
QColor acryBackground;
int acryOpacity;
int _width;
int _height;
bool isMaximum = false;
int lastWidth;
int lastHeight;
bool pressed = false;
bool tabShown = false;
int mouseState = 0; //0 for move, 1 for width, 2 for height, 3 for width and height
/****************************************************************************/
//Variables and functions for the calculator
/****************************************************************************/
Expression expr;
void RfrInput();
void RfrResult();
void UpdStack(bool r = false);
void UpdHistory();
signals:
void addHistoryTerm(const QString &, const QString &, const QString &);
void updateStackPage(const QString &, const QString &);
private slots:
void windowMaximum();
//void windowMinimum();
};
#endif // ACRYLIC_H