41 static const QString resourceLocationKey;
61 LocatorError initialize(
const QString &installationResourcesLocation);
74 QString resourceLocationBase()
const;
79 void purge(
const QString &storageLocation);
96 bool removeStorage(
const QString &storageLocation);
103 bool hasStorage(
const QString &storageLocation);
109 static void saveTags();
114 void purgeTag(
const QString tagUrl,
const QString resourceType);
123 void updateFontStorage();
169 friend class TestResourceLocator;
170 friend class TestResourceModel;
180 bool resourceCached(QString storageLocation,
const QString &resourceType,
const QString &filename)
const;
195 KoResourceSP resource(QString storageLocation,
const QString &resourceType,
const QString &filename);
210 bool setResourceActive(
int resourceId,
bool active);
219 KoResourceSP importResourceFromFile(
const QString &resourceType,
const QString &fileName,
const bool allowOverwrite,
const QString &storageLocation = QString());
229 KoResourceSP importResource(
const QString &resourceType,
const QString &fileName, QIODevice *device,
const bool allowOverwrite,
const QString &storageLocation = QString());
237 bool importWillOverwriteResource(
const QString &resourceType,
const QString &fileName,
const QString &storageLocation = QString())
const;
245 bool exportResource(
KoResourceSP resource, QIODevice *device);
254 bool addResource(
const QString &resourceType,
const KoResourceSP resource,
const QString &storageLocation = QString());
262 bool updateResource(
const QString &resourceType,
const KoResourceSP resource);
271 bool reloadResource(
const QString &resourceType,
const KoResourceSP resource);
278 QMap<QString, QVariant> metaDataForResource(
int id)
const;
286 bool setMetaDataForResource(
int id, QMap<QString, QVariant> map)
const;
293 QMap<QString, QVariant> metaDataForStorage(
const QString &storageLocation)
const;
300 void setMetaDataForStorage(
const QString &storageLocation, QMap<QString, QVariant> map)
const;
315 KisTagSP tagForUrl(
const QString &tagUrl,
const QString resourceType);
323 static KisTagSP tagForUrlNoCache(
const QString &tagUrl,
const QString resourceType);
337 LocatorError firstTimeInstallation(InitializationStatus initializationStatus,
const QString &installationResourcesLocation);
340 bool synchronizeDb();
359 QString makeStorageLocationAbsolute(QString storageLocation)
const;
360 QString makeStorageLocationRelative(QString location)
const;
363 QScopedPointer<Private>
d;