20#ifndef __koPictureShared_h__
21#define __koPictureShared_h__
25#include <tqiodevice.h>
28#include "KoPictureKey.h"
44class KoPictureShared : public TQShared
50 KoPictureShared( void);
55 ~KoPictureShared( void);
62 KoPictureShared( const KoPictureShared &other);
69 KoPictureShared& operator=( const KoPictureShared& other);
71 KoPictureType::Type getType( void) const;
76 bool isNull( void) const;
91 void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
98 TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
100 bool load(TQIODevice* io, const TQString& extension);
101 bool loadFromBase64( const TQCString& str );
107 bool save(TQIODevice* io) const;
115 void setExtension( const TQString& extension);
117 TQString getExtension( void) const;
119 TQSize getOriginalSize( void) const;
126 void clearAndSetMode( const TQString& newMode);
138 bool loadFromFile( const TQString& fileName);
143 bool loadXpm(TQIODevice* io);
151 TQPixmap generatePixmap( const TQSize& size, bool smoothScale = false);
153 TQString getMimeType( void) const;
162 TQImage generateImage( const TQSize& size);
164 bool hasAlphaBuffer() const;
165 void setAlphaBuffer( bool enable);
166 TQImage createAlphaMask( int conversion_flags = 0) const;
174 void clearCache( void);
176 TQString uniquePictureId() const;
177 void assignPictureId( uint _id);
185 bool loadWmf(TQIODevice* io);
191 bool loadTmp(TQIODevice* io);
194 bool identifyAndLoad( TQByteArray data );
206 bool loadCompressed( TQIODevice* io, const TQString& mimeType, const TQString& extension );
209 KoPictureBase* m_base;
210 TQString m_extension;
A class for writing out XML (to any TQIODevice), with a special attention on performance.
TDEAction * save(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
TDEAction * clear(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
|