File indexing completed on 2024-04-28 15:25:43
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 2003 Ignacio CastaƱo <castano@ludicon.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KIMG_PSD_P_H 0009 #define KIMG_PSD_P_H 0010 0011 #include <QImageIOPlugin> 0012 0013 class PSDHandler : public QImageIOHandler 0014 { 0015 public: 0016 PSDHandler(); 0017 0018 bool canRead() const override; 0019 bool read(QImage *image) override; 0020 0021 bool supportsOption(QImageIOHandler::ImageOption option) const override; 0022 QVariant option(QImageIOHandler::ImageOption option) const override; 0023 0024 static bool canRead(QIODevice *device); 0025 }; 0026 0027 class PSDPlugin : public QImageIOPlugin 0028 { 0029 Q_OBJECT 0030 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "psd.json") 0031 0032 public: 0033 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override; 0034 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override; 0035 }; 0036 0037 #endif // KIMG_PSD_P_H