source: trunk/plugins/src/imageformats/mng/main.cpp

Last change on this file was 204, checked in by rudi, 14 years ago

Added plugin source code

File size: 1.1 KB
Line 
1#ifndef QT_CLEAN_NAMESPACE
2#define QT_CLEAN_NAMESPACE
3#endif
4
5#include <qimageformatplugin.h>
6
7#ifndef QT_NO_IMAGEFORMATPLUGIN
8
9#ifdef QT_NO_IMAGEIO_MNG
10#undef QT_NO_IMAGEIO_MNG
11#endif
12#include "../../../../src/kernel/qmngio.cpp"
13
14class MNGFormat : public QImageFormatPlugin
15{
16public:
17 MNGFormat();
18
19 QStringList keys() const;
20 bool loadImage( const QString &format, const QString &filename, QImage *image );
21 bool saveImage( const QString &format, const QString &filename, const QImage &image );
22 bool installIOHandler( const QString & );
23};
24
25MNGFormat::MNGFormat()
26{
27}
28
29
30QStringList MNGFormat::keys() const
31{
32 QStringList list;
33 list << "MNG";
34
35 return list;
36}
37
38bool MNGFormat::loadImage( const QString &, const QString &, QImage * )
39{
40 return FALSE;
41}
42
43bool MNGFormat::saveImage( const QString &, const QString &, const QImage& )
44{
45 return FALSE;
46}
47
48bool MNGFormat::installIOHandler( const QString &name )
49{
50 if ( name != "MNG" )
51 return FALSE;
52
53 qInitMngIO();
54 return TRUE;
55}
56
57Q_EXPORT_PLUGIN( MNGFormat )
58
59#endif // QT_NO_IMAGEFORMATPLUGIN
Note: See TracBrowser for help on using the repository browser.