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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2019-09-26
0007  * Description : HEIF DImg plugin.
0008  *
0009  * SPDX-FileCopyrightText: 2019-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_HEIF_PLUGIN_H
0016 #define DIGIKAM_DIMG_HEIF_PLUGIN_H
0017 
0018 // Qt includes
0019 
0020 #include <QByteArray>
0021 
0022 // Local includes
0023 
0024 #include "dplugindimg.h"
0025 #include "dimg.h"
0026 #include "dimgloader.h"
0027 
0028 #define DPLUGIN_IID "org.kde.digikam.plugin.dimg.HEIF"
0029 
0030 using namespace Digikam;
0031 
0032 namespace DigikamHEIFDImgPlugin
0033 {
0034 
0035 class DImgHEIFPlugin : public DPluginDImg
0036 {
0037     Q_OBJECT
0038     Q_PLUGIN_METADATA(IID DPLUGIN_IID)
0039     Q_INTERFACES(Digikam::DPluginDImg)
0040 
0041 public:
0042 
0043     explicit DImgHEIFPlugin(QObject* const parent = nullptr);
0044     ~DImgHEIFPlugin()                                                                             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     QMap<QString, QStringList> extraAboutData()                                             const override;
0058 
0059     bool previewSupported()                                                                 const override;
0060 
0061     QString     loaderName()                                                                const override;
0062     QString     typeMimes()                                                                 const override;
0063     int         canRead(const QFileInfo& fileInfo, bool magic)                              const override;
0064     int         canWrite(const QString& format)                                             const override;
0065     DImgLoader* loader(DImg* const image, const DRawDecoding& rawSettings = DRawDecoding()) const override;
0066 
0067     DImgLoaderSettings* exportWidget(const QString& format)                                 const override;
0068 };
0069 
0070 } // namespace DigikamHEIFDImgPlugin
0071 
0072 #endif // DIGIKAM_DIMG_HEIF_PLUGIN_H