-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmainwindow.h
49 lines (36 loc) · 1.13 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include <QtCore/QMutex>
#include "copythread.h"
class CopyThread;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
typedef QMainWindow super;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
static void log(const QString &);
public slots:
inline void generateDownloadList() { startOperation(CopyThread::GetLinkList); }
void showList(const QStringList &remoteLinks, const QStringList &localFiles);
void showListIfAny(const QStringList &remoteLinks, const QStringList &localFiles);
private slots:
void on_browseButton_clicked();
inline void on_copyButton_clicked() { startOperation(CopyThread::CopyLibraries); }
void on_selectTargetButton_clicked();
void postCopyOperation();
private:
bool ensureSource(QDir *);
CopyThread *ensureThread(CopyThread::OperationType ot);
void startOperation(CopyThread::OperationType ot, bool silent = false);
private:
Ui::MainWindow *ui;
static QBasicMutex mutex;
static MainWindow *instance;
};
#endif // MAINWINDOW_H