File indexing completed on 2025-01-19 03:52:56
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2019-03-27 0007 * Description : file copy actions using threads. 0008 * 0009 * SPDX-FileCopyrightText: 2012 by Smit Mehta <smit dot meh at gmail dot com> 0010 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2019-2020 by Maik Qualmann <metzpinguin at gmail dot com> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #ifndef DIGIKAM_FC_TASK_H 0018 #define DIGIKAM_FC_TASK_H 0019 0020 // Qt includes 0021 0022 #include <QUrl> 0023 0024 // Local includes 0025 0026 #include "actionthreadbase.h" 0027 #include "fccontainer.h" 0028 0029 using namespace Digikam; 0030 0031 namespace DigikamGenericFileCopyPlugin 0032 { 0033 0034 class FCTask : public ActionJob 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 0040 explicit FCTask(const QUrl& srcUrl, 0041 const FCContainer& settings); 0042 ~FCTask() override; 0043 0044 Q_SIGNALS: 0045 0046 void signalUrlProcessed(const QUrl& from, const QUrl& to); 0047 0048 protected: 0049 0050 void run() override; 0051 0052 private: 0053 0054 // Disable 0055 explicit FCTask(QObject*) = delete; 0056 0057 private: 0058 0059 bool imageResize(const QString& orgPath, QUrl& destUrl); 0060 QUrl getUrlOrDelete(const QUrl& fileUrl) const; 0061 0062 private: 0063 0064 class Private; 0065 Private* const d; 0066 }; 0067 0068 } // namespace DigikamGenericFileCopyPlugin 0069 0070 #endif // DIGIKAM_FC_TASK