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 | |
13 | class PCXHandler : public QImageIOHandler |
14 | { |
15 | public: |
16 | PCXHandler(); |
17 | |
18 | bool canRead() const override; |
19 | bool read(QImage *image) override; |
20 | bool write(const QImage &image) override; |
21 | |
22 | static bool canRead(QIODevice *device); |
23 | }; |
24 | |
25 | class PCXPlugin : public QImageIOPlugin |
26 | { |
27 | Q_OBJECT |
28 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "pcx.json" ) |
29 | |
30 | public: |
31 | Capabilities capabilities(QIODevice *device, const QByteArray &format) const override; |
32 | QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override; |
33 | }; |
34 | |
35 | #endif // KIMG_PCX_P_H |
36 | |