summaryrefslogtreecommitdiffstats
path: root/plugins/src/imageformats/mng/main.cpp
blob: dec02cb4e73bce571ff54b18361b5e48e373f88c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <qimageformatplugin.h>

#ifndef QT_NO_IMAGEFORMATPLUGIN

#ifdef QT_NO_IMAGEIO_MNG
#undef QT_NO_IMAGEIO_MNG
#endif
#include "../../../../src/kernel/qmngio.cpp"

class MNGFormat : public QImageFormatPlugin
{
public:
    MNGFormat();

    QStringList keys() const;
    bool loadImage( const QString &format, const QString &filename, QImage *image );
    bool saveImage( const QString &format, const QString &filename, const QImage &image );
    bool installIOHandler( const QString & );
};

MNGFormat::MNGFormat()
{
}


QStringList MNGFormat::keys() const
{
    QStringList list;
    list << "MNG";

    return list;
}

bool MNGFormat::loadImage( const QString &, const QString &, QImage * )
{
    return FALSE;
}

bool MNGFormat::saveImage( const QString &, const QString &, const QImage& )
{
    return FALSE;
}

bool MNGFormat::installIOHandler( const QString &name )
{
    if ( name != "MNG" )
	return FALSE;

    qInitMngIO();
    return TRUE;
}

Q_EXPORT_PLUGIN( MNGFormat )

#endif // QT_NO_IMAGEFORMATPLUGIN