| 1 | // Copyright (C) 2016 The Qt Company Ltd. | 
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only | 
| 3 |  | 
| 4 | #ifndef QTGAHANDLER_H | 
| 5 | #define QTGAHANDLER_H | 
| 6 |  | 
| 7 | #include <QtGui/QImageIOHandler> | 
| 8 |  | 
| 9 | QT_BEGIN_NAMESPACE | 
| 10 |  | 
| 11 | class QTgaFile; | 
| 12 |  | 
| 13 | class QTgaHandler : public QImageIOHandler | 
| 14 | { | 
| 15 | public: | 
| 16 |     QTgaHandler(); | 
| 17 |     ~QTgaHandler(); | 
| 18 |  | 
| 19 |     bool canRead() const override; | 
| 20 |     bool read(QImage *image) override; | 
| 21 |  | 
| 22 |     static bool canRead(QIODevice *device); | 
| 23 |  | 
| 24 |     QVariant option(ImageOption option) const override; | 
| 25 |     void setOption(ImageOption option, const QVariant &value) override; | 
| 26 |     bool supportsOption(ImageOption option) const override; | 
| 27 |  | 
| 28 | private: | 
| 29 |     mutable QTgaFile *tga; | 
| 30 | }; | 
| 31 |  | 
| 32 | QT_END_NAMESPACE | 
| 33 |  | 
| 34 | #endif // QTGAHANDLER_H | 
| 35 |  |