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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2019-09-22
0007  * Description : RAW DImg plugin.
0008  *
0009  * SPDX-FileCopyrightText: 2020-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DIMG_RAW_PLUGIN_H
0016 #define DIGIKAM_DIMG_RAW_PLUGIN_H
0017 
0018 // Qt includes
0019 
0020 #include <QByteArray>
0021 #include <QWidget>
0022 
0023 // Local includes
0024 
0025 #include "dplugindimg.h"
0026 #include "dimg.h"
0027 #include "dimgloader.h"
0028 
0029 #define DPLUGIN_IID "org.kde.digikam.plugin.dimg.RAW"
0030 
0031 using namespace Digikam;
0032 
0033 namespace DigikamRAWDImgPlugin
0034 {
0035 
0036 class DImgRAWPlugin : public DPluginDImg
0037 {
0038     Q_OBJECT
0039     Q_PLUGIN_METADATA(IID DPLUGIN_IID)
0040     Q_INTERFACES(Digikam::DPluginDImg)
0041 
0042 public:
0043 
0044     explicit DImgRAWPlugin(QObject* const parent = nullptr);
0045     ~DImgRAWPlugin()                                                                              override;
0046 
0047     QString name()                                                                          const override;
0048     QString iid()                                                                           const override;
0049     QIcon   icon()                                                                          const override;
0050     QString details()                                                                       const override;
0051     QString description()                                                                   const override;
0052     QList<DPluginAuthor> authors()                                                          const override;
0053     QString handbookSection()                                                               const override;
0054     QString handbookChapter()                                                               const override;
0055     QString handbookReference()                                                             const override;
0056 
0057     void setup(QObject* const)                                                                    override;
0058     QMap<QString, QStringList> extraAboutData()                                             const override;
0059 
0060     QString     loaderName()                                                                const override;
0061     QString     typeMimes()                                                                 const override;
0062     int         canRead(const QFileInfo& fileInfo, bool magic)                              const override;
0063     int         canWrite(const QString& format)                                             const override;
0064     DImgLoader* loader(DImg* const image, const DRawDecoding& rawSettings = DRawDecoding()) const override;
0065 
0066     DImgLoaderSettings* exportWidget(const QString& format)                                 const override;
0067 };
0068 
0069 } // namespace DigikamRAWDImgPlugin
0070 
0071 #endif // DIGIKAM_DIMG_RAW_PLUGIN_H