summaryrefslogtreecommitdiffstats
path: root/plugins/src/imageformats/mng/main.cpp
blob: 62e159a35f48a6597066f9d8dbbe5eb456e1ad2c (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 <ntqimageformatplugin.h>

#ifndef QT_NO_IMAGEFORMATPLUGIN

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

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

    TQStringList keys() const;
    bool loadImage( const TQString &format, const TQString &filename, TQImage *image );
    bool saveImage( const TQString &format, const TQString &filename, const TQImage &image );
    bool installIOHandler( const TQString & );
};

MNGFormat::MNGFormat()
{
}


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

    return list;
}

bool MNGFormat::loadImage( const TQString &, const TQString &, TQImage * )
{
    return FALSE;
}

bool MNGFormat::saveImage( const TQString &, const TQString &, const TQImage& )
{
    return FALSE;
}

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

    qInitMngIO();
    return TRUE;
}

Q_EXPORT_PLUGIN( MNGFormat )

#endif // QT_NO_IMAGEFORMATPLUGIN