mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-17 11:44:16 -04:00
Frameworks have a convention of naming uninstalled headers in src/ with a _p at the end of the name, to make it clear they are not part of the API. None of the headers in KImageFormats are installed, so it is not really necessary to follow this convention, but we follow it anyway for the benefit of both humans and tools (like kapidox).
50 lines
1.6 KiB
C++
50 lines
1.6 KiB
C++
/*
|
|
* xcf.cpp: A Qt 5 plug-in for reading GIMP XCF image files
|
|
* Copyright (C) 2001 lignum Computing, Inc. <allen@lignumcomputing.com>
|
|
* Copyright (C) 2004 Melchior FRANZ <mfranz@kde.org>
|
|
*
|
|
* 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 <QImageIOPlugin>
|
|
|
|
class XCFHandler : public QImageIOHandler
|
|
{
|
|
public:
|
|
XCFHandler();
|
|
|
|
virtual bool canRead() const;
|
|
virtual bool read(QImage *image);
|
|
virtual bool write(const QImage &image);
|
|
|
|
static bool canRead(QIODevice *device);
|
|
};
|
|
|
|
class XCFPlugin : public QImageIOPlugin
|
|
{
|
|
Q_OBJECT
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "xcf.json")
|
|
|
|
public:
|
|
virtual Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
|
|
virtual QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const;
|
|
};
|
|
|
|
#endif // KIMG_XCF_H
|