#include <KoPictureImage.h>
Graphe d'héritage de KoPictureImage:
Fonctions membres publiques | |
KoPictureImage () | |
virtual | ~KoPictureImage () |
KoPictureType::Type | getType (void) const |
KoPictureBase * | newCopy (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) |
Draw the image in a painter. | |
virtual Q3DragObject * | dragObject (QWidget *dragSource=0L, const char *name=0L) |
virtual bool | loadData (const QByteArray &array, const QString &extension) |
virtual bool | save (QIODevice *io) const |
virtual QSize | getOriginalSize (void) const |
virtual QPixmap | generatePixmap (const QSize &size, bool smoothScale=false) |
virtual QString | getMimeType (const QString &extension) const |
virtual QImage | generateImage (const QSize &size) |
virtual bool | hasAlphaBuffer () const |
virtual void | setAlphaBuffer (bool enable) |
virtual QImage | createAlphaMask (Qt::ImageConversionFlags flags=Qt::AutoColor) const |
virtual void | clearCache (void) |
Fonctions membres protégées | |
QPixmap | getPixmap (QImage &image) |
void | scaleAndCreatePixmap (const QSize &size, bool fastMode=false) |
Attributs privés | |
QImage | m_originalImage |
Image as Qimage. | |
QByteArray | m_rawData |
Binary copy of the loaded image file. | |
QPixmap | m_cachedPixmap |
Cached pixmap. | |
QSize | m_cachedSize |
size of the currently cached pixmap | |
bool | m_cacheIsInFastMode |
Private * | d |
Définition à la ligne 35 du fichier KoPictureImage.h.
KoPictureImage::KoPictureImage | ( | ) |
Default constructor.
Définition à la ligne 36 du fichier KoPictureImage.cpp.
Référencé par newCopy().
Voici le graphe d'appel pour cette fonction :
KoPictureImage::~KoPictureImage | ( | ) | [virtual] |
Destructor.
Définition à la ligne 40 du fichier KoPictureImage.cpp.
KoPictureType::Type KoPictureImage::getType | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 49 du fichier KoPictureImage.cpp.
Références KoPictureType::TypeImage.
KoPictureBase * KoPictureImage::newCopy | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 44 du fichier KoPictureImage.cpp.
Références KoPictureImage().
Voici le graphe d'appel pour cette fonction :
bool KoPictureImage::isNull | ( | void | ) | const [virtual] |
Returns true if the picture is null.
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 54 du fichier KoPictureImage.cpp.
Références m_originalImage.
void KoPictureImage::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 image in a painter.
No, this isn't as simple as painter.drawPixmap(). This method ensures that the best quality is used when printing, scaling the 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.
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 94 du fichier KoPictureImage.cpp.
Références getOriginalSize(), m_cachedPixmap, m_originalImage, et scaleAndCreatePixmap().
Voici le graphe d'appel pour cette fonction :
Q3DragObject * KoPictureImage::dragObject | ( | QWidget * | dragSource = 0L , |
|
const char * | name = 0L | |||
) | [virtual] |
Create a dragobject containing this picture.
dragSource | must be 0 when copying to the clipboard |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 180 du fichier KoPictureImage.cpp.
Références m_originalImage.
bool KoPictureImage::loadData | ( | const QByteArray & | array, | |
const QString & | extension | |||
) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 130 du fichier KoPictureImage.cpp.
Références m_originalImage, et m_rawData.
bool KoPictureImage::save | ( | QIODevice * | io | ) | const [virtual] |
save file
io | QIODevice used for saving |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 150 du fichier KoPictureImage.cpp.
Références m_rawData, et testguiform::size.
QSize KoPictureImage::getOriginalSize | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 158 du fichier KoPictureImage.cpp.
Références m_originalImage.
Référencé par draw().
Voici le graphe d'appel pour cette fonction :
QPixmap KoPictureImage::generatePixmap | ( | const QSize & | size, | |
bool | smoothScale = false | |||
) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 163 du fichier KoPictureImage.cpp.
Références m_cachedPixmap, et scaleAndCreatePixmap().
Voici le graphe d'appel pour cette fonction :
QString KoPictureImage::getMimeType | ( | const QString & | extension | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 169 du fichier KoPictureImage.cpp.
Références KoPageFormat::name().
Voici le graphe d'appel pour cette fonction :
QImage KoPictureImage::generateImage | ( | const QSize & | size | ) | [virtual] |
Generate a QImage (always in slow mode)
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 185 du fichier KoPictureImage.cpp.
Références m_originalImage.
virtual bool KoPictureImage::hasAlphaBuffer | ( | ) | const [inline, virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 96 du fichier KoPictureImage.h.
Références m_originalImage.
virtual void KoPictureImage::setAlphaBuffer | ( | bool | enable | ) | [inline, virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 100 du fichier KoPictureImage.h.
Références m_originalImage.
virtual QImage KoPictureImage::createAlphaMask | ( | Qt::ImageConversionFlags | flags = Qt::AutoColor |
) | const [inline, virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 111 du fichier KoPictureImage.h.
Références m_originalImage.
void KoPictureImage::clearCache | ( | void | ) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 191 du fichier KoPictureImage.cpp.
Références m_cachedPixmap, m_cachedSize, et m_cacheIsInFastMode.
QPixmap KoPictureImage::getPixmap | ( | QImage & | image | ) | [protected] |
void KoPictureImage::scaleAndCreatePixmap | ( | const QSize & | size, | |
bool | fastMode = false | |||
) | [protected] |
Définition à la ligne 59 du fichier KoPictureImage.cpp.
Références KoPictureBase::isSlowResizeModeAllowed(), m_cachedPixmap, m_cachedSize, m_cacheIsInFastMode, et m_originalImage.
Référencé par draw(), et generatePixmap().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QImage KoPictureImage::m_originalImage [private] |
Image as Qimage.
Définition à la ligne 121 du fichier KoPictureImage.h.
Référencé par createAlphaMask(), dragObject(), draw(), generateImage(), getOriginalSize(), hasAlphaBuffer(), isNull(), loadData(), scaleAndCreatePixmap(), et setAlphaBuffer().
QByteArray KoPictureImage::m_rawData [private] |
Binary copy of the loaded image file.
Définition à la ligne 122 du fichier KoPictureImage.h.
Référencé par loadData(), et save().
QPixmap KoPictureImage::m_cachedPixmap [private] |
Cached pixmap.
Définition à la ligne 123 du fichier KoPictureImage.h.
Référencé par clearCache(), draw(), generatePixmap(), et scaleAndCreatePixmap().
QSize KoPictureImage::m_cachedSize [private] |
size of the currently cached pixmap
Définition à la ligne 124 du fichier KoPictureImage.h.
Référencé par clearCache(), et scaleAndCreatePixmap().
bool KoPictureImage::m_cacheIsInFastMode [private] |
true, if the last cached image was done using fast mode. false, if the last cached image was done using slow mode.
Définition à la ligne 129 du fichier KoPictureImage.h.
Référencé par clearCache(), et scaleAndCreatePixmap().
Private* KoPictureImage::d [private] |
Définition à la ligne 130 du fichier KoPictureImage.h.