File indexing completed on 2025-01-19 03:51:01
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2019-09-22 0007 * Description : JPEG-2000 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_JPEG_2000_PLUGIN_H 0016 #define DIGIKAM_DIMG_JPEG_2000_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.JPEG2000" 0030 0031 using namespace Digikam; 0032 0033 namespace DigikamJPEG2000DImgPlugin 0034 { 0035 0036 class DImgJPEG2000Plugin : public DPluginDImg 0037 { 0038 Q_OBJECT 0039 Q_PLUGIN_METADATA(IID DPLUGIN_IID) 0040 Q_INTERFACES(Digikam::DPluginDImg) 0041 0042 public: 0043 0044 explicit DImgJPEG2000Plugin(QObject* const parent = nullptr); 0045 ~DImgJPEG2000Plugin() 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 private: 0069 0070 bool m_initJasper; 0071 }; 0072 0073 } // namespace DigikamJPEG2000DImgPlugin 0074 0075 #endif // DIGIKAM_DIMG_JPEG_2000_PLUGIN_H