-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
73 lines (59 loc) · 1.53 KB
/
Copy pathmainwindow.h
File metadata and controls
73 lines (59 loc) · 1.53 KB
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 <QMainWindow>
#include <QStatusBar>
#include <QReadWriteLock>
#include <QTimer>
#include <QFutureWatcher>
namespace ShowListing{
class DirFileTree;
class AdcListReader;
}
QT_BEGIN_NAMESPACE
class QProgressDialog;
class QTreeWidgetItem;
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QApplication &application, QWidget *parent = 0);
void openPath(const QString& fileName);
public slots:
void open();
void onExport();
void about();
private slots:
void slotFutureWatchNotify();
void slotBroadcastProgressReceived(qint64 pos);
void slotOpenPathCancelled();
void slotTimer();
protected:
virtual void closeEvent(QCloseEvent *);
virtual void dragEnterEvent(QDragEnterEvent* event);
virtual void dragMoveEvent(QDragMoveEvent* event);
virtual void dragLeaveEvent(QDragLeaveEvent* event);
virtual void dropEvent(QDropEvent* event);
private:
void createActions();
void createMenus();
ShowListing::DirFileTree *dirFileTree;
QApplication *app;
QMenu *fileMenu;
QMenu *helpMenu;
QAction *openAct;
QAction *exportAct;
QAction *exitAct;
QAction *aboutAct;
QString lastOpenPath;
QString lastOpenFilePath;
QTimer timer;
QProgressDialog *progress;
QReadWriteLock lock_progressValue;
qint64 progressValue;
ShowListing::AdcListReader *listReader;
QIODevice *source;
QTreeWidgetItem *insertedRow;
QFutureWatcher<void> *watcher;
};
#endif