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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2019-09-20
0007  * Description : QImage 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_QIMAGE_PLUGIN_H
0016 #define DIGIKAM_DIMG_QIMAGE_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 
0028 #define DPLUGIN_IID "org.kde.digikam.plugin.dimg.QImage"
0029 
0030 using namespace Digikam;
0031 
0032 namespace DigikamQImageDImgPlugin
0033 {
0034 
0035 class DImgQImagePlugin : public DPluginDImg
0036 {
0037     Q_OBJECT
0038     Q_PLUGIN_METADATA(IID DPLUGIN_IID)
0039     Q_INTERFACES(Digikam::DPluginDImg)
0040 
0041 public:
0042 
0043     explicit DImgQImagePlugin(QObject* const parent = nullptr);
0044     ~DImgQImagePlugin()                                                                           override;
0045 
0046     QString name()                                                                          const override;
0047     QString iid()                                                                           const override;
0048     QIcon   icon()                                                                          const override;
0049     QString details()                                                                       const override;
0050     QString description()                                                                   const override;
0051     QList<DPluginAuthor> authors()                                                          const override;
0052     QString handbookSection()                                                               const override;
0053     QString handbookChapter()                                                               const override;
0054     QString handbookReference()                                                             const override;
0055 
0056     void setup(QObject* const)                                                                    override;
0057 
0058     QString     loaderName()                                                                const override;
0059     QString     typeMimes()                                                                 const override;
0060     int         canRead(const QFileInfo& fileInfo, bool magic)                              const override;
0061     int         canWrite(const QString& format)                                             const override;
0062     DImgLoader* loader(DImg* const image, const DRawDecoding& rawSettings = DRawDecoding()) const override;
0063 
0064     DImgLoaderSettings* exportWidget(const QString& format)                                 const override;
0065 };
0066 
0067 } // namespace DigikamQImageDImgPlugin
0068 
0069 #endif // DIGIKAM_DIMG_QIMAGE_PLUGIN_H