/* * xcf.cpp: A Qt 5 plug-in for reading GIMP XCF image files * Copyright (C) 2001 lignum Computing, Inc. * Copyright (C) 2004 Melchior FRANZ * * This plug-in is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef KIMG_XCF_H #define KIMG_XCF_H #include class XCFHandler : public QImageIOHandler { public: XCFHandler(); bool canRead() const Q_DECL_OVERRIDE; bool read(QImage *image) Q_DECL_OVERRIDE; bool write(const QImage &image) Q_DECL_OVERRIDE; static bool canRead(QIODevice *device); }; class XCFPlugin : public QImageIOPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "xcf.json") public: Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE; QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE; }; #endif // KIMG_XCF_H