1 | /* |
2 | QImageIO Routines to read/write EPS images. |
3 | SPDX-FileCopyrightText: 1998 Dirk Schoenberger <dirk.schoenberger@freenet.de> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | #ifndef KIMG_EPS_P_H |
8 | #define KIMG_EPS_P_H |
9 | |
10 | #include <QImageIOPlugin> |
11 | #include <QLoggingCategory> |
12 | |
13 | class EPSHandler : public QImageIOHandler |
14 | { |
15 | public: |
16 | EPSHandler(); |
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 EPSPlugin : public QImageIOPlugin |
26 | { |
27 | Q_OBJECT |
28 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "eps.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 | Q_DECLARE_LOGGING_CATEGORY(EPSPLUGIN) |
36 | |
37 | #endif // KIMG_EPS_P_H |
38 | |