• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

kimageiofactory.h

00001 /*
00002 * kimgio.h -- Declaration of interface to the KDE Image IO library.
00003 * Sirtaj Singh Kang <taj@kde.org>, 23 Sep 1998.
00004 *
00005 * This library is distributed under the conditions of the GNU LGPL.
00006 */
00007 
00008 #ifndef SSK_KIMGIOFACTORY_H
00009 #define SSK_KIMGIOFACTORY_H
00010 
00011 #include "tdesycocafactory.h"
00012 #include "kimageio.h"
00013 
00014 class KImageIOFormat;
00015 class KImageIOFormatList;
00016 
00018 class TDEIO_EXPORT KImageIOFormat : public KSycocaEntry
00019 {
00020   K_SYCOCATYPE( KST_KImageIOFormat, KSycocaEntry )
00021 
00022 public:
00023   typedef TDESharedPtr<KImageIOFormat> Ptr;
00024   typedef TQValueList<Ptr> List;
00025 public: // KDoc seems to barf on those typedefs and generates no docs after them
00029   KImageIOFormat( const TQString & path);
00030   
00034   KImageIOFormat( TQDataStream& _str, int offset);
00035 
00036   virtual ~KImageIOFormat();
00037 
00038   virtual TQString name() const { return mType; }
00039 
00040   virtual bool isValid() const { return true; } 
00041 
00046   virtual void load(TQDataStream& ); 
00047 
00052   virtual void save(TQDataStream& );
00053 
00058   void callLibFunc( bool read, TQImageIO *);
00059 
00060 public:  
00061   TQString mType;
00062   TQString mHeader;
00063   TQString mFlags;
00064   bool bRead;
00065   bool bWrite;
00066   TQStringList mSuffices;
00067   TQString mPattern;
00068   TQString mMimetype;
00069   TQString mLib;
00070   TQStringList rPaths;
00071   bool bLibLoaded;
00072   void (*mReadFunc)(TQImageIO *);
00073   void (*mWriteFunc)(TQImageIO *);
00074 protected:
00075   virtual void virtual_hook( int id, void* data );
00076 };
00077 
00079 class TDEIO_EXPORT KImageIOFormatList : public KImageIOFormat::List
00080 {
00081 public:
00082    KImageIOFormatList() { }
00083 };
00084 
00085 
00087 class TDEIO_EXPORT KImageIOFactory : public KSycocaFactory
00088 {
00089   friend class KImageIO;
00090   K_SYCOCAFACTORY( KST_KImageIO )
00091 public:
00092   static KImageIOFactory *self() 
00093   { if (!_self) new KImageIOFactory(); return _self; }
00094   KImageIOFactory();
00095   virtual ~KImageIOFactory();
00096 
00097 protected: // Internal stuff
00103   void load();
00104 
00108   TQString createPattern( KImageIO::Mode _mode);
00109 
00113   virtual KSycocaEntry *createEntry(const TQString &, const char *)
00114     { return 0; }                                                    
00115 
00119   virtual KSycocaEntry *createEntry(int offset);
00120 
00124   static void readImage( TQImageIO *iio);
00125 
00129   static void writeImage( TQImageIO *iio);
00130   
00131 protected:
00132   static KImageIOFactory *_self;  
00133   static KImageIOFormatList *formatList;
00134   TQString mReadPattern;
00135   TQString mWritePattern;
00136   TQStringList rPath;
00137 protected:
00138     virtual void virtual_hook( int id, void* data );
00139 };
00140 
00141 #endif
00142 

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.6.3
This website is maintained by Timothy Pearson.