|
Krita Source Code Documentation
|
#include <TagFilterProxyModelQmlWrapper.h>
Inheritance diagram for FontFamilyTagFilterModel:Public Member Functions | |
| bool | additionalResourceNameChecks (const QModelIndex &index, const KisResourceSearchBoxFilter *filter) const override |
| additionalResourceNameChecks Some resources, like fonts, have multiple names that need to be tested. Implementers should override this function if they want additional checks on the name. | |
| QVariant | data (const QModelIndex &index, int role) const override |
| FontFamilyTagFilterModel (QObject *parent=nullptr) | |
Public Member Functions inherited from KisTagFilterResourceProxyModel | |
| bool | addResource (KoResourceSP resource, const QString &storageId=QString()) override |
| addResource adds the given resource to the database and storage. If the resource already exists in the given storage with md5, filename or name, the existing resource will be updated instead. If the existing resource was inactive, it will be active (undeleted). | |
| KisTagSP | currentTagFilter () const |
| currentTagFilter | |
| bool | exportResource (KoResourceSP resource, QIODevice *device) override |
| exportResource exports a resource into a QIODevice | |
| bool | filterInCurrentTag () const |
| KoResourceSP | importResource (const QString &filename, QIODevice *device, const bool allowOverwrite, const QString &storageId=QString()) override |
| importResource imports a resource from a QIODevice | |
| KoResourceSP | importResourceFile (const QString &filename, const bool allowOverwrite, const QString &storageId=QString()) override |
| importResourceFile | |
| bool | importWillOverwriteResource (const QString &fileName, const QString &storageLocation) const override |
| importWillOverwriteResource checks is importing a resource with this filename will overwrite anything | |
| QModelIndex | indexForResource (KoResourceSP resource) const override |
| indexFromResource | |
| QModelIndex | indexForResourceId (int resourceId) const override |
| indexFromResource | |
| int | isResourceTagged (const KisTagSP tag, const int resourceId) |
| KisTagFilterResourceProxyModel (const QString &resourceType, QObject *parent=0) | |
| bool | reloadResource (KoResourceSP resource) override |
| reloadResource | |
| bool | renameResource (KoResourceSP resource, const QString &name) override |
| renameResource name the given resource. The resource will have its name field reset, will be saved to the storage and there will be a new version created in the database. | |
| KoResourceSP | resourceForIndex (QModelIndex index=QModelIndex()) const override |
| resourceForIndex returns a properly versioned and id'ed resource object | |
| void | setFilterInCurrentTag (bool filterInCurrentTag) |
| void | setMetaDataFilter (QMap< QString, QVariant > metaDataMap) |
| setMetaDataFilter provides a set of metadata to filter on, for instance by paintop id category. | |
| bool | setResourceActive (const QModelIndex &index, bool value) override |
| setResourceActive changes 'active' state of the resource | |
| void | setResourceFilter (const KoResourceSP resource) |
| setResourceFilter sets the resource to filter with | |
| void | setResourceFilter (ResourceFilter filter) override |
| bool | setResourceMetaData (KoResourceSP resource, QMap< QString, QVariant > metadata) override |
| setResourceMetaData | |
| void | setResourceModel (KisResourceModel *resourceModel) |
| void | setSearchText (const QString &searchText) |
| void | setStorageFilter (bool useFilter, int storageId) |
| void | setStorageFilter (StorageFilter filter) override |
| void | setTagFilter (const KisTagSP tag) |
| setTagFilter sets the tag to filter with | |
| bool | tagResources (const KisTagSP tag, const QVector< int > &resourceIds) |
| bool | untagResources (const KisTagSP tag, const QVector< int > &resourceIds) |
| bool | updateResource (KoResourceSP resource) override |
| updateResource creates a new version of the resource in the storage and in the database. This will also set the resource to active if it was inactive. | |
| ~KisTagFilterResourceProxyModel () override | |
Public Member Functions inherited from KisAbstractResourceModel | |
| bool | setResourceInactive (const QModelIndex &index) |
| virtual | ~KisAbstractResourceModel () |
Public Member Functions inherited from KisAbstractResourceFilterInterface | |
| virtual | ~KisAbstractResourceFilterInterface () |
Additional Inherited Members | |
Public Types inherited from KisAbstractResourceModel | |
| enum | Columns { Id = 0 , StorageId , Name , Filename , Tooltip , Thumbnail , Status , Location , ResourceType , Tags , MD5 , LargeThumbnail , Dirty , MetaData , ResourceActive , StorageActive , BrokenStatus , BrokenStatusMessage } |
| The Columns enum indexes the columns in the model. To get the thumbnail for a particular resource, create the index with QModelIndex(row, Thumbnail). More... | |
Public Types inherited from KisAbstractResourceFilterInterface | |
| enum | ResourceFilter { ShowInactiveResources = 0 , ShowActiveResources , ShowAllResources } |
| enum | StorageFilter { ShowInactiveStorages = 0 , ShowActiveStorages , ShowAllStorages } |
Signals inherited from KisTagFilterResourceProxyModel | |
| void | afterFilterChanged () |
| void | beforeFilterChanges () |
Protected Member Functions inherited from KisTagFilterResourceProxyModel | |
| bool | filterAcceptsColumn (int source_column, const QModelIndex &source_parent) const override |
| bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
| bool | lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const override |
Definition at line 150 of file TagFilterProxyModelQmlWrapper.h.
| FontFamilyTagFilterModel::FontFamilyTagFilterModel | ( | QObject * | parent = nullptr | ) |
Definition at line 384 of file TagFilterProxyModelQmlWrapper.cpp.
|
overridevirtual |
additionalResourceNameChecks Some resources, like fonts, have multiple names that need to be tested. Implementers should override this function if they want additional checks on the name.
| resource | the resource index to test, this is provided by the model while testing each row. |
| filter,this | is the class that handles tokenisation, also provided by the model. |
Reimplemented from KisTagFilterResourceProxyModel.
Definition at line 420 of file TagFilterProxyModelQmlWrapper.cpp.
References KisAbstractResourceModel::Id, KisResourceSearchBoxFilter::matchesResource(), KisResourceMetaDataModel::metaDataValue(), KisResourceModelProvider::resourceMetadataModel(), and KisAbstractResourceModel::Tags.
|
override |
Definition at line 389 of file TagFilterProxyModelQmlWrapper.cpp.
References KisAbstractResourceModel::Id, KisResourceMetaDataModel::metaDataValue(), KisAbstractResourceModel::Name, and KisResourceModelProvider::resourceMetadataModel().