digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::ItemFilterSettings Class Reference

Public Types

enum  GeolocationCondition { GeolocationNoFilter = 0 , GeolocationNoCoordinates = 1 << 1 , GeolocationHasCoordinates = 1 << 2 }
 Possible logical matching condition used to sort geolocation.
 
enum  MatchingCondition { OrCondition , AndCondition }
 Possible logical matching condition used to sort tags id.
 
enum  RatingCondition { GreaterEqualCondition , EqualCondition , LessEqualCondition }
 Possible conditions used to filter rating: >=, =, <=.
 

Public Member Functions

bool isFiltering () const
 Returns if images will be filtered by these criteria at all.
 
bool isFilteringByColorLabels () const
 Returns if the color labels is a filter criteria.
 
bool isFilteringByDay () const
 Returns if the day is a filter criteria.
 
bool isFilteringByGeolocation () const
 Returns whether geolocation is a filter criteria.
 
bool isFilteringByPickLabels () const
 Returns if the pick labels is a filter criteria.
 
bool isFilteringByRating () const
 Returns if the rating is a filter criteria.
 
bool isFilteringByTags () const
 Returns if the tag is a filter criteria.
 
bool isFilteringByText () const
 Returns if the text (including comment) is a filter criteria.
 
bool isFilteringByTypeMime () const
 Returns if the type mime is a filter criteria.
 
bool matches (const ItemInfo &info, bool *const foundText=nullptr) const
 Returns true if the given ItemInfo matches the filter criteria.
 
void setAlbumNames (const QHash< int, QString > &albumNameHash)
 
void setDayFilter (const QList< QDateTime > &days)
 — Date filter —
 
void setGeolocationFilter (const GeolocationCondition &condition)
 — Geolocation filter
 
void setIdWhitelist (const QList< qlonglong > &idList, const QString &id)
 — ID whitelist filter
 
void setMimeTypeFilter (int mimeTypeFilter)
 — Mime filter —
 
void setRatingFilter (int rating, RatingCondition ratingCond, bool isUnratedExcluded)
 — Rating filter —
 
void setTagFilter (const QList< int > &includedTags, const QList< int > &excludedTags, MatchingCondition matchingCond, bool showUnTagged, const QList< int > &clTagIds, const QList< int > &plTagIds)
 — Tags filter —
 
void setTagNames (const QHash< int, QString > &tagNameHash)
 
void setTextFilter (const SearchTextFilterSettings &settings)
 — Text filter —
 
void setUrlWhitelist (const QList< QUrl > &urlList, const QString &id)
 — URL whitelist filter
 
DatabaseFields::Set watchFlags () const
 — Change notification —
 

Member Function Documentation

◆ matches()

bool Digikam::ItemFilterSettings::matches ( const ItemInfo info,
bool *const  foundText = nullptr 
) const

Optionally, foundText is set to true if it matched by text search.

◆ watchFlags()

DatabaseFields::Set Digikam::ItemFilterSettings::watchFlags ( ) const

Returns database fields a change in which would affect the current filtering. To find out if an image tag change affects filtering, test isFilteringByTags(). The text filter will also be affected by changes in tags and album names.