Référence de la classe KoPicture

A picture container class. Plus de détails...

#include <KoPicture.h>

Graphe de collaboration de KoPicture:

[légende]
Liste de tous les membres

Fonctions membres publiques

 KoPicture (void)
 ~KoPicture (void)
 KoPicture (const KoPicture &other)
KoPictureoperator= (const KoPicture &other)
KoPictureType::Type getType (void) const
KoPictureKey getKey (void) const
void setKey (const KoPictureKey &key)
bool isNull (void) const
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 picture in a painter.
Q3DragObject * dragObject (QWidget *dragSource=0L, const char *name=0L)
bool load (QIODevice *io, const QString &extension)
bool save (QIODevice *io) const
bool saveAsBase64 (KoXmlWriter &writer) const
QString getExtension (void) const
QString getMimeType (void) const
QSize getOriginalSize (void) const
void clearAndSetMode (const QString &newMode)
void clear (void)
bool loadFromFile (const QString &fileName)
bool loadFromBase64 (const QByteArray &str)
bool loadXpm (QIODevice *io)
QPixmap generatePixmap (const QSize &size, bool smoothScale=false)
bool setKeyAndDownloadPicture (const KUrl &url, QWidget *window)
QImage generateImage (const QSize &size)
bool hasAlphaBuffer () const
void setAlphaBuffer (bool enable)
QImage createAlphaMask (Qt::ImageConversionFlags flags=Qt::AutoColor) const
void clearCache (void)
 Clear any cache.
QString uniquePictureId () const
void assignPictureId (uint _id)

Fonctions membres protégées

void unlinkSharedData (void)
void linkSharedData (void) const
void createSharedData (void)
QString uniqueName () const

Attributs protégés

KoPictureKey m_key
KoPictureSharedm_sharedData
QString m_uniqueName

Attributs protégés statiques

static uint uniqueValue

Description détaillée

A picture container class.

KoPicture is a container class for various types of pictures supported by KOffice.

Définition à la ligne 43 du fichier KoPicture.h.


Documentation des contructeurs et destructeur

KoPicture::KoPicture ( void   ) 

Default constructor.

Définition à la ligne 38 du fichier KoPicture.cpp.

Références m_uniqueName, et uniqueValue.

KoPicture::~KoPicture ( void   ) 

Destructor.

Définition à la ligne 43 du fichier KoPicture.cpp.

Références unlinkSharedData().

Voici le graphe d'appel pour cette fonction :

KoPicture::KoPicture ( const KoPicture other  ) 

Copy constructor

Définition à la ligne 53 du fichier KoPicture.cpp.

Références m_sharedData.


Documentation des fonctions membres

KoPicture & KoPicture::operator= ( const KoPicture other  ) 

Assignment operator

Définition à la ligne 73 du fichier KoPicture.cpp.

Références linkSharedData(), m_key, m_sharedData, et unlinkSharedData().

Voici le graphe d'appel pour cette fonction :

KoPictureType::Type KoPicture::getType ( void   )  const

Définition à la ligne 109 du fichier KoPicture.cpp.

Références KoPictureShared::getType(), m_sharedData, et KoPictureType::TypeUnknown.

Voici le graphe d'appel pour cette fonction :

KoPictureKey KoPicture::getKey ( void   )  const

Retrieve the key structure describing the picture in a unique way.

Définition à la ligne 116 du fichier KoPicture.cpp.

Références m_key.

Référencé par KoPictureCollection::downloadPicture(), KoPictureCollection::getOasisFileName(), et KoPictureCollection::insertPicture().

Voici le graphe d'appel pour cette fonction :

void KoPicture::setKey ( const KoPictureKey key  ) 

Set the key structure describing the picture in a unique way

Définition à la ligne 121 du fichier KoPicture.cpp.

Références m_key.

Référencé par KoPictureCollection::findPicture(), KoPictureCollection::insertPicture(), et setKeyAndDownloadPicture().

Voici le graphe d'appel pour cette fonction :

bool KoPicture::isNull ( void   )  const

Returns true if the picture is null.

Définition à la ligne 127 du fichier KoPicture.cpp.

Références KoPictureShared::isNull(), et m_sharedData.

Référencé par KoPictureCollection::insertPicture(), KoPictureCollection::loadPicture(), et KoPictureCollection::readFromStore().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPicture::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 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 picture

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 picture that is to be drawn. The default is (0, 0). (sw, sh) specify the size of the picture that is to be drawn. The default, (-1, -1), means all the way to the bottom right of the pixmap.

Définition à la ligne 134 du fichier KoPicture.cpp.

Références KoPictureShared::draw(), et m_sharedData.

Référencé par KoPictureFilePreviewWidget::drawContents().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

Q3DragObject * KoPicture::dragObject ( QWidget *  dragSource = 0L,
const char *  name = 0L 
)

Create a dragobject containing this picture.

Paramètres:
dragSource must be 0 when copying to the clipboard
name name for the QDragObject
Renvoie:
0L if the picture is null, or if a dragobject for it isn't implemented [yet]

Définition à la ligne 254 du fichier KoPicture.cpp.

Références KoPictureShared::dragObject(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

bool KoPicture::load ( QIODevice *  io,
const QString &  extension 
)

Définition à la ligne 202 du fichier KoPicture.cpp.

Références createSharedData(), KoPictureShared::load(), et m_sharedData.

Référencé par KoPictureCollection::readFromStore().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

bool KoPicture::save ( QIODevice *  io  )  const

Save picture into a QIODevice

Paramètres:
io QIODevice used for saving

Définition à la ligne 161 du fichier KoPicture.cpp.

Références m_sharedData, et KoPictureShared::save().

Voici le graphe d'appel pour cette fonction :

bool KoPicture::saveAsBase64 ( KoXmlWriter writer  )  const

OASIS FlatXML support: Save picture as base64-encoded data into an XML writer. The caller will usually do something like

  writer.startElement( "office:binary-data" );
  m_picture.saveAsBase64( writer );
  writer.endElement();

Définition à la ligne 170 du fichier KoPicture.cpp.

Références m_sharedData, et KoPictureShared::saveAsBase64().

Voici le graphe d'appel pour cette fonction :

QString KoPicture::getExtension ( void   )  const

Renvoie:
the image extension (e.g. png)

Définition à la ligne 188 du fichier KoPicture.cpp.

Références KoPictureShared::getExtension(), et m_sharedData.

Référencé par KoPictureCollection::getFileName(), et KoPictureCollection::getOasisFileName().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QString KoPicture::getMimeType ( void   )  const

Renvoie:
the image MIME type

Définition à la ligne 195 du fichier KoPicture.cpp.

Références KoPictureShared::getMimeType(), m_sharedData, et NULL_MIME_TYPE.

Voici le graphe d'appel pour cette fonction :

QSize KoPicture::getOriginalSize ( void   )  const

Renvoie:
the original image size

Définition à la ligne 223 du fichier KoPicture.cpp.

Références KoPictureShared::getOriginalSize(), et m_sharedData.

Référencé par KoPictureFilePreviewWidget::setPicture().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPicture::clearAndSetMode ( const QString &  newMode  ) 

Clear and set the mode of this KoPicture

Paramètres:
newMode a file extension (like "png") giving the wanted mode

Définition à la ligne 182 du fichier KoPicture.cpp.

Références KoPictureShared::clearAndSetMode(), createSharedData(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

void KoPicture::clear ( void   ) 

Reset the KoPicture (but not the key!)

Définition à la ligne 177 du fichier KoPicture.cpp.

Références unlinkSharedData().

Voici le graphe d'appel pour cette fonction :

bool KoPicture::loadFromFile ( const QString &  fileName  ) 

Load the picture from a file named fileName

Définition à la ligne 210 du fichier KoPicture.cpp.

Références createSharedData(), KoPictureShared::loadFromFile(), et m_sharedData.

Référencé par KoPictureCollection::loadPicture(), setKeyAndDownloadPicture(), et KoPictureFilePreviewWidget::setPicture().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

bool KoPicture::loadFromBase64 ( const QByteArray &  str  ) 

Load the picture from base64-encoded data

Définition à la ligne 217 du fichier KoPicture.cpp.

Références createSharedData(), KoPictureShared::loadFromBase64(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

bool KoPicture::loadXpm ( QIODevice *  io  ) 

Load a potentially broken XPM file (for old files of KPresenter)

Définition à la ligne 149 du fichier KoPicture.cpp.

Références createSharedData(), KoPictureShared::loadXpm(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

QPixmap KoPicture::generatePixmap ( const QSize &  size,
bool  smoothScale = false 
)

Obsolète:
To be replaced by KoPicture::draw
Returns a QPixmap from an image Returns an empty QPixmap if the KoPicture is not an image.

Définition à la ligne 230 du fichier KoPicture.cpp.

Références KoPictureShared::generatePixmap(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

bool KoPicture::setKeyAndDownloadPicture ( const KUrl &  url,
QWidget *  window 
)

Download and set the key for a possibly remote file.

Paramètres:
url the url to download from
window the parent widget for the download. You can pass NULL (0) if you absolutely cannot find a parent widget to use.

Définition à la ligne 237 du fichier KoPicture.cpp.

Références loadFromFile(), testguiform::result, setKey(), et KoPictureKey::setKeyFromFile().

Référencé par KoPictureCollection::downloadPicture(), et KoPictureFilePreviewWidget::setPicture().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QImage KoPicture::generateImage ( const QSize &  size  ) 

Generate a QImage (always in slow mode)

Paramètres:
size the wanted size for the QImage

Définition à la ligne 261 du fichier KoPicture.cpp.

Références KoPictureShared::generateImage(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

bool KoPicture::hasAlphaBuffer (  )  const

Renvoie:
TRUE if the alpha channel processing has been enabled

Définition à la ligne 268 du fichier KoPicture.cpp.

Références KoPictureShared::hasAlphaBuffer(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

void KoPicture::setAlphaBuffer ( bool  enable  ) 

Respect the image alpha buffer

Définition à la ligne 275 du fichier KoPicture.cpp.

Références m_sharedData, et KoPictureShared::setAlphaBuffer().

Voici le graphe d'appel pour cette fonction :

QImage KoPicture::createAlphaMask ( Qt::ImageConversionFlags  flags = Qt::AutoColor  )  const

Creates an alpha mask for the picture (first you have to call setAlphaBuffer).

Voir également:
hasAlphaBuffer() setAlphaBuffer()

Définition à la ligne 281 du fichier KoPicture.cpp.

Références KoPictureShared::createAlphaMask(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

void KoPicture::clearCache ( void   ) 

Clear any cache.

This is used to avoid using too much memory especially if the application somehow also caches the KoPicture's output

Définition à la ligne 288 du fichier KoPicture.cpp.

Références KoPictureShared::clearCache(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

QString KoPicture::uniquePictureId (  )  const

Définition à la ligne 65 du fichier KoPicture.cpp.

Références m_sharedData, et KoPictureShared::uniquePictureId().

Référencé par KoPictureCollection::getOasisFileName().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPicture::assignPictureId ( uint  _id  ) 

Définition à la ligne 59 du fichier KoPicture.cpp.

Références KoPictureShared::assignPictureId(), et m_sharedData.

Voici le graphe d'appel pour cette fonction :

void KoPicture::unlinkSharedData ( void   )  [protected]

Définition à la ligne 86 du fichier KoPicture.cpp.

Références m_sharedData.

Référencé par clear(), operator=(), et ~KoPicture().

Voici le graphe d'appel pour cette fonction :

void KoPicture::linkSharedData ( void   )  const [protected]

Définition à la ligne 94 du fichier KoPicture.cpp.

Références m_sharedData.

Référencé par operator=().

Voici le graphe d'appel pour cette fonction :

void KoPicture::createSharedData ( void   )  [protected]

Définition à la ligne 100 du fichier KoPicture.cpp.

Références m_sharedData.

Référencé par clearAndSetMode(), load(), loadFromBase64(), loadFromFile(), et loadXpm().

Voici le graphe d'appel pour cette fonction :

QString KoPicture::uniqueName (  )  const [protected]

Définition à la ligne 48 du fichier KoPicture.cpp.

Références m_uniqueName.


Documentation des données membres

KoPictureKey KoPicture::m_key [protected]

Définition à la ligne 248 du fichier KoPicture.h.

Référencé par getKey(), operator=(), et setKey().

KoPictureShared* KoPicture::m_sharedData [protected]

Définition à la ligne 253 du fichier KoPicture.h.

Référencé par assignPictureId(), clearAndSetMode(), clearCache(), createAlphaMask(), createSharedData(), dragObject(), draw(), generateImage(), generatePixmap(), getExtension(), getMimeType(), getOriginalSize(), getType(), hasAlphaBuffer(), isNull(), KoPicture(), linkSharedData(), load(), loadFromBase64(), loadFromFile(), loadXpm(), operator=(), save(), saveAsBase64(), setAlphaBuffer(), uniquePictureId(), et unlinkSharedData().

uint KoPicture::uniqueValue [static, protected]

Définition à la ligne 254 du fichier KoPicture.h.

Référencé par KoPicture().

QString KoPicture::m_uniqueName [protected]

Définition à la ligne 256 du fichier KoPicture.h.

Référencé par KoPicture(), et uniqueName().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:48:04 2006 pour KPlato par  doxygen 1.5.1-p1