|
Krita Source Code Documentation
|
#include <KoShapeLoadingContext.h>
Inheritance diagram for KoShapeLoadingContext:Classes | |
| struct | AdditionalAttributeData |
Public Member Functions | |
| void | addLayer (KoShapeLayer *layer, const QString &layerName) |
| Adds a new layer to be referenced by the given name later. | |
| void | addShapeId (KoShape *shape, const QString &id) |
| register the id for a specific shape | |
| void | addShapeSubItemId (KoShape *shape, const QVariant &subItem, const QString &id) |
| register the id for a specific shape sub item | |
| void | addSharedData (const QString &id, KoSharedLoadingData *data) |
| void | clearLayers () |
| KoDocumentResourceManager * | documentResourceManager () const |
| KoShapeLoadingContext (KoStore *store, KoDocumentResourceManager *documentResources) | |
| KoShapeLayer * | layer (const QString &layerName) |
| Returns layer referenced by given name. | |
| QString | mimeTypeForPath (const QString &href, bool b=true) |
| Private (KoStore *store, KoDocumentResourceManager *resourceManager) | |
| KoSectionModel * | sectionModel () |
| returns the current section model | |
| void | setSectionModel (KoSectionModel *sectionModel) |
| sets the section model for the loading context | |
| void | setZIndex (int index) |
| Set z-index. | |
| KoShape * | shapeById (const QString &id) |
| return the shape formerly registered using addShapeId() | |
| void | shapeLoaded (KoShape *shape) |
| QPair< KoShape *, QVariant > | shapeSubItemById (const QString &id) |
| return the shape and subitem formerly registered using addShapeSubItemId() | |
| KoSharedLoadingData * | sharedData (const QString &id) const |
| KoStore * | store () const |
| void | updateShape (const QString &id, KoLoadingShapeUpdater *shapeUpdater) |
| int | zIndex () |
| Get current z-index. | |
| ~KoShapeLoadingContext () | |
| destructor | |
| ~Private () | |
Static Public Member Functions | |
| static void | addAdditionalAttributeData (const AdditionalAttributeData &attributeData) |
| Add an additional attribute that should be loaded during shape loading. | |
| static QSet< AdditionalAttributeData > | additionalAttributeData () |
| Get the additional attribute data for loading of a shape. | |
Public Attributes | |
| KoDocumentResourceManager * | documentResources |
| QMap< QString, KoShape * > | drawIds |
| QMap< QString, KoShapeLayer * > | layers |
| KoSectionModel * | sectionModel |
| QMap< QString, KoSharedLoadingData * > | sharedData |
| KoStore * | store |
| QMap< QString, QPair< KoShape *, QVariant > > | subIds |
| QMultiMap< QString, KoLoadingShapeUpdater * > | updaterById |
| QMultiMap< KoShape *, KoLoadingShapeUpdater * > | updaterByShape |
| int | zIndex |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Context passed to shapes during loading. This class holds various variables as well as a context full of variables which all together form the context of a loading operation.
Definition at line 29 of file KoShapeLoadingContext.cpp.
|
inline |
Definition at line 40 of file KoShapeLoadingContext.cpp.
| KoShapeLoadingContext::KoShapeLoadingContext | ( | KoStore * | store, |
| KoDocumentResourceManager * | documentResources ) |
constructor
| context | the context created for generic ODF loading. |
| documentResources | the data of the shape controller. |
Definition at line 58 of file KoShapeLoadingContext.cpp.
| KoShapeLoadingContext::~KoShapeLoadingContext | ( | ) |
|
static |
Add an additional attribute that should be loaded during shape loading.
An application can use that to set the data for additional attributes that should be loaded during shape loading. If attribute is set it will not change if set again. The tag is used to differentiate the attributes
| attributeData | The data describing the additional attribute data |
Definition at line 170 of file KoShapeLoadingContext.cpp.
References s_additionalAttributes.
|
static |
Get the additional attribute data for loading of a shape.
This is used by KoShape::loadOdfAttributes to load all additional attributes defined in the returned set.
Definition at line 175 of file KoShapeLoadingContext.cpp.
References s_additionalAttributes.
| void KoShapeLoadingContext::addLayer | ( | KoShapeLayer * | layer, |
| const QString & | layerName ) |
Adds a new layer to be referenced by the given name later.
Definition at line 85 of file KoShapeLoadingContext.cpp.
register the id for a specific shape
Definition at line 95 of file KoShapeLoadingContext.cpp.
References d.
| void KoShapeLoadingContext::addShapeSubItemId | ( | KoShape * | shape, |
| const QVariant & | subItem, | ||
| const QString & | id ) |
register the id for a specific shape sub item
Definition at line 110 of file KoShapeLoadingContext.cpp.
References d.
| void KoShapeLoadingContext::addSharedData | ( | const QString & | id, |
| KoSharedLoadingData * | data ) |
Add shared data
This can be use to pass data between shapes on loading. E.g. The decoded text styles of the TextShape. With that the styles only have to be read once and can be used in all shapes that also need them.
The ownership of the added data is passed to the context. The KoShapeLoadingContext will delete the added data when it is destroyed.
Data inserted for a specific id will not be overwritten by calling addSharedData with the same id again.
You get an assertion when the id is already existing.
Definition at line 148 of file KoShapeLoadingContext.cpp.
| void KoShapeLoadingContext::clearLayers | ( | ) |
remove all layers
This can be used for loading different layer sets per page.
Definition at line 90 of file KoShapeLoadingContext.cpp.
References d.
| KoDocumentResourceManager * KoShapeLoadingContext::documentResourceManager | ( | ) | const |
Definition at line 180 of file KoShapeLoadingContext.cpp.
References d.
| KoShapeLayer * KoShapeLoadingContext::layer | ( | const QString & | layerName | ) |
Returns layer referenced by given name.
Definition at line 80 of file KoShapeLoadingContext.cpp.
References d.
| QString KoShapeLoadingContext::mimeTypeForPath | ( | const QString & | href, |
| bool | b = true ) |
Definition at line 73 of file KoShapeLoadingContext.cpp.
|
inline |
Definition at line 32 of file KoShapeLoadingContext.cpp.
| KoSectionModel * KoShapeLoadingContext::sectionModel | ( | ) |
returns the current section model
| void KoShapeLoadingContext::setSectionModel | ( | KoSectionModel * | sectionModel | ) |
sets the section model for the loading context
| sectionModel | the section model to set |
Definition at line 190 of file KoShapeLoadingContext.cpp.
References d, and sectionModel.
| void KoShapeLoadingContext::setZIndex | ( | int | index | ) |
| KoShape * KoShapeLoadingContext::shapeById | ( | const QString & | id | ) |
return the shape formerly registered using addShapeId()
Definition at line 105 of file KoShapeLoadingContext.cpp.
References d.
this checks if there is an updater for this shape if yes it calls it this needs to be done via the shape id and
Definition at line 127 of file KoShapeLoadingContext.cpp.
References d.
| QPair< KoShape *, QVariant > KoShapeLoadingContext::shapeSubItemById | ( | const QString & | id | ) |
return the shape and subitem formerly registered using addShapeSubItemId()
Definition at line 115 of file KoShapeLoadingContext.cpp.
References d.
| KoSharedLoadingData * KoShapeLoadingContext::sharedData | ( | const QString & | id | ) | const |
Get the shared data.
| id | The id used to identify the shared data. |
| KoStore * KoShapeLoadingContext::store | ( | ) | const |
| void KoShapeLoadingContext::updateShape | ( | const QString & | id, |
| KoLoadingShapeUpdater * | shapeUpdater ) |
call function on the shapeUpdater when the shape with the id shapeid is inserted After that destroy the updater.
Definition at line 122 of file KoShapeLoadingContext.cpp.
References d.
| int KoShapeLoadingContext::zIndex | ( | ) |
Get current z-index.
|
private |
Definition at line 180 of file KoShapeLoadingContext.h.
| KoDocumentResourceManager* KoShapeLoadingContext::documentResources |
Definition at line 55 of file KoShapeLoadingContext.cpp.
| QMap<QString, KoShape*> KoShapeLoadingContext::drawIds |
Definition at line 49 of file KoShapeLoadingContext.cpp.
| QMap<QString, KoShapeLayer*> KoShapeLoadingContext::layers |
Definition at line 48 of file KoShapeLoadingContext.cpp.
| KoSectionModel * KoShapeLoadingContext::sectionModel |
Definition at line 56 of file KoShapeLoadingContext.cpp.
| KoSharedLoadingData * KoShapeLoadingContext::sharedData |
Definition at line 51 of file KoShapeLoadingContext.cpp.
| KoStore * KoShapeLoadingContext::store |
Definition at line 46 of file KoShapeLoadingContext.cpp.
| QMap<QString, QPair<KoShape *, QVariant> > KoShapeLoadingContext::subIds |
Definition at line 50 of file KoShapeLoadingContext.cpp.
| QMultiMap<QString, KoLoadingShapeUpdater*> KoShapeLoadingContext::updaterById |
Definition at line 53 of file KoShapeLoadingContext.cpp.
| QMultiMap<KoShape *, KoLoadingShapeUpdater*> KoShapeLoadingContext::updaterByShape |
Definition at line 54 of file KoShapeLoadingContext.cpp.
| int KoShapeLoadingContext::zIndex |
Definition at line 52 of file KoShapeLoadingContext.cpp.