libs/flake
KoImageCollection Class Reference
An collection of KoImageData objects to allow loading and saving them all together to the KoStore. More...
#include <KoImageCollection.h>

Public Member Functions | |
| KoImageCollection () | |
| virtual | ~KoImageCollection () |
| void | add (const KoImageData &data) |
| bool | completeLoading (KoStore *store) |
| bool | completeSaving (KoStore *store, KoXmlWriter *manifestWriter, KoShapeSavingContext *context) |
| int | count () const |
| KoImageData * | createExternalImageData (const QUrl &url) |
| KoImageData * | createImageData (const QByteArray &imageData) |
| KoImageData * | createImageData (const QString &href, KoStore *store) |
| KoImageData * | createImageData (const QImage &image) |
| void | remove (const KoImageData &data) |
| void | removeOnKey (qint64 imageDataKey) |
| int | size () const |
Detailed Description
An collection of KoImageData objects to allow loading and saving them all together to the KoStore.
It also makes sure that if the same image is added to the collection that they share the internal data structure.
Definition at line 35 of file KoImageCollection.h.
Constructor & Destructor Documentation
| KoImageCollection::KoImageCollection | ( | ) |
constructor
Definition at line 47 of file KoImageCollection.cpp.
| KoImageCollection::~KoImageCollection | ( | ) | [virtual] |
Definition at line 52 of file KoImageCollection.cpp.
Member Function Documentation
| void KoImageCollection::add | ( | const KoImageData & | data | ) |
| bool KoImageCollection::completeLoading | ( | KoStore * | store | ) | [virtual] |
| bool KoImageCollection::completeSaving | ( | KoStore * | store, | |
| KoXmlWriter * | manifestWriter, | |||
| KoShapeSavingContext * | context | |||
| ) | [virtual] |
Save all images to the store which are in the context.
- Returns:
- returns true if save was successful (no images failed).
Implements KoDataCenter.
Definition at line 64 of file KoImageCollection.cpp.
| int KoImageCollection::count | ( | ) | const |
Definition at line 193 of file KoImageCollection.cpp.
| KoImageData * KoImageCollection::createExternalImageData | ( | const QUrl & | url | ) |
Create a data object for the image data.
The collection will create an image data in a way that if there is an existing data object with the same image the returned KoImageData will share its data.
- Parameters:
-
url a valid, local url to point to an image on the filesystem.
- See also:
- KoImageData::isValid()
Definition at line 121 of file KoImageCollection.cpp.
| KoImageData * KoImageCollection::createImageData | ( | const QByteArray & | imageData | ) |
Create a data object for the image data.
The collection will create an image data in a way that if there is an existing data object with the same image the returned KoImageData will share its data.
- Parameters:
-
imageData the bytes that represent the image in a format like png.
- See also:
- KoImageData::isValid()
Definition at line 159 of file KoImageCollection.cpp.
| KoImageData * KoImageCollection::createImageData | ( | const QString & | href, | |
| KoStore * | store | |||
| ) |
Create a data object for the image data.
The collection will create an image data in a way that if there is an existing data object with the same image the returned KoImageData will share its data.
- Parameters:
-
href the name of the image inside the store. store the KoStore object.
- See also:
- KoImageData::isValid()
Definition at line 138 of file KoImageCollection.cpp.
| KoImageData * KoImageCollection::createImageData | ( | const QImage & | image | ) |
Create a data object for the image data.
The collection will create an image data in a way that if there is an existing data object with the same image the returned KoImageData will share its data.
- Parameters:
-
image a valid image which will be represented by the imageData.
- See also:
- KoImageData::isValid()
Definition at line 111 of file KoImageCollection.cpp.
| void KoImageCollection::remove | ( | const KoImageData & | data | ) |
| void KoImageCollection::removeOnKey | ( | qint64 | imageDataKey | ) |
Definition at line 198 of file KoImageCollection.cpp.
| int KoImageCollection::size | ( | ) | const |
Get the number of images inside the collection.
Definition at line 188 of file KoImageCollection.cpp.
The documentation for this class was generated from the following files:
