-
Notifications
You must be signed in to change notification settings - Fork 1
/
widget.h
56 lines (45 loc) · 1.14 KB
/
widget.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
#ifndef WIDGET_H
#define WIDGET_H
#include "filehashthread.h"
#include <QWidget>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
// 构造函数
Widget();
// 析构函数
~Widget();
// 拖拽事件
void dragEnterEvent(QDragEnterEvent* event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent* event) Q_DECL_OVERRIDE;
// 关闭事件
void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
// 开始校验
void startHash(QStringList fileList);
private slots:
// 重置进度条
void resetProgressBar(int count);
// 添加信息
void addMessage(QString message);
// 当前进度改变
void currentChange(int progress);
// 总进度改变
void totalChange(int index);
// 重置打开按钮
void resetOpen();
// 自动槽函数
void on_openButton_clicked();
void on_clearButton_clicked();
void on_saveButton_clicked();
void on_copyButton_clicked();
void on_stopButton_clicked();
private:
Ui::Widget *ui;
// 哈希校验线程
FileHashThread* fileHashThread;
};
#endif // WIDGET_H