From dda8474928bd7276e1fad8fb7a601e7c83ff2bc2 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 10 Jul 2011 15:17:53 -0500 Subject: Added TQt4 HEAD --- .../qt4/plugins/src/imageformats/mng/main.cpp | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tqtinterface/qt4/plugins/src/imageformats/mng/main.cpp (limited to 'tqtinterface/qt4/plugins/src/imageformats/mng/main.cpp') diff --git a/tqtinterface/qt4/plugins/src/imageformats/mng/main.cpp b/tqtinterface/qt4/plugins/src/imageformats/mng/main.cpp new file mode 100644 index 0000000..ad57414 --- /dev/null +++ b/tqtinterface/qt4/plugins/src/imageformats/mng/main.cpp @@ -0,0 +1,59 @@ +#ifndef TQT_CLEAN_NAMESPACE +#define TQT_CLEAN_NAMESPACE +#endif + +#include + +#ifndef TQT_NO_IMAGEFORMATPLUGIN + +#ifdef TQT_NO_IMAGEIO_MNG +#undef TQT_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; +} + +TQ_EXPORT_PLUGIN( MNGFormat ) + +#endif // TQT_NO_IMAGEFORMATPLUGIN -- cgit v1.2.3