2018-10-29 00:11:23 +01:00
|
|
|
#ifndef PBFHANDLER_H
|
|
|
|
#define PBFHANDLER_H
|
|
|
|
|
|
|
|
#include <QImageIOHandler>
|
|
|
|
#include <QImage>
|
|
|
|
#include <QVariant>
|
2018-11-12 22:05:55 +01:00
|
|
|
#include <QSize>
|
2018-10-29 00:11:23 +01:00
|
|
|
|
|
|
|
class Style;
|
|
|
|
|
|
|
|
class PBFHandler : public QImageIOHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PBFHandler(Style *style) : _style(style) {}
|
|
|
|
~PBFHandler() {}
|
|
|
|
|
|
|
|
bool canRead() const;
|
|
|
|
bool read(QImage *image);
|
|
|
|
|
|
|
|
QVariant option(ImageOption option) const;
|
|
|
|
bool supportsOption(ImageOption option) const;
|
2018-11-12 22:05:55 +01:00
|
|
|
void setOption(QImageIOHandler::ImageOption option, const QVariant &value);
|
2018-10-29 00:11:23 +01:00
|
|
|
|
|
|
|
static bool canRead(QIODevice *device);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Style *_style;
|
2018-11-12 22:05:55 +01:00
|
|
|
QSize _scaledSize;
|
2018-10-29 00:11:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PBFHANDLER_H
|