KoPicture Class Reference
KoPicture is a container class for various types of pictures supported by KOffice.A picture container class. More...
#include <koPicture.h>
Collaboration diagram for KoPicture:

Public Member Functions | |
KoPicture (void) | |
~KoPicture (void) | |
KoPicture (const KoPicture &other) | |
KoPicture & | operator= (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) |
QDragObject * | dragObject (QWidget *dragSource=0L, const char *name=0L) |
bool | load (QIODevice *io, const QString &extension) |
bool | save (QIODevice *io) const |
bool | saveAsKOffice1Dot1 (QIODevice *io) const |
bool | saveAsBase64 (KoXmlWriter &writer) const |
QString | getExtension (void) const |
QString | getMimeType (void) const |
QString | getExtensionAsKOffice1Dot1 (void) const |
QSize | getOriginalSize (void) const |
void | clearAndSetMode (const QString &newMode) |
void | clear (void) |
bool | loadFromFile (const QString &fileName) |
bool | loadFromBase64 (const QCString &str) |
bool | loadXpm (QIODevice *io) |
QPixmap | generatePixmap (const QSize &size, bool smoothScale=false) |
bool | isClipartAsKOffice1Dot1 (void) const |
bool | setKeyAndDownloadPicture (const KURL &url, QWidget *window) |
QImage | generateImage (const QSize &size) |
bool | hasAlphaBuffer () const |
void | setAlphaBuffer (bool enable) |
QImage | createAlphaMask (int conversion_flags=0) const |
void | clearCache (void) |
QString | uniquePictureId () const |
void | assignPictureId (uint _id) |
Protected Member Functions | |
void | unlinkSharedData (void) |
void | linkSharedData (void) const |
void | createSharedData (void) |
QString | uniqueName () const |
Protected Attributes | |
KoPictureKey | m_key |
KoPictureShared * | m_sharedData |
QString | m_uniqueName |
Static Protected Attributes | |
static uint | uniqueValue = 0 |
Detailed Description
KoPicture is a container class for various types of pictures supported by KOffice.A picture container class.
Definition at line 43 of file koPicture.h.
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 36 of file koPicture.cc. |
|
Destructor.
Definition at line 41 of file koPicture.cc. |
|
Copy constructor.
Definition at line 51 of file koPicture.cc. |
Member Function Documentation
|
Assignment operator.
Definition at line 71 of file koPicture.cc. |
|
Retrieve the key structure describing the picture in a unique way.
Definition at line 114 of file koPicture.cc. Referenced by KoPictureCollection::downloadPicture(), KoPictureCollection::getOasisFileName(), and KoPictureCollection::insertPicture(). |
|
Set the key structure describing the picture in a unique way.
Definition at line 119 of file koPicture.cc. Referenced by KoPictureCollection::findPicture(), KoPictureCollection::insertPicture(), and setKeyAndDownloadPicture(). |
|
Returns true if the picture is null.
Definition at line 125 of file koPicture.cc. Referenced by KoPictureCollection::insertPicture(), KoPictureCollection::loadPicture(), KoPictureCollection::readFromStore(), and KoPictureCollection::saveXML(). |
|
Draw the picture in a painter.
The parameter
The parameters
The other parameters are very similar to QPainter::drawPixmap : ( Definition at line 132 of file koPicture.cc. |
|
Create a dragobject containing this picture.
Definition at line 276 of file koPicture.cc. |
|
Save picture into a QIODevice.
Definition at line 159 of file koPicture.cc. |
|
Save picture in the format supported by KOffice 1.1.
Definition at line 168 of file koPicture.cc. |
|
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();
Definition at line 178 of file koPicture.cc. |
|
Definition at line 196 of file koPicture.cc. |
|
Definition at line 210 of file koPicture.cc. |
|
Definition at line 238 of file koPicture.cc. |
|
Clear and set the mode of this KoPicture.
Definition at line 190 of file koPicture.cc. |
|
Reset the KoPicture (but not the key!).
Definition at line 185 of file koPicture.cc. |
|
Load the picture from a file named
Definition at line 225 of file koPicture.cc. Referenced by KoPictureCollection::loadPicture(), and setKeyAndDownloadPicture(). |
|
Load the picture from base64-encoded data.
Definition at line 232 of file koPicture.cc. |
|
Load a potentially broken XPM file (for old files of KPresenter).
Definition at line 147 of file koPicture.cc. |
|
Definition at line 245 of file koPicture.cc. |
|
Helper function for saving.
Definition at line 252 of file koPicture.cc. |
|
Download and set the key for a possibly remote file.
Definition at line 259 of file koPicture.cc. References loadFromFile(), setKey(), and KoPictureKey::setKeyFromFile(). Referenced by KoPictureCollection::downloadPicture(). |
|
Generate a QImage (always in slow mode).
Definition at line 283 of file koPicture.cc. |
|
Definition at line 290 of file koPicture.cc. |
|
Respect the image alpha buffer.
Definition at line 297 of file koPicture.cc. |
|
Creates an alpha mask for the picture (first you have to call setAlphaBuffer).
Definition at line 303 of file koPicture.cc. |
|
Clear any cache. This is used to avoid using too much memory especially if the application somehow also caches the KoPicture's output Definition at line 310 of file koPicture.cc. |
The documentation for this class was generated from the following files: