libs/flake
KoShapeLoadingContext.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KOSHAPELOADINGCONTEXT_H
00022 #define KOSHAPELOADINGCONTEXT_H
00023
00024 #include <QMap>
00025 #include <QSet>
00026 #include <QString>
00027
00028 #include "flake_export.h"
00029
00030 class KoOdfLoadingContext;
00031 class KoShapeLayer;
00032 class KoShape;
00033 class KoShapeControllerBase;
00034 class KoLoadingShapeUpdater;
00035 class KoImageCollection;
00036 class KoSharedLoadingData;
00037 class KoDataCenter;
00038
00044 class FLAKE_EXPORT KoShapeLoadingContext
00045 {
00046 public:
00055 struct AdditionalAttributeData {
00056 AdditionalAttributeData(const char * const ns, const char * const tag, const char * name)
00057 : ns(ns)
00058 , tag(tag)
00059 , name(name) {
00060 }
00061
00062 const char * const ns;
00063 const char * const tag;
00064 const char * const name;
00065
00066 bool operator==(const AdditionalAttributeData & other) const {
00067 return (qstrcmp(name, other.name) == 0);
00068 }
00069 };
00070
00077 KoShapeLoadingContext(KoOdfLoadingContext & context, const QMap<QString, KoDataCenter *> & dataCenterMap);
00078
00080 ~KoShapeLoadingContext();
00081
00083 KoOdfLoadingContext & odfLoadingContext();
00084
00086 KoShapeLayer * layer(const QString & layerName);
00088 void addLayer(KoShapeLayer * layer, const QString & layerName);
00089
00095 void clearLayers();
00096
00098 void addShapeId(KoShape * shape, const QString & id);
00100 KoShape * shapeById(const QString & id);
00101
00106 void updateShape(const QString & id, KoLoadingShapeUpdater * shapeUpdater);
00107
00112 void shapeLoaded(KoShape * shape);
00113
00115 KoImageCollection * imageCollection();
00116
00118 int zIndex();
00119
00121 void setZIndex(int index);
00122
00140 void addSharedData(const QString & id, KoSharedLoadingData * data);
00141
00150 KoSharedLoadingData * sharedData(const QString & id) const;
00151
00162 static void addAdditionalAttributeData(const AdditionalAttributeData & attributeData);
00163
00170 static QSet<AdditionalAttributeData> additionalAttributeData();
00171
00177 KoDataCenter * dataCenter(const QString & dataCenterName);
00178
00182 QMap<QString, KoDataCenter *> dataCenterMap() const;
00183
00184 private:
00185
00186 class Private;
00187 Private * const d;
00188 };
00189
00190 #endif
|