Sayonara Player
FileOperationWorkerThread.h
1 #ifndef FLIEOPERATIONWORKERTHREAD_H
2 #define FLIEOPERATIONWORKERTHREAD_H
3 
4 #include <QThread>
5 #include "Utils/Pimpl.h"
6 
7 class FileOperationThread : public QThread
8 {
9  Q_OBJECT
10  PIMPL(FileOperationThread)
11 
12  signals:
13  void sigStarted();
14  void sigFinished();
15 
16  public:
17  virtual ~FileOperationThread();
18 
19  QList<LibraryId> sourceIds() const;
20  QList<LibraryId> targetIds() const;
21 
22  protected:
23  explicit FileOperationThread(QObject* parent);
24  FileOperationThread(const QStringList& sourceFiles, const QStringList& targetFiles, QObject* parent);
25 };
26 
28 {
29  Q_OBJECT
30  PIMPL(FileMoveThread)
31 
32  public:
33  FileMoveThread(const QStringList& sourceFiles, const QString& targetDir, QObject* parent);
34  ~FileMoveThread() override;
35 
36  protected:
37  void run() override;
38 };
39 
41 {
42  Q_OBJECT
43  PIMPL(FileCopyThread)
44 
45  public:
46  FileCopyThread(const QStringList& sourceFiles, const QString& targetDir, QObject* parent);
47  ~FileCopyThread() override;
48 
49  protected:
50  void run() override;
51 };
52 
53 
55 {
56  Q_OBJECT
57  PIMPL(FileRenameThread)
58 
59  public:
60  FileRenameThread(const QString& sourceFile, const QString& targetFile, QObject* parent);
61  ~FileRenameThread() override;
62 
63  protected:
64  void run() override;
65 };
66 
68 {
69  Q_OBJECT
70  PIMPL(FileDeleteThread)
71 
72  public:
73  FileDeleteThread(const QStringList& sourcePaths, QObject* parent);
74  ~FileDeleteThread() override;
75 
76  protected:
77  void run() override;
78 };
79 
80 #endif // FLIEOPERATIONWORKERTHREAD_H
FileMoveThread
Definition: FileOperationWorkerThread.h:27
QList
Definition: EngineUtils.h:33
FileOperationThread
Definition: FileOperationWorkerThread.h:7
FileCopyThread
Definition: FileOperationWorkerThread.h:40
FileDeleteThread
Definition: FileOperationWorkerThread.h:67
FileRenameThread
Definition: FileOperationWorkerThread.h:54