#include <KoPictureCollection.h>
Types publics | |
enum | Type { CollectionPicture = 0, CollectionImage, CollectionClipart } |
typedef QMap< KoPictureKey, QString > | StoreMap |
Fonctions membres publiques | |
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) |
Download a possibly remote file. | |
KoPicture | loadPicture (const QString &fileName) |
Load a clipart from a file (and insert into the collection). | |
bool | saveToStore (const Type pictureType, KoStore *store, const Q3ValueList< KoPictureKey > &keys) |
QDomElement | saveXML (const Type pictureType, QDomDocument &doc, Q3ValueList< KoPictureKey > keys) |
bool | saveOasisToStore (KoStore *store, Q3ValueList< 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 () |
Fonctions membres privées | |
QString | getFileName (const Type pictureType, KoPicture &picture, int &counter) |
Attributs privés | |
Private * | d |
Définition à la ligne 41 du fichier KoPictureCollection.h.
typedef QMap<KoPictureKey, QString> KoPictureCollection::StoreMap |
Définition à la ligne 116 du fichier KoPictureCollection.h.
CollectionPicture | collection with mixed pictures |
CollectionImage | collection with images only |
CollectionClipart | collection with cliparts only |
Définition à la ligne 44 du fichier KoPictureCollection.h.
KoPicture KoPictureCollection::findPicture | ( | const KoPictureKey & | key | ) | const |
Looks for a clipart in the collection, returns a new KoPicture with that key if not found.
Définition à la ligne 35 du fichier KoPictureCollection.cpp.
Références KoPicture::setKey(), et KoPictureKey::toString().
Référencé par insertPicture(), loadPicture(), readFromStore(), saveOasisToStore(), saveToStore(), et saveXML().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoPicture KoPictureCollection::insertPicture | ( | const KoPictureKey & | key, | |
const KoPicture & | picture | |||
) |
Inserts a picture into the collection, if not already there
Définition à la ligne 52 du fichier KoPictureCollection.cpp.
Références findPicture(), KoPicture::isNull(), KoPicture::setKey(), et KoPictureKey::toString().
Référencé par downloadPicture(), insertPicture(), loadPicture(), et readFromStore().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
Inserts a picture into the collection, if not already there Same as above, but takes the key from the picture
Définition à la ligne 70 du fichier KoPictureCollection.cpp.
Références KoPicture::getKey(), et insertPicture().
Voici le graphe d'appel pour cette fonction :
KoPicture KoPictureCollection::downloadPicture | ( | const KUrl & | url, | |
QWidget * | window | |||
) |
Download a possibly remote file.
If this file is really remote, it is always downloaded. If the file is local, it acts as loadPicture.
url | the URL to download from | |
window | the parent window for the download. You can pass NULL (0) if you absolutely cannot find anything to use. |
Définition à la ligne 75 du fichier KoPictureCollection.cpp.
Références KoPicture::getKey(), insertPicture(), loadPicture(), et KoPicture::setKeyAndDownloadPicture().
Voici le graphe d'appel pour cette fonction :
KoPicture KoPictureCollection::loadPicture | ( | const QString & | fileName | ) |
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.
Définition à la ligne 102 du fichier KoPictureCollection.cpp.
Références findPicture(), insertPicture(), KoPicture::isNull(), KoPicture::loadFromFile(), et KoPictureKey::setKeyFromFile().
Référencé par downloadPicture(), et findOrLoad().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
bool KoPictureCollection::saveToStore | ( | const Type | pictureType, | |
KoStore * | store, | |||
const Q3ValueList< KoPictureKey > & | keys | |||
) |
Save the used picturess from the collection into the store Usually called from completeSaving().
pictureType | type for the stored picture | |
store | the store in which to save the pictures | |
keys | the list of keys corresponding to the pictures to save |
Définition à la ligne 151 du fichier KoPictureCollection.cpp.
Références findPicture(), getFileName(), et KoStore::open().
Voici le graphe d'appel pour cette fonction :
QDomElement KoPictureCollection::saveXML | ( | const Type | pictureType, | |
QDomDocument & | doc, | |||
Q3ValueList< KoPictureKey > | keys | |||
) |
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.
pictureType | the type of the collection | |
doc | the DOM document in which the tags are to be generated | |
keys | the list of keys |
Définition à la ligne 202 du fichier KoPictureCollection.cpp.
Références CollectionClipart, CollectionImage, findPicture(), et getFileName().
Voici le graphe d'appel pour cette fonction :
bool KoPictureCollection::saveOasisToStore | ( | KoStore * | store, | |
Q3ValueList< KoPictureKey > | keys, | |||
KoXmlWriter * | manifestWriter | |||
) |
Définition à la ligne 177 du fichier KoPictureCollection.cpp.
Références KoXmlWriter::addManifestEntry(), findPicture(), getOasisFileName(), et KoStore::open().
Voici le graphe d'appel pour cette fonction :
KoPictureCollection::StoreMap KoPictureCollection::readXML | ( | QDomElement & | pixmapsElem | ) |
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).
pixmapsElem | the <PICTURES>, <PIXMAPS> or <CLIPARTS> element |
Définition à la ligne 247 du fichier KoPictureCollection.cpp.
void KoPictureCollection::readXML | ( | QDomElement & | pixmapsElem, | |
QMap< KoPictureKey, QString > & | map | |||
) |
Helper method for readFromStore
Définition à la ligne 229 du fichier 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.
Définition à la ligne 254 du fichier KoPictureCollection.cpp.
Références KoStore::close(), findPicture(), insertPicture(), KoPicture::isNull(), KoPicture::load(), KoStore::open(), et gensymbolfontmap::pos.
Voici le graphe d'appel pour cette fonction :
KoPicture KoPictureCollection::findOrLoad | ( | const QString & | fileName, | |
const QDateTime & | dateTime | |||
) |
fileName | the name of the file to read from disk if needed | |
dateTime | the date and time |
Définition à la ligne 305 du fichier KoPictureCollection.cpp.
Références loadPicture().
Voici le graphe d'appel pour cette fonction :
QString KoPictureCollection::getOasisFileName | ( | const KoPicture & | picture | ) | const |
Return filename as url for picture
Définition à la ligne 139 du fichier KoPictureCollection.cpp.
Références KoPicture::getExtension(), KoPicture::getKey(), KoPictureKey::toString(), et KoPicture::uniquePictureId().
Référencé par saveOasisToStore().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoPictureCollection::assignUniqueIds | ( | ) |
Call it before to save Oasis file
Définition à la ligne 316 du fichier KoPictureCollection.cpp.
QString KoPictureCollection::getFileName | ( | const Type | pictureType, | |
KoPicture & | picture, | |||
int & | counter | |||
) | [private] |
Définition à la ligne 125 du fichier KoPictureCollection.cpp.
Références CollectionClipart, et KoPicture::getExtension().
Référencé par saveToStore(), et saveXML().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
Private* KoPictureCollection::d [private] |
Définition à la ligne 168 du fichier KoPictureCollection.h.