lib
KoPictureCollection Class Reference
#include <KoPictureCollection.h>
Detailed Description
A collection of pictures (a key and the picture itself).
Definition at line 40 of file KoPictureCollection.h.
Public Types | |
typedef QMap< KoPictureKey, QString > | StoreMap |
enum | Type { CollectionPicture = 0, CollectionImage, CollectionClipart } |
Public Member Functions | |
KoPicture | findPicture (const KoPictureKey &key) const |
KoPicture | insertPicture (const KoPictureKey &key, const KoPicture &picture) |
KoPicture | insertPicture (const KoPicture &picture) |
KoPicture | downloadPicture (const KURL &url, QWidget *window) |
KoPicture | loadPicture (const QString &fileName) |
bool | saveToStore (const Type pictureType, KoStore *store, const QValueList< KoPictureKey > &keys) |
QDomElement | saveXML (const Type pictureType, QDomDocument &doc, QValueList< KoPictureKey > keys) |
bool | saveOasisToStore (KoStore *store, QValueList< KoPictureKey > keys, KoXmlWriter *manifestWriter) |
StoreMap | readXML (QDomElement &pixmapsElem) |
void | readXML (QDomElement &pixmapsElem, QMap< KoPictureKey, QString > &map) |
void | readFromStore (KoStore *store, const StoreMap &storeMap) |
KoPicture | findOrLoad (const QString &fileName, const QDateTime &dateTime) |
QString | getOasisFileName (const KoPicture &picture) const |
void | assignUniqueIds () |
Member Enumeration Documentation
|
Definition at line 43 of file KoPictureCollection.h. |
Member Function Documentation
|
Call it before to save Oasis file.
Definition at line 316 of file KoPictureCollection.cpp. |
|
Download a possibly remote file. If this file is really remote, it is always downloaded. If the file is local, it acts as loadPicture.
Definition at line 75 of file KoPictureCollection.cpp. |
|
Definition at line 305 of file KoPictureCollection.cpp. |
|
Looks for a clipart in the collection, returns a new KoPicture with that key if not found.
Definition at line 35 of file KoPictureCollection.cpp. |
|
Return filename as url for picture.
Definition at line 139 of file KoPictureCollection.cpp. |
|
Inserts a picture into the collection, if not already there Same as above, but takes the key from the
Definition at line 70 of file KoPictureCollection.cpp. |
|
Inserts a picture into the collection, if not already there.
Definition at line 52 of file KoPictureCollection.cpp. |
|
Load a clipart from a file (and insert into the collection). The modification date of the file is checked, to create the key for this clipart. If this key maps to an existing clipart in the collection, then this picture is returned, otherwise the file is loaded. Definition at line 102 of file KoPictureCollection.cpp. |
|
Read all pictures from the store, into this collection The map comes from readXML, and is used to find which pictures to load, and which key to associate them.
Definition at line 254 of file KoPictureCollection.cpp. |
|
Helper method for readFromStore.
Definition at line 229 of file KoPictureCollection.cpp. |
|
Read the <PICTURES>, <PIXMAPS> or <CLIPARTS> tag, and save the result (key<->store-filename associations) into the QMap. You may want to 'new' a QMap in loadXML, and to use and then delete it in completeLoading (to save memory).
Definition at line 247 of file KoPictureCollection.cpp. |
|
Save the used picturess from the collection into the store Usually called from completeSaving().
Definition at line 151 of file KoPictureCollection.cpp. |
|
Generate the <PICTURES>, <PIXMAPS> or <CLIPARTS> tag, that saves the key and the related relative path in the store (e.g. pictures/picture1.png) for each picture.
Definition at line 202 of file KoPictureCollection.cpp. |
The documentation for this class was generated from the following files: