-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
73 lines (60 loc) · 1.62 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "settings.h"
#include <QLabel>
#include <QMainWindow>
#include <QThread>
#include <QToolButton>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
QThread workerThread;
qint64 totalSize = 0;
QToolButton *saveButton;
QToolButton *calcButton;
QLabel *statusLabel;
int filesCount = 0;
int completedCount = 0;
QList<QString> filesList;
QString lastPath;
bool started = false;
bool interrupt = false;
QIcon startStopIcon[2];
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
Ui::MainWindow *ui;
void ToggleToolbar();
void Save(bool saveAs = false);
QString GetCommonRoot();
QString GetFileExt();
void StartHash(bool, qint64 &);
private slots:
void on_actionAdd_Files_triggered();
void on_chkFullPath_stateChanged(int arg1);
void saveButton_clicked();
void calcButton_clicked();
void saveAsAction_triggered();
void restartAction_triggered();
void showHash(int, const QByteArray&);
void showError(const QString&, int);
void updateSize(qint64, int);
void finished();
void handleNext(int);
void on_actionAdd_Folder_triggered();
void on_actionRemove_triggered();
void on_actionClear_triggered();
void on_actionSettings_triggered();
void calcAct_triggered();
void on_btnAbout_clicked();
void showMenu(const QPoint &);
protected:
void closeEvent(QCloseEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
};
#endif // MAINWINDOW_H