#pragma once #include class SAIHandler : public QImageIOHandler { public: SAIHandler(); bool canRead() const override; bool read(QImage *image) override; bool write(const QImage &image) override; static bool canRead(QIODevice *device); }; class SAIPlugin : public QImageIOPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "sai.json") public: Capabilities capabilities(QIODevice *device, const QByteArray &format) const override; QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override; };