koPictureBase.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __koPictureBase_h__
00021 #define __koPictureBase_h__
00022
00023 #include <qstring.h>
00024 #include <qimage.h>
00025
00026 class QPainter;
00027 class QSize;
00028 class QIODevice;
00029 class QDragObject;
00030
00031 const char NULL_MIME_TYPE[]="application/x-zerosize";
00032 const char UNKNOWN_MIME_TYPE[]="application/octet-stream";
00033
00034
00035
00040 class KoPictureBase
00041 {
00042 public:
00046 KoPictureBase();
00047
00051 virtual ~KoPictureBase();
00052
00053 virtual KoPictureType::Type getType(void) const;
00054
00055 virtual KoPictureBase* newCopy(void) const;
00056
00060 virtual bool isNull(void) const;
00061
00077 virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
00078
00084 virtual QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
00085
00086 virtual bool load(QIODevice* io, const QString& extension);
00087
00088 virtual bool load(const QByteArray& array, const QString& extension);
00089
00094 virtual bool save(QIODevice* io);
00095
00099 virtual bool saveAsKOffice1Dot1(QIODevice* io, const QString& extension);
00100
00101 virtual QSize getOriginalSize(void) const;
00102
00103 virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
00104
00109 virtual bool isClipartAsKOffice1Dot1(void) const;
00110
00111 virtual QString getMimeType(const QString& extension) const;
00112
00113 bool isSlowResizeModeAllowed(void) const;
00114
00119 virtual QImage generateImage(const QSize& size);
00120
00121 virtual bool hasAlphaBuffer() const
00122 { return false; }
00123 virtual void setAlphaBuffer(bool )
00124 { }
00125 virtual QImage createAlphaMask(int = 0) const
00126 { return QImage(); }
00127
00128 virtual void clearCache(void);
00129 };
00130
00131 #endif
This file is part of the documentation for lib Library Version 1.3.5.