-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperationdialog.h
70 lines (55 loc) · 1.44 KB
/
operationdialog.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
#ifndef OPERATIONDIALOG_H
#define OPERATIONDIALOG_H
#include "verifierwindow.h"
#include "operationworker.h"
#include "enum.h"
#include <QDialog>
#include <QProgressBar>
#include <QTreeWidget>
namespace Ui {
class OperationDialog;
}
class OperationDialog : public QDialog
{
Q_OBJECT
public:
explicit OperationDialog(QWidget *parent = nullptr);
~OperationDialog();
QString destPath;
int target;
int op;
QList<QTreeWidgetItem*> *okFiles;
QList<QTreeWidgetItem*> *badFiles;
QList<QTreeWidgetItem*> selectedFiles;
private:
Ui::OperationDialog *ui;
bool firstTime = true;
QThread workerThread;
void op_start(QList<QTreeWidgetItem*>, QString, enum Op);
bool dontAsk = false;
bool overwrite = false;
bool canceled = false;
int totalCount;
int successCount = 0;
int errorCount = 0;
int skippedCount = 0;
// QWidget interface
protected:
void showEvent(QShowEvent *event) override;
private slots:
void on_radioCopy_clicked();
void on_radioMove_clicked();
void on_radioDelete_clicked();
void on_btnBrowse_clicked();
void on_btnStart_clicked();
void handleProgress(QString);
void handleResult(QString, int);
void workerFinished();
void askMsg(QTreeWidgetItem *item);
void addItem(QTreeWidgetItem*);
void on_btnCancel_clicked();
signals:
void startCopy(QString, QString);
void startMove(QString, QString);
};
#endif // OPERATIONDIALOG_H