-
Notifications
You must be signed in to change notification settings - Fork 12
/
toolboxwindow.h
55 lines (47 loc) · 1.54 KB
/
toolboxwindow.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
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2020-2024 XMuli
// SPDX-GitHub: https://github.com/XMuli/shotx
// SPDX-Author: XMuli <[email protected]>
#ifndef TOOLBOXWINDOW_H
#define TOOLBOXWINDOW_H
#include <QFrame>
#include <QVector>
class QStringList;
class QToolButton;
class ScreenShots;
class ToolBoxWindow : public QFrame
{
Q_OBJECT
public:
ToolBoxWindow();
void init();
protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void paintEvent(QPaintEvent *event) override;
private:
void updateToolBtnIcon();
public slots:
void onDownload();
void onCopy();
private:
QPoint m_topLeftPos;
QPoint m_staPos;
QPoint m_endPos;
QStringList m_listName;
ToolBoxWindow *m_toolBox;
QVector<QToolButton *> var;
// QToolButton *m_toolBtnRect; // 矩形
// QToolButton *m_toolBtnEllipse; // 椭圆
// QToolButton *m_toolBtnLine; // 线
// QToolButton *m_toolBtnArrow; // 箭头
// QToolButton *m_toolBtnPen; // 笔
// QToolButton *m_toolBtnText; // 文字
// QToolButton *m_toolBtnMosaic; // 马赛克
// QToolButton *m_toolBtnRevoke; // 撤销
// QToolButton *m_toolBtnUpload; // 上传图床
// QToolButton *m_toolBtnDownload; // 保存本地
// QToolButton *m_toolBtnCopy; // 完成,图片暂存在剪切板
};
#endif // TOOLBOXWINDOW_H