Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "argbplugin.h"
- #include "argbhandler.h"
- ArgbPlugin::ArgbPlugin(QObject *parent) :
- QImageIOPlugin(parent)
- {
- }
- QStringList ArgbPlugin::keys() const
- {
- return QStringList() << "exr";
- }
- QImageIOPlugin::Capabilities ArgbPlugin::capabilities(
- QIODevice *device, const QByteArray &format) const
- {
- if (format == "exr")
- return Capabilities(CanRead | CanWrite);
- if (!(format.isEmpty() && device->isOpen()))
- return 0;
- Capabilities cap;
- if (device->isReadable() && ArgbHandler::canRead(device))
- cap |= CanRead;
- if (device->isWritable())
- cap |= CanWrite;
- return cap;
- }
- QImageIOHandler *ArgbPlugin::create(QIODevice *device, const QByteArray &format) const
- {
- //QImageIOHandler *handler = new ArgbHandler;
- // handler->setDevice(device);
- // handler->setFormat(format);
- // return handler;
- }
- #if QT_VERSION < 0x050000
- Q_EXPORT_PLUGIN2(ARGB, ArgbPlugin)
- #endif // QT_VERSION < 0x050000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement