20#ifndef __koPicture_h__
21#define __koPicture_h__
24#include <tqiodevice.h>
26#include <koffice_export.h>
28#include "KoPictureKey.h"
66 KoPictureType::Type getType( void) const;
81 bool isNull( void) const;
97 void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0,
98 int sw = -1, int sh = -1, bool fastMode = false);
106 TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
108 bool load(TQIODevice* io, const TQString& extension);
114 bool save(TQIODevice* io) const;
131 TQString getExtension( void) const;
136 TQString getMimeType( void) const;
141 TQSize getOriginalSize( void) const;
148 void clearAndSetMode( const TQString& newMode);
158 bool loadFromFile( const TQString& fileName);
163 bool loadFromBase64( const TQCString& str);
168 bool loadXpm(TQIODevice* io);
176 TQPixmap generatePixmap( const TQSize& size, bool smoothScale = false);
186 bool setKeyAndDownloadPicture( const KURL& url, TQWidget *window);
194 TQImage generateImage( const TQSize& size);
199 bool hasAlphaBuffer() const;
204 void setAlphaBuffer( bool enable);
212 TQImage createAlphaMask( int conversion_flags = 0) const;
220 void clearCache( void);
222 TQString uniquePictureId() const;
223 void assignPictureId( uint _id);
230 void unlinkSharedData( void);
235 void linkSharedData( void) const;
240 void createSharedData( void);
241 TQString uniqueName() const;
253 KoPictureShared* m_sharedData;
254 static uint uniqueValue;
256 TQString m_uniqueName;
KoPictureKey is the structure describing a picture in a unique way.
KoPicture is a container class for various types of pictures supported by KOffice.
A class for writing out XML (to any TQIODevice), with a special attention on performance.
|