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 "koPictureKey.h"
00024
00025 #include <qstring.h>
00026 #include <qimage.h>
00027
00028 class KoXmlWriter;
00029 class QPainter;
00030 class QSize;
00031 class QIODevice;
00032 class QDragObject;
00033
00034 const char NULL_MIME_TYPE[]="application/x-zerosize";
00035
00036
00037
00042 class KoPictureBase
00043 {
00044 public:
00048 KoPictureBase();
00049
00053 virtual ~KoPictureBase();
00054
00055 virtual KoPictureType::Type getType(void) const;
00056
00057 virtual KoPictureBase* newCopy(void) const;
00058
00062 virtual bool isNull(void) const;
00063
00079 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);
00080
00086 virtual QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
00087
00088 virtual bool load(QIODevice* io, const QString& extension);
00089
00090 virtual bool loadData(const QByteArray& array, const QString& extension);
00091
00096 virtual bool save(QIODevice* io) const;
00097
00101 virtual bool saveAsKOffice1Dot1(QIODevice* io, const QString& extension) const;
00102
00107 virtual bool saveAsBase64( KoXmlWriter& writer ) const;
00108
00109 virtual QSize getOriginalSize(void) const;
00110
00111 virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
00112
00117 virtual bool isClipartAsKOffice1Dot1(void) const;
00118
00119 virtual QString getMimeType(const QString& extension) const;
00120
00121 bool isSlowResizeModeAllowed(void) const;
00122
00127 virtual QImage generateImage(const QSize& size);
00128
00129 virtual bool hasAlphaBuffer() const
00130 { return false; }
00131 virtual void setAlphaBuffer(bool )
00132 { }
00133 virtual QImage createAlphaMask(int = 0) const
00134 { return QImage(); }
00135
00136 virtual void clearCache(void);
00137 };
00138
00139 #endif
This file is part of the documentation for lib Library Version 1.4.2.