1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2002-2003 Nadeem Hasan <nhasan@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KIMG_PCX_P_H
9#define KIMG_PCX_P_H
10
11#include <QImageIOPlugin>
12#include <QScopedPointer>
13
14class PCXHandlerPrivate;
15class PCXHandler : public QImageIOHandler
16{
17public:
18 PCXHandler();
19
20 bool canRead() const override;
21 bool read(QImage *image) override;
22 bool write(const QImage &image) override;
23
24 bool supportsOption(QImageIOHandler::ImageOption option) const override;
25 QVariant option(QImageIOHandler::ImageOption option) const override;
26
27 static bool canRead(QIODevice *device);
28
29private:
30 const QScopedPointer<PCXHandlerPrivate> d;
31};
32
33class PCXPlugin : public QImageIOPlugin
34{
35 Q_OBJECT
36 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "pcx.json")
37
38public:
39 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
40 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
41};
42
43#endif // KIMG_PCX_P_H
44

source code of kimageformats/src/imageformats/pcx_p.h