Sayonara Player
Loading...
Searching...
No Matches
src
Components
Directories
FileOperationWorkerThread.h
1
/* FileOperationWorkerThread.h
2
*
3
* Copyright (C) 2011-2024 Michael Lugmair
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef FLIEOPERATIONWORKERTHREAD_H
22
#define FLIEOPERATIONWORKERTHREAD_H
23
24
#include <QThread>
25
#include "Utils/Pimpl.h"
26
27
namespace
Library
28
{
29
class
InfoAccessor
;
30
}
31
32
class
FileOperationThread :
33
public
QThread
34
{
35
Q_OBJECT
36
PIMPL(FileOperationThread)
37
38
signals:
39
void
sigStarted();
40
void
sigFinished();
41
42
public
:
43
virtual
~FileOperationThread();
44
45
QList<LibraryId>
sourceIds()
const
;
46
QList<LibraryId>
targetIds()
const
;
47
48
protected
:
49
FileOperationThread(
Library::InfoAccessor
* libraryInfoAccessor,
const
QStringList& sourceFiles,
50
const
QStringList& targetFiles, QObject* parent);
51
Library::InfoAccessor
* libraryInfoAccessor();
52
};
53
54
class
FileMoveThread :
55
public
FileOperationThread
56
{
57
Q_OBJECT
58
PIMPL(FileMoveThread)
59
60
public
:
61
FileMoveThread(
Library::InfoAccessor
* libraryInfoAccessor,
const
QStringList& sourceFiles,
62
const
QString& targetDir, QObject* parent);
63
~FileMoveThread()
override
;
64
65
protected
:
66
void
run()
override
;
67
};
68
69
class
FileCopyThread :
70
public
FileOperationThread
71
{
72
Q_OBJECT
73
PIMPL(FileCopyThread)
74
75
public
:
76
FileCopyThread(
Library::InfoAccessor
* libraryInfoAccessor,
const
QStringList& sourceFiles,
77
const
QString& targetDir, QObject* parent);
78
~FileCopyThread()
override
;
79
80
protected
:
81
void
run()
override
;
82
};
83
84
class
FileRenameThread :
85
public
FileOperationThread
86
{
87
Q_OBJECT
88
PIMPL(FileRenameThread)
89
90
public
:
91
FileRenameThread(
Library::InfoAccessor
* libraryInfoAccessor,
const
QString& sourceFile,
92
const
QString& targetFile,
93
QObject* parent);
94
~FileRenameThread()
override
;
95
96
protected
:
97
void
run()
override
;
98
};
99
100
class
FileDeleteThread :
101
public
FileOperationThread
102
{
103
Q_OBJECT
104
PIMPL(FileDeleteThread)
105
106
public
:
107
FileDeleteThread(
Library::InfoAccessor
* libraryInfoAccessor,
const
QStringList& sourcePaths, QObject* parent);
108
~FileDeleteThread()
override
;
109
110
protected
:
111
void
run()
override
;
112
};
113
114
#endif
// FLIEOPERATIONWORKERTHREAD_H
Library::InfoAccessor
Definition
LibraryManager.h:36
QList
Definition
EngineUtils.h:33
Generated on
for Sayonara Player by
1.14.0