digiKam
Digikam::ItemFilterSettings Class Reference

Public Types

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

Public Member Functions

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

Member Enumeration Documentation

◆ GeolocationCondition

Possible logical matching condition used to sort geolocation.

Enumerator
GeolocationNoFilter 
GeolocationNoCoordinates 
GeolocationHasCoordinates 

◆ MatchingCondition

Possible logical matching condition used to sort tags id.

Enumerator
OrCondition 
AndCondition 

◆ RatingCondition

Possible conditions used to filter rating: >=, =, <=.

Enumerator
GreaterEqualCondition 
EqualCondition 
LessEqualCondition 

Constructor & Destructor Documentation

◆ ItemFilterSettings()

Digikam::ItemFilterSettings::ItemFilterSettings ( )
explicit

Member Function Documentation

◆ isFiltering()

bool Digikam::ItemFilterSettings::isFiltering ( ) const

◆ isFilteringByColorLabels()

bool Digikam::ItemFilterSettings::isFilteringByColorLabels ( ) const

Returns if the color labels is a filter criteria.

Referenced by isFiltering(), and watchFlags().

◆ isFilteringByDay()

bool Digikam::ItemFilterSettings::isFilteringByDay ( ) const

Returns if the day is a filter criteria.

Referenced by isFiltering(), and watchFlags().

◆ isFilteringByGeolocation()

bool Digikam::ItemFilterSettings::isFilteringByGeolocation ( ) const

Returns whether geolocation is a filter criteria.

References GeolocationNoFilter.

Referenced by isFiltering(), and watchFlags().

◆ isFilteringByPickLabels()

bool Digikam::ItemFilterSettings::isFilteringByPickLabels ( ) const

Returns if the pick labels is a filter criteria.

Referenced by isFiltering(), and watchFlags().

◆ isFilteringByRating()

bool Digikam::ItemFilterSettings::isFilteringByRating ( ) const

Returns if the rating is a filter criteria.

References GreaterEqualCondition.

Referenced by isFiltering(), and watchFlags().

◆ isFilteringByTags()

bool Digikam::ItemFilterSettings::isFilteringByTags ( ) const

Returns if the tag is a filter criteria.

Referenced by isFiltering(), and Digikam::ItemFilterModel::setItemFilterSettings().

◆ isFilteringByText()

bool Digikam::ItemFilterSettings::isFilteringByText ( ) const

Returns if the text (including comment) is a filter criteria.

References Digikam::SearchTextSettings::text.

Referenced by isFiltering(), Digikam::ItemFilterModel::setItemFilterSettings(), and watchFlags().

◆ isFilteringByTypeMime()

bool Digikam::ItemFilterSettings::isFilteringByTypeMime ( ) const

Returns if the type mime is a filter criteria.

References Digikam::MimeFilter::AllFiles.

Referenced by isFiltering(), and watchFlags().

◆ matches()

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

Returns true if the given ItemInfo matches the filter criteria. Optionally, foundText is set to true if it matched by text search.

References Digikam::ItemInfo::albumId(), Digikam::SearchTextFilterSettings::AlbumName, Digikam::ItemInfo::aspectRatio(), Digikam::DatabaseItem::Audio, Digikam::MimeFilter::AudioFiles, Digikam::SearchTextSettings::caseSensitive, Digikam::ItemInfo::category(), Digikam::ItemInfo::comment(), Digikam::containsAnyOf(), Digikam::containsNoneOfExcept(), Digikam::TagsCache::containsPublicTags(), Digikam::ItemInfo::dateTime(), Digikam::ItemInfo::dimensions(), Digikam::MimeFilter::DNGFiles, EqualCondition, Digikam::ItemInfo::fileUrl(), Digikam::ItemInfo::format(), GeolocationHasCoordinates, GeolocationNoCoordinates, GeolocationNoFilter, GreaterEqualCondition, Digikam::ItemInfo::hasCoordinates(), Digikam::MimeFilter::HEIFFiles, Digikam::ItemInfo::id(), Digikam::DatabaseItem::Image, Digikam::SearchTextFilterSettings::ImageAspectRatio, Digikam::SearchTextFilterSettings::ImageComment, Digikam::MimeFilter::ImageFiles, Digikam::SearchTextFilterSettings::ImageName, Digikam::SearchTextFilterSettings::ImagePixelSize, Digikam::SearchTextFilterSettings::ImageTitle, Digikam::TagsCache::instance(), Digikam::MimeFilter::JPEG2000Files, Digikam::MimeFilter::JPGFiles, Digikam::MimeFilter::MoviesFiles, Digikam::ItemInfo::name(), Digikam::NoColorLabel, Digikam::NoPickLabel, Digikam::MimeFilter::NoRAWFiles, OrCondition, Digikam::MimeFilter::PGFFiles, Digikam::MimeFilter::PNGFiles, QT_SKIP_EMPTY_PARTS, Digikam::MimeFilter::RasterGraphics, Digikam::ItemInfo::rating(), Digikam::MimeFilter::RAWFiles, Digikam::TagsCache::tagForColorLabel(), Digikam::TagsCache::tagForPickLabel(), Digikam::ItemInfo::tagIds(), Digikam::SearchTextFilterSettings::TagName, Digikam::SearchTextSettings::text, Digikam::SearchTextFilterSettings::textFields, Digikam::MimeFilter::TIFFiles, Digikam::ItemInfo::title(), and Digikam::DatabaseItem::Video.

Referenced by Digikam::ItemFilterModelFilterer::process().

◆ setAlbumNames()

void Digikam::ItemFilterSettings::setAlbumNames ( const QHash< int, QString > &  albumNameHash)

◆ setDayFilter()

void Digikam::ItemFilterSettings::setDayFilter ( const QList< QDateTime > &  days)

— Date filter —

◆ setGeolocationFilter()

void Digikam::ItemFilterSettings::setGeolocationFilter ( const GeolocationCondition condition)

— Geolocation filter

◆ setIdWhitelist()

void Digikam::ItemFilterSettings::setIdWhitelist ( const QList< qlonglong > &  idList,
const QString &  id 
)

— ID whitelist filter

◆ setMimeTypeFilter()

void Digikam::ItemFilterSettings::setMimeTypeFilter ( int  mimeTypeFilter)

— Mime filter —

◆ setRatingFilter()

void Digikam::ItemFilterSettings::setRatingFilter ( int  rating,
RatingCondition  ratingCond,
bool  isUnratedExcluded 
)

— Rating filter —

◆ setTagFilter()

void Digikam::ItemFilterSettings::setTagFilter ( const QList< int > &  includedTags,
const QList< int > &  excludedTags,
MatchingCondition  matchingCond,
bool  showUnTagged,
const QList< int > &  clTagIds,
const QList< int > &  plTagIds 
)

— Tags filter —

◆ setTagNames()

void Digikam::ItemFilterSettings::setTagNames ( const QHash< int, QString > &  tagNameHash)

◆ setTextFilter()

void Digikam::ItemFilterSettings::setTextFilter ( const SearchTextFilterSettings settings)

— Text filter —

◆ setUrlWhitelist()

void Digikam::ItemFilterSettings::setUrlWhitelist ( const QList< QUrl > &  urlList,
const QString &  id 
)

— URL whitelist filter

◆ watchFlags()

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

The documentation for this class was generated from the following files: