digiKam
|
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... | |
|
explicit |
bool Digikam::ItemFilterSettings::isFiltering | ( | ) | const |
Returns if images will be filtered by these criteria at all.
References isFilteringByColorLabels(), isFilteringByDay(), isFilteringByGeolocation(), isFilteringByPickLabels(), isFilteringByRating(), isFilteringByTags(), isFilteringByText(), and isFilteringByTypeMime().
bool Digikam::ItemFilterSettings::isFilteringByColorLabels | ( | ) | const |
Returns if the color labels is a filter criteria.
Referenced by isFiltering(), and watchFlags().
bool Digikam::ItemFilterSettings::isFilteringByDay | ( | ) | const |
Returns if the day is a filter criteria.
Referenced by isFiltering(), and watchFlags().
bool Digikam::ItemFilterSettings::isFilteringByGeolocation | ( | ) | const |
Returns whether geolocation is a filter criteria.
References GeolocationNoFilter.
Referenced by isFiltering(), and watchFlags().
bool Digikam::ItemFilterSettings::isFilteringByPickLabels | ( | ) | const |
Returns if the pick labels is a filter criteria.
Referenced by isFiltering(), and watchFlags().
bool Digikam::ItemFilterSettings::isFilteringByRating | ( | ) | const |
Returns if the rating is a filter criteria.
References GreaterEqualCondition.
Referenced by isFiltering(), and watchFlags().
bool Digikam::ItemFilterSettings::isFilteringByTags | ( | ) | const |
Returns if the tag is a filter criteria.
Referenced by isFiltering(), and Digikam::ItemFilterModel::setItemFilterSettings().
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().
bool Digikam::ItemFilterSettings::isFilteringByTypeMime | ( | ) | const |
Returns if the type mime is a filter criteria.
References Digikam::MimeFilter::AllFiles.
Referenced by isFiltering(), and watchFlags().
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().
void Digikam::ItemFilterSettings::setAlbumNames | ( | const QHash< int, QString > & | albumNameHash | ) |
Referenced by Digikam::ItemAlbumFilterModel::setItemFilterSettings().
void Digikam::ItemFilterSettings::setDayFilter | ( | const QList< QDateTime > & | days | ) |
— Date filter —
void Digikam::ItemFilterSettings::setGeolocationFilter | ( | const GeolocationCondition & | condition | ) |
— Geolocation filter
void Digikam::ItemFilterSettings::setIdWhitelist | ( | const QList< qlonglong > & | idList, |
const QString & | id | ||
) |
— ID whitelist filter
void Digikam::ItemFilterSettings::setMimeTypeFilter | ( | int | mimeTypeFilter | ) |
— Mime filter —
void Digikam::ItemFilterSettings::setRatingFilter | ( | int | rating, |
RatingCondition | ratingCond, | ||
bool | isUnratedExcluded | ||
) |
— Rating filter —
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 —
void Digikam::ItemFilterSettings::setTagNames | ( | const QHash< int, QString > & | tagNameHash | ) |
Referenced by Digikam::ItemAlbumFilterModel::setItemFilterSettings().
void Digikam::ItemFilterSettings::setTextFilter | ( | const SearchTextFilterSettings & | settings | ) |
— Text filter —
void Digikam::ItemFilterSettings::setUrlWhitelist | ( | const QList< QUrl > & | urlList, |
const QString & | id | ||
) |
— URL whitelist filter
DatabaseFields::Set Digikam::ItemFilterSettings::watchFlags | ( | ) | const |
— Change notification —
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.
References Digikam::DatabaseFields::Category, Digikam::DatabaseFields::ColorLabel, Digikam::DatabaseFields::Comment, Digikam::DatabaseFields::CreationDate, Digikam::DatabaseFields::Format, isFilteringByColorLabels(), isFilteringByDay(), isFilteringByGeolocation(), isFilteringByPickLabels(), isFilteringByRating(), isFilteringByText(), isFilteringByTypeMime(), Digikam::DatabaseFields::ItemPositionsAll, Digikam::DatabaseFields::Name, Digikam::DatabaseFields::PickLabel, and Digikam::DatabaseFields::Rating.