File indexing completed on 2025-01-19 03:51:29

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-09-24
0007  * Description : DNG Converter threads manager
0008  *
0009  * SPDX-FileCopyrightText: 2012      by Smit Mehta <smit dot meh at gmail dot com>
0010  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_DNG_CONVERTER_THREAD_H
0017 #define DIGIKAM_DNG_CONVERTER_THREAD_H
0018 
0019 // Qt includes
0020 
0021 #include <QUrl>
0022 
0023 // Local includes
0024 
0025 #include "actionthreadbase.h"
0026 #include "dngconverteractions.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamGenericDNGConverterPlugin
0031 {
0032 
0033 class DNGConverterActionData;
0034 
0035 class DNGConverterActionThread : public ActionThreadBase
0036 {
0037     Q_OBJECT
0038 
0039 public:
0040 
0041     explicit DNGConverterActionThread(QObject* const parent);
0042     ~DNGConverterActionThread();
0043 
0044     void setBackupOriginalRawFile(bool b);
0045     void setCompressLossLess(bool b);
0046     void setUpdateFileDate(bool b);
0047     void setPreviewMode(int mode);
0048 
0049     void identifyRawFile(const QUrl& url);
0050     void identifyRawFiles(const QList<QUrl>& urlList);
0051 
0052     void processRawFile(const QUrl& url);
0053     void processRawFiles(const QList<QUrl>& urlList);
0054 
0055     void cancel();
0056 
0057 Q_SIGNALS:
0058 
0059     void signalStarting(const DigikamGenericDNGConverterPlugin::DNGConverterActionData& ad);
0060     void signalFinished(const DigikamGenericDNGConverterPlugin::DNGConverterActionData& ad);
0061 
0062     /**
0063      * Signal to emit to sub-tasks to cancel processing.
0064      */
0065     void signalCancelDNGConverterTask();
0066 
0067 private:
0068 
0069     class Private;
0070     Private* const d;
0071 };
0072 
0073 } // namespace DigikamGenericDNGConverterPlugin
0074 
0075 #endif // DIGIKAM_DNG_CONVERTER_THREAD_H