lib

KoPictureBase Class Reference

Inheritance diagram for KoPictureBase:

KoPictureClipart KoPictureEps KoPictureImage KoPictureWmf List of all members.

Detailed Description

Definition at line 42 of file KoPictureBase.h.


Public Member Functions

 KoPictureBase ()
virtual ~KoPictureBase ()
virtual KoPictureType::Type getType (void) const
virtual KoPictureBasenewCopy (void) const
virtual bool isNull (void) const
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)
virtual QDragObject * dragObject (QWidget *dragSource=0L, const char *name=0L)
virtual bool load (QIODevice *io, const QString &extension)
virtual bool loadData (const QByteArray &array, const QString &extension)
virtual bool save (QIODevice *io) const
virtual bool saveAsBase64 (KoXmlWriter &writer) const
virtual QSize getOriginalSize (void) const
virtual QPixmap generatePixmap (const QSize &size, bool smoothScale=false)
virtual QString getMimeType (const QString &extension) const
bool isSlowResizeModeAllowed (void) const
virtual QImage generateImage (const QSize &size)
virtual bool hasAlphaBuffer () const
virtual void setAlphaBuffer (bool)
virtual QImage createAlphaMask (int=0) const
virtual void clearCache (void)

Constructor & Destructor Documentation

KoPictureBase::KoPictureBase (  ) 

Default constructor.

Definition at line 37 of file KoPictureBase.cpp.

KoPictureBase::~KoPictureBase (  )  [virtual]

Destructor.

Definition at line 48 of file KoPictureBase.cpp.


Member Function Documentation

bool KoPictureBase::isNull ( void   )  const [virtual]

Returns true if the picture is null.

Reimplemented in KoPictureClipart, KoPictureEps, KoPictureImage, and KoPictureWmf.

Definition at line 62 of file KoPictureBase.cpp.

void KoPictureBase::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 
) [virtual]

Draw the picture in a painter.

The parameter fastMode allows the picture to be re-sized and drawn quicker if possible

The parameters width, height define the desired size for the image Note that the image is being scaled to that size using scale() - except when printing. This avoids scaling the image at each paint event.

The other parameters are very similar to QPainter::drawPixmap : (x, y) define the position in the painter, (sx, sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0). (sw, sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom right of the pixmap.

Reimplemented in KoPictureClipart, KoPictureEps, KoPictureImage, and KoPictureWmf.

Definition at line 67 of file KoPictureBase.cpp.

QDragObject * KoPictureBase::dragObject ( QWidget *  dragSource = 0L,
const char *  name = 0L 
) [virtual]

Create a dragobject containing this picture.

Parameters:
dragSource must be 0 when copying to the clipboard
Returns:
0L if the picture is null!

Reimplemented in KoPictureImage.

Definition at line 125 of file KoPictureBase.cpp.

bool KoPictureBase::save ( QIODevice *  io  )  const [virtual]

save file

Parameters:
io QIODevice used for saving

Reimplemented in KoPictureClipart, KoPictureEps, KoPictureImage, and KoPictureWmf.

Definition at line 88 of file KoPictureBase.cpp.

bool KoPictureBase::saveAsBase64 ( KoXmlWriter writer  )  const [virtual]

OASIS FlatXML support: Save picture as base64-encoded data into an XML writer.

Definition at line 94 of file KoPictureBase.cpp.

QImage KoPictureBase::generateImage ( const QSize &  size  )  [virtual]

Generate a QImage (always in slow mode).

Reimplemented in KoPictureEps, and KoPictureImage.

Definition at line 134 of file KoPictureBase.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys