| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Digikam::ItemAlbumFilterModel Class Reference
Inheritance diagram for Digikam::ItemAlbumFilterModel:

## Public Member Functions
| ItemAlbumFilterModel (QObject *const parent=nullptr)
void | setItemFilterSettings (const ItemFilterSettings &settings) override
| Changes the current image filter settings and refilters.
void | setSourceItemModel (ItemAlbumModel *model)
ItemAlbumModel * | sourceModel () const
Public Member Functions inherited from Digikam::ItemFilterModel
| ItemFilterModel (QObject *const parent=nullptr)
void | addPrepareHook (ItemFilterModelPrepareHook *const hook)
| Add a hook to get added images for preparation tasks before they are added in the model.
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override
GroupItemFilterSettings | groupItemFilterSettings () const
ItemFilterModel * | imageFilterModel () const override
ItemFilterSettings | imageFilterSettings () const
ItemSortSettings | imageSortSettings () const
bool | isAllGroupsOpen () const
bool | isGroupOpen (qlonglong group) const
| Group is identified by the id of its group leader.
void | removePrepareHook (ItemFilterModelPrepareHook *const hook)
void | setSendItemInfoSignals (bool sendSignals)
| Enables sending imageInfosAdded and imageInfosAboutToBeRemoved.
DatabaseFields::Set | suggestedWatchFlags () const
VersionItemFilterSettings | versionItemFilterSettings () const
Public Member Functions inherited from Digikam::ImageSortFilterModel
| ImageSortFilterModel (QObject *const parent=nullptr)
qlonglong | imageId (const QModelIndex &index) const
QList< qlonglong > | imageIds (const QList< QModelIndex > &indexes) const
ItemInfo | imageInfo (const QModelIndex &index) const
QList< ItemInfo > | imageInfos (const QList< QModelIndex > &indexes) const
QList< ItemInfo > | imageInfosSorted () const
QModelIndex | indexForImageId (qlonglong id) const
QModelIndex | indexForItemInfo (const ItemInfo &info) const
QModelIndex | indexForPath (const QString &filePath) const
QModelIndex | mapFromDirectSourceToSourceItemModel (const QModelIndex &sourceModel_index) const
QModelIndex | mapFromSourceItemModel (const QModelIndex &imagemodel_index) const
QList< QModelIndex > | mapListFromSource (const QList< QModelIndex > &sourceIndexes) const
QList< QModelIndex > | mapListToSource (const QList< QModelIndex > &indexes) const
| Convenience methods mapped to ItemModel.
QModelIndex | mapToSourceItemModel (const QModelIndex &index) const
void | setSourceFilterModel (ImageSortFilterModel *const model)
void | setSourceItemModel (ItemModel *const model)
ImageSortFilterModel * | sourceFilterModel () const
ItemModel * | sourceItemModel () const
Public Member Functions inherited from Digikam::DCategorizedSortFilterProxyModel
| DCategorizedSortFilterProxyModel (QObject *const parent=nullptr)
bool | isCategorizedModel () const
void | setCategorizedModel (bool categorizedModel)
| Enables or disables the categorization feature.
void | setSortCategoriesByNaturalComparison (bool sortCategoriesByNaturalComparison)
| Set if the sorting using CategorySortRole will use a natural comparison in the case that strings were returned.
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) override
| Overridden from QSortFilterProxyModel.
bool | sortCategoriesByNaturalComparison () const
int | sortColumn () const
Qt::SortOrder | sortOrder () const

## Protected Slots
void | slotAlbumAboutToBeDeleted (Album *album)
void | slotAlbumAdded (Album *album)
void | slotAlbumRenamed (Album *album)
void | slotAlbumsCleared ()
Protected Slots inherited from Digikam::ItemFilterModel
void | slotImageChange (const ImageChangeset &changeset)
void | slotImageTagChange (const ImageTagChangeset &changeset)
void | slotModelReset ()
void | slotRowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
void | slotRowsInserted (const QModelIndex &parent, int start, int end)
void | slotUpdateFilter ()

## Protected Member Functions
int | compareInfosCategories (const ItemInfo &left, const ItemInfo &right) const override
| Reimplement to customize category sorting,.
int | compareInfosCategories (const ItemInfo &left, const ItemInfo &right, const FaceTagsIface &leftFace, const FaceTagsIface &rightFace) const override
| In order to be able to Categorize by Faces, it's necessary to pass in the face as well.
Protected Member Functions inherited from Digikam::ItemFilterModel
| ItemFilterModel (ItemFilterModelPrivate &dd, QObject *const parent)
virtual QString | categoryIdentifier (const ItemInfo &info, const FaceTagsIface &face) const
int | compareCategories (const QModelIndex &left, const QModelIndex &right) const override
| This method compares the category of the `left` index with the category of the `right` index.
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override
virtual bool | infosLessThan (const ItemInfo &left, const ItemInfo &right) const
| Reimplement to customize sorting.
void | setDirectSourceItemModel (ItemModel *const model) override
| Reimplement if needed.
bool | subSortLessThan (const QModelIndex &left, const QModelIndex &right) const override
| This method has a similar purpose as lessThan() has on QSortFilterProxyModel.
Protected Member Functions inherited from Digikam::ImageSortFilterModel
void | setSourceModel (QAbstractItemModel *const model) override
Protected Member Functions inherited from Digikam::DCategorizedSortFilterProxyModel
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override
| Overridden from QSortFilterProxyModel.

## Additional Inherited Members
Public Types inherited from Digikam::ItemFilterModel
enum | ItemFilterModelRoles { CategorizationModeRole = ItemModel::FilterModelRoles + 1 , SortOrderRole = ItemModel::FilterModelRoles + 2 , CategoryAlbumIdRole = ItemModel::FilterModelRoles + 3 , CategoryFormatRole = ItemModel::FilterModelRoles + 4 , CategoryDateRole = ItemModel::FilterModelRoles + 5 , CategoryFaceRole = ItemModel::FilterModelRoles + 6 , GroupIsOpenRole = ItemModel::FilterModelRoles + 7 , ItemFilterModelPointerRole = ItemModel::FilterModelRoles + 50 }
Public Types inherited from Digikam::DCategorizedSortFilterProxyModel
enum | AdditionalRoles { CategoryDisplayRole = 0x17CE990A , CategorySortRole = 0x27857E60 }
Public Slots inherited from Digikam::ItemFilterModel
void | setAllGroupsOpen (bool open)
void | setCategorizationMode (ItemSortSettings::CategorizationMode mode)
void | setCategorizationSortOrder (ItemSortSettings::SortOrder order)
void | setDayFilter (const QList< QDateTime > &days)
| Adjust the current ItemFilterSettings.
void | setExceptionList (const QList< qlonglong > &idlist, const QString &id)
void | setGeolocationFilter (const ItemFilterSettings::GeolocationCondition &condition)
void | setGroupItemFilterSettings (const GroupItemFilterSettings &settings)
| Changes the current version image filter settings and refilters.
void | setGroupOpen (qlonglong group, bool open)
void | setIdWhitelist (const QList< qlonglong > &idList, const QString &id)
virtual void | setItemSortSettings (const ItemSortSettings &settings)
| Changes the current image sort settings and resorts.
void | setMimeTypeFilter (int mimeTypeFilter)
void | setRatingFilter (int rating, ItemFilterSettings::RatingCondition ratingCond, bool isUnratedExcluded)
void | setSortOrder (ItemSortSettings::SortOrder order)
void | setSortRole (ItemSortSettings::SortRole role)
void | setStringTypeNatural (bool natural)
void | setTagFilter (const QList< int > &includedTags, const QList< int > &excludedTags, ItemFilterSettings::MatchingCondition matchingCond, bool showUnTagged, const QList< int > &clTagIds, const QList< int > &plTagIds)
void | setTextFilter (const SearchTextFilterSettings &settings)
void | setUrlWhitelist (const QList< QUrl > &urlList, const QString &id)
void | setVersionItemFilterSettings (const VersionItemFilterSettings &settings)
| Changes the current version image filter settings and refilters.
void | setVersionManagerSettings (const VersionManagerSettings &settings)
void | toggleGroupOpen (qlonglong group)
Signals inherited from Digikam::ItemFilterModel
void | filterMatches (bool matches)
| Signals that the set filter matches at least one index.
void | filterMatchesForText (bool matchesByText)
| Signals that the set text filter matches at least one entry.
void | filterSettingsChanged (const ItemFilterSettings &settings)
| Emitted when the filter settings have been changed (the model may not yet have been updated)
void | imageInfosAboutToBeRemoved (const QList< ItemInfo > &infos)
void | imageInfosAdded (const QList< ItemInfo > &infos)
| These signals need to be explicitly enabled with setSendItemInfoSignals()
void | signalGroupIsOpen (qlonglong group, bool open)
| This signal is emitted when a group is open or closed.
Protected Attributes inherited from Digikam::ItemFilterModel
ItemFilterModelPrivate *const | d_ptr = nullptr
Protected Attributes inherited from Digikam::ImageSortFilterModel
ImageSortFilterModel * | m_chainedModel = nullptr

## Member Function Documentation

## ◆ compareInfosCategories() [1/2]

int Digikam::ItemAlbumFilterModel::compareInfosCategories | ( | const ItemInfo & | left,
|  | const ItemInfo & | right
| ) |  | const
| override protected virtual

Returns
  negative if category of left < category right, or 0 if left and right are in the same category, else return positive.

Reimplemented from Digikam::ItemFilterModel.

## ◆ compareInfosCategories() [2/2]

int Digikam::ItemAlbumFilterModel::compareInfosCategories | ( | const ItemInfo & | left,
|  | const ItemInfo & | right,
|  | const FaceTagsIface & | leftFace,
|  | const FaceTagsIface & | rightFace
| ) |  | const
| override protected virtual

One image may have multiple Faces in it, hence just the ItemInfo isn't sufficient.

Reimplemented from Digikam::ItemFilterModel.

## ◆ setItemFilterSettings()

void Digikam::ItemAlbumFilterModel::setItemFilterSettings | ( | const ItemFilterSettings & | settings | ) |
| override virtual

Reimplemented from Digikam::ItemFilterModel.