digiKam
dimgimagemagickplugin.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2019-09-21
7  * Description : ImageMagick DImg plugin.
8  *
9  * Copyright (C) 2020-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_DIMG_IMAGE_MAGICK_PLUGIN_H
24 #define DIGIKAM_DIMG_IMAGE_MAGICK_PLUGIN_H
25 
26 // Qt includes
27 
28 #include <QByteArray>
29 #include <QWidget>
30 
31 // Local includes
32 
33 #include "dplugindimg.h"
34 #include "dimg.h"
35 
36 #define DPLUGIN_IID "org.kde.digikam.plugin.dimg.ImageMagick"
37 
38 using namespace Digikam;
39 
41 {
42 
44 {
45  Q_OBJECT
46  Q_PLUGIN_METADATA(IID DPLUGIN_IID)
47  Q_INTERFACES(Digikam::DPluginDImg)
48 
49 public:
50 
51  explicit DImgImageMagickPlugin(QObject* const parent = nullptr);
52  ~DImgImageMagickPlugin() override;
53 
54  QString name() const override;
55  QString iid() const override;
56  QIcon icon() const override;
57  QString details() const override;
58  QString description() const override;
59  QList<DPluginAuthor> authors() const override;
60 
61  void setup(QObject* const) override;
62  void cleanUp() override;
63  QMap<QString, QString> extraAboutData() const override;
64 
65  QString loaderName() const override;
66  QString typeMimes() const override;
67  int canRead(const QFileInfo& fileInfo, bool magic) const override;
68  int canWrite(const QString& format) const override;
69  DImgLoader* loader(DImg* const image, const DRawDecoding& rawSettings = DRawDecoding()) const override;
70 
71 private:
72 
73  QStringList decoderFormats() const;
74  QStringList encoderFormats() const;
75 
76 private:
77 
78  QStringList m_readFormats;
79  QStringList m_writeFormats;
80 
81 };
82 
83 } // namespace DigikamImageMagickDImgPlugin
84 
85 #endif // DIGIKAM_DIMG_IMAGE_MAGICK_PLUGIN_H
Definition: dimgimagemagickplugin.h:44
Definition: dimgloader.h:51
Definition: dimg.h:62
Definition: dplugindimg.h:43
Definition: drawdecoding.h:48
Definition: piwigotalker.h:48
#define DPLUGIN_IID
Definition: dimgimagemagickplugin.h:36
Definition: dimgimagemagickloader.cpp:60
Definition: datefolderview.cpp:43