kimageiofactory.h
/*
* kimgio.h -- Declaration of interface to the KDE Image IO library.
* Sirtaj Singh Kang <taj@kde.org>, 23 Sep 1998.
*
* This library is distributed under the conditions of the GNU LGPL.
*/
#ifndef SSK_KIMGIOFACTORY_H
#define SSK_KIMGIOFACTORY_H
#include "ksycocafactory.h"
#include "kimageio.h"
class KImageIOFormat;
class KImageIOFormatList;
class KIO_EXPORT KImageIOFormat : public KSycocaEntry
{
K_SYCOCATYPE( KST_KImageIOFormat, KSycocaEntry )
public:
typedef KSharedPtr<KImageIOFormat> Ptr;
typedef QValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
KImageIOFormat( const QString & path);
KImageIOFormat( QDataStream& _str, int offset);
virtual ~KImageIOFormat();
virtual QString name() const { return mType; }
virtual bool isValid() const { return true; }
virtual void load(QDataStream& );
virtual void save(QDataStream& );
void callLibFunc( bool read, QImageIO *);
public:
QString mType;
QString mHeader;
QString mFlags;
bool bRead;
bool bWrite;
QStringList mSuffices;
QString mPattern;
QString mMimetype;
QString mLib;
QStringList rPaths;
bool bLibLoaded;
void (*mReadFunc)(QImageIO *);
void (*mWriteFunc)(QImageIO *);
protected:
virtual void virtual_hook( int id, void* data );
};
class KIO_EXPORT KImageIOFormatList : public KImageIOFormat::List
{
public:
KImageIOFormatList() { }
};
class KIO_EXPORT KImageIOFactory : public KSycocaFactory
{
friend class KImageIO;
K_SYCOCAFACTORY( KST_KImageIO )
public:
static KImageIOFactory *self()
{ if (!_self) new KImageIOFactory(); return _self; }
KImageIOFactory();
virtual ~KImageIOFactory();
protected: // Internal stuff
void load();
QString createPattern( KImageIO::Mode _mode);
virtual KSycocaEntry *createEntry(const QString &, const char *)
{ return 0; }
virtual KSycocaEntry *createEntry(int offset);
static void readImage( QImageIO *iio);
static void writeImage( QImageIO *iio);
protected:
static KImageIOFactory *_self;
static KImageIOFormatList *formatList;
QString mReadPattern;
QString mWritePattern;
QStringList rPath;
protected:
virtual void virtual_hook( int id, void* data );
};
#endif
KImageIO
Interface to the KDE Image IO plugin architecture.
Definition: kimageio.h:69
KImageIO::Mode
Mode
Possible image file access modes.
Definition: kimageio.h:77

KDE Home | KDE Accessibility Home | Description of Access Keys