-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
54 lines (40 loc) · 1.18 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTreeWidgetItem>
#include "d_scanner.h"
#include <memory>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_action_scan_triggered();
void add_duplicates(QVector<QVector<QString>> duplicates, size_t counter, bool last);
void on_treeWidget_customContextMenuRequested(QPoint const& pos);
void open_file();
void open_file_in_folder();
void delete_file();
void message_handler(QString text);
void try_exit_scanning();
void show_info();
void set_progress_bar(size_t max);
private:
std::unique_ptr<Ui::MainWindow> ui;
std::unique_ptr<d_scanner> scanner;
QString current_dir = QString();
size_t duplicate_groups_cnt = 0;
bool scanning = false;
void init_connections();
int exec_message_box(QString const& message);
void kill_scanner();
void prepare_window_for_scanning();
void closeEvent(QCloseEvent* event);
//void create_treeWidgetItems_actions(QTreeWidgetItem* item);
};
#endif // MAINWINDOW_H