37 abrTag->setUrl(QFileInfo(
m_location).fileName());
38 abrTag->setName(QFileInfo(
m_location).fileName());
39 abrTag->setComment(QFileInfo(
m_location).fileName());
40 abrTag->setFilename(QFileInfo(
m_location).fileName());
42 abrTag->setValid(
true);
45 brushes << brush->filename();
47 abrTag->setDefaultResources(brushes);
138 int indexOfUnderscore = url.lastIndexOf(
"_");
139 QString filenameUrl = url;
141 filenameUrl.remove(indexOfUnderscore, url.length() - indexOfUnderscore);
142 item.
folder = filenameUrl;
KIS_DECLARE_STATIC_INITIALIZER
AbrIterator(KisAbrBrushCollectionSP brushCollection, const QString &resourceType)
QSharedPointer< QMap< QString, KisAbrBrushSP > > m_brushesMap
void next() override
The iterator is only valid if next() has been called at least once.
QMap< QString, KisAbrBrushSP >::const_iterator m_brushCollectionIterator
QString type() const override
QDateTime lastModified() const override
QString url() const override
KoResourceSP resourceImpl() const override
This only loads the resource when called.
KisAbrBrushCollectionSP m_brushCollection
KisAbrBrushSP m_currentResource
bool hasNext() const override
KisTagSP tag() const override
A tag object on which we can set properties and which we can save.
bool hasNext() const override
KisAbrBrushCollectionSP m_brushCollection
AbrTagIterator(KisAbrBrushCollectionSP brushCollection, const QString &location, const QString &resourceType)
void next() override
The iterator is only valid if next() has been called at least once.
bool loadVersionedResource(KoResourceSP resource) override
QSharedPointer< KisResourceStorage::TagIterator > tags(const QString &resourceType) override
KisAbrStorage(const QString &location)
KisAbrBrushCollectionSP m_brushCollection
KoResourceSP resource(const QString &url) override
QSharedPointer< KisResourceStorage::ResourceIterator > resources(const QString &resourceType) override
bool supportsVersioning() const override
QImage thumbnail() const override
KisResourceStorage::ResourceItem resourceItem(const QString &url) override
void addStoragePluginFactory(KisResourceStorage::StorageType storageType, KisStoragePluginFactoryBase *factory)
static KisStoragePluginRegistry * instance()
The KisTag loads a tag from a .tag file. A .tag file is a .desktop file. The following fields are imp...
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
A resource item is simply an entry in the storage,.