digiKam
task.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 : 2009-02-06
7  * Description : Thread actions task.
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2012 by Pankaj Kumar <me at panks dot me>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * 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_BQM_TASK_H
26 #define DIGIKAM_BQM_TASK_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 
32 // Local includes
33 
34 #include "actions.h"
35 #include "queuesettings.h"
36 #include "batchtoolutils.h"
37 #include "actionthreadbase.h"
38 
39 namespace Digikam
40 {
41 
42 class Task : public ActionJob
43 {
44  Q_OBJECT
45 
46 public:
47 
48  Task();
49  ~Task() override;
50 
51  void setSettings(const QueueSettings& settings);
52  void setItem(const AssignedBatchTools& tools);
53 
54 Q_SIGNALS:
55 
58 
59 public Q_SLOTS:
60 
61  void slotCancel();
62 
63 protected:
64 
65  void run() override;
66 
67 private:
68 
69  void removeTempFiles(const QList<QUrl>& tmpList);
70  void emitActionData(ActionData::ActionStatus st,
71  const QString& mess = QString(),
72  const QUrl& dest = QUrl(),
73  bool noWrite = false);
74 
75 private:
76 
77  // Disable
78  explicit Task(QObject*) = delete;
79 
80 private:
81 
82  class Private;
83  Private* const d;
84 };
85 
86 } // namespace Digikam
87 
88 #endif // DIGIKAM_BQM_TASK_H
Definition: actions.h:37
ActionStatus
Definition: actions.h:42
Definition: actionthreadbase.h:45
Definition: batchtoolutils.h:91
Definition: queuesettings.h:44
Definition: task.h:43
void setSettings(const QueueSettings &settings)
Definition: task.cpp:81
~Task() override
Definition: task.cpp:75
void slotCancel()
Definition: task.cpp:91
void run() override
Definition: task.cpp:132
void signalFinished(const Digikam::ActionData &ad)
Task()
Definition: task.cpp:69
void signalStarting(const Digikam::ActionData &ad)
void setItem(const AssignedBatchTools &tools)
Definition: task.cpp:86
Definition: datefolderview.cpp:43