digiKam
fctask.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2019-03-27
7  * Description : file copy actions using threads.
8  *
9  * Copyright (C) 2012 by Smit Mehta <smit dot meh at gmail dot com>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2019-2020 by Maik Qualmann <metzpinguin at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_FC_TASK_H
26 #define DIGIKAM_FC_TASK_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 
32 // Local includes
33 
34 #include "actionthreadbase.h"
35 #include "fccontainer.h"
36 
37 using namespace Digikam;
38 
40 {
41 
42 class FCTask : public ActionJob
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit FCTask(const QUrl& srcUrl,
49  const FCContainer& settings);
50  ~FCTask() override;
51 
52 Q_SIGNALS:
53 
54  void signalUrlProcessed(const QUrl& from, const QUrl& to);
55 
56 protected:
57 
58  void run() override;
59 
60 private:
61 
62  // Disable
63  explicit FCTask(QObject*) = delete;
64 
65 private:
66 
67  bool imageResize(const QString& orgPath, const QString& destPath);
68  void deleteTargetFile(const QString& filePath);
69 
70 private:
71 
72  class Private;
73  Private* const d;
74 };
75 
76 } // namespace DigikamGenericFileCopyPlugin
77 
78 #endif // DIGIKAM_FC_TASK
Definition: fccontainer.h:41
void signalUrlProcessed(const QUrl &from, const QUrl &to)
Definition: actionthreadbase.h:45
Definition: fccontainer.h:38
Definition: datefolderview.cpp:43