1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 2003 Dominik Seichter <domseichter@web.de> |
4 | SPDX-FileCopyrightText: 2010 Troy Unrau <troy@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #ifndef KIMG_RAS_P_H |
10 | #define KIMG_RAS_P_H |
11 | |
12 | #include <QImageIOPlugin> |
13 | |
14 | class RASHandler : public QImageIOHandler |
15 | { |
16 | public: |
17 | RASHandler(); |
18 | |
19 | bool canRead() const override; |
20 | bool read(QImage *image) override; |
21 | |
22 | bool supportsOption(QImageIOHandler::ImageOption option) const override; |
23 | QVariant option(QImageIOHandler::ImageOption option) const override; |
24 | |
25 | static bool canRead(QIODevice *device); |
26 | }; |
27 | |
28 | class RASPlugin : public QImageIOPlugin |
29 | { |
30 | Q_OBJECT |
31 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "ras.json" ) |
32 | |
33 | public: |
34 | Capabilities capabilities(QIODevice *device, const QByteArray &format) const override; |
35 | QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override; |
36 | }; |
37 | |
38 | #endif // KIMG_RAS_P_H |
39 | |