lib
KoPictureCollection.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef koPictureCollection_h
00023 #define koPictureCollection_h
00024
00025 #include <qmap.h>
00026 #include <qdom.h>
00027 #include <qvaluelist.h>
00028
00029 #include "KoPicture.h"
00030
00031 class KURL;
00032
00033 class KoStore;
00034 class KoXmlWriter;
00035
00040 class KOFFICECORE_EXPORT KoPictureCollection : public QMap<KoPictureKey, KoPicture>
00041 {
00042 public:
00043 enum Type {
00045 CollectionPicture=0,
00047 CollectionImage,
00049 CollectionClipart
00050 };
00051
00055 KoPicture findPicture( const KoPictureKey &key ) const;
00056
00060 KoPicture insertPicture( const KoPictureKey& key, const KoPicture& picture );
00061
00066 KoPicture insertPicture( const KoPicture& picture );
00067
00077 KoPicture downloadPicture(const KURL& url, QWidget *window);
00078
00086 KoPicture loadPicture( const QString &fileName );
00087
00099 bool saveToStore(const Type pictureType, KoStore * store, const QValueList<KoPictureKey>& keys );
00100
00109 QDomElement saveXML(const Type pictureType, QDomDocument &doc,
00110 QValueList<KoPictureKey> keys );
00111
00112 bool saveOasisToStore( KoStore *store, QValueList<KoPictureKey> keys, KoXmlWriter* manifestWriter );
00113
00114
00115 typedef QMap<KoPictureKey, QString> StoreMap;
00123 StoreMap readXML( QDomElement &pixmapsElem );
00124
00128 void readXML( QDomElement& pixmapsElem, QMap <KoPictureKey, QString>& map );
00129
00135 void readFromStore( KoStore * store, const StoreMap & storeMap );
00136
00147 KoPicture findOrLoad(const QString& fileName, const QDateTime& dateTime);
00148
00153 QString getOasisFileName(const KoPicture& picture) const;
00154
00158 void assignUniqueIds();
00159
00160
00161 private:
00165 QString getFileName(const Type pictureType, KoPicture& picture, int& counter);
00166
00167 class Private;
00168 Private* d;
00169 };
00170
00171 #endif
|