digiKam
timeadjusttask.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 : 2012-12-31
7  * Description : time adjust 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) 2018-2021 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_TIME_ADJUST_TASK_H
26 #define DIGIKAM_TIME_ADJUST_TASK_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 
32 // Local includes
33 
34 #include "timeadjustthread.h"
35 #include "actionthreadbase.h"
36 #include "timeadjustcontainer.h"
37 
38 using namespace Digikam;
39 
41 {
42 
43 class TimeAdjustTask : public ActionJob
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit TimeAdjustTask(const QUrl& url, TimeAdjustThread* const thread);
50  ~TimeAdjustTask() override;
51 
52  void setSettings(const TimeAdjustContainer& settings);
53 
54 Q_SIGNALS:
55 
56  void signalProcessStarted(const QUrl&);
57  void signalDateTimeForUrl(const QUrl&, const QDateTime&, bool);
58  void signalProcessEnded(const QUrl&, const QDateTime&, const QDateTime&, int);
59 
60 protected:
61 
62  void run() override;
63 
64 private:
65 
66  // Disable
67  TimeAdjustTask(QObject*) = delete;
68 
69 private:
70 
71  class Private;
72  Private* const d;
73 };
74 
75 // ------------------------------------------------------------------
76 
77 class TimePreviewTask : public ActionJob
78 {
79  Q_OBJECT
80 
81 public:
82 
83  explicit TimePreviewTask(const QUrl& url, TimeAdjustThread* const thread);
84  ~TimePreviewTask() override;
85 
86  void setSettings(const TimeAdjustContainer& settings);
87 
88 Q_SIGNALS:
89 
90  void signalPreviewReady(const QUrl&, const QDateTime&, const QDateTime&);
91 
92 protected:
93 
94  void run() override;
95 
96 private:
97 
98  // Disable
99  TimePreviewTask(QObject*) = delete;
100 
101 private:
102 
103  class Private;
104  Private* const d;
105 };
106 
107 } // namespace DigikamGenericTimeAdjustPlugin
108 
109 #endif // DIGIKAM_TIME_ADJUST_TASK
Definition: timeadjusttask.h:44
void signalProcessEnded(const QUrl &, const QDateTime &, const QDateTime &, int)
void signalDateTimeForUrl(const QUrl &, const QDateTime &, bool)
Definition: timeadjustthread.h:46
void signalPreviewReady(const QUrl &, const QDateTime &, const QDateTime &)
Definition: actionthreadbase.h:45
Definition: timeadjustcontainer.h:42
Definition: timeadjustdialog.cpp:73
Definition: datefolderview.cpp:43