26 #ifndef DIGIKAM_ALBUM_FILTER_MODEL_H
27 #define DIGIKAM_ALBUM_FILTER_MODEL_H
32 #include <QSortFilterProxyModel>
104 QModelIndex mapToSourceAlbumModel(
const QModelIndex& index)
const;
105 QModelIndex mapFromSourceAlbumModel(
const QModelIndex& index)
const;
108 Album* albumForIndex(
const QModelIndex& index)
const;
109 QModelIndex indexForAlbum(
Album* album)
const;
110 QModelIndex rootAlbumIndex()
const;
111 QVariant dataForCurrentSortRole(
Album* album)
const;
123 void setFilterBehavior(FilterBehavior behavior);
130 MatchResult matchResult(
const QModelIndex& index)
const;
138 virtual bool isFiltering()
const;
148 template <
typename T>
172 if (sortOrder == Qt::AscendingOrder)
174 return compareResult;
178 return (- compareResult);
182 template <
typename T>
185 return compareByOrder(compareValue(a, b), sortOrder);
251 virtual bool matches(
Album* album)
const;
259 void setSourceModel(QAbstractItemModel*
const model)
override;
261 bool filterAcceptsRow(
int source_row,
const QModelIndex& source_parent)
const override;
262 bool lessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
266 void slotAlbumRenamed(
Album* album);
267 void slotAlbumsHaveBeenUpdated(
int type);
306 void setFilterChecked(
bool filter);
307 void setFilterPartiallyChecked(
bool filter);
309 bool isFiltering()
const override;
313 bool matches(
Album* album)
const override;
334 void setSourceSearchModel(
SearchModel*
const source);
341 void listAllSearches();
342 void listNormalSearches();
343 void listTimelineSearches();
344 void listHaarSearches();
345 void listMapSearches();
346 void listDuplicatesSearches();
351 void setListTemporarySearches(
bool list);
353 bool isFiltering()
const override;
360 void setTypeFilter(
int type);
362 bool matches(
Album* album)
const override;
383 void setSourceAlbumModel(
TagModel*
const source);
386 void listOnlyTagsWithProperty(
const QString& property);
387 void removeListOnlyProperty(
const QString& property);
388 void doNotListTagsWithProperty(
const QString& property);
389 void removeDoNotListProperty(
const QString& property);
391 bool isFiltering()
const override;
395 void tagPropertiesChanged(
TAlbum*);
399 bool matches(
Album* album)
const override;
417 void setQuickListTags(
const QList<int>& tags);
421 bool matches(
Album* album)
const override;
Definition: abstractalbummodel.h:49
Definition: abstractalbummodel.h:358
Definition: albumfiltermodel.h:45
QPointer< AlbumFilterModel > m_chainedModel
Definition: albumfiltermodel.h:283
static int compareValue(const T &a, const T &b)
Definition: albumfiltermodel.h:149
FilterBehavior m_filterBehavior
Definition: albumfiltermodel.h:281
QObject * m_parent
Definition: albumfiltermodel.h:284
FilterBehavior
Definition: albumfiltermodel.h:65
@ SimpleFiltering
Definition: albumfiltermodel.h:70
@ FullFiltering
Definition: albumfiltermodel.h:76
MatchResult
Definition: albumfiltermodel.h:51
@ ParentMatch
A parent if the index is matched.
Definition: albumfiltermodel.h:57
@ ChildMatch
A child of the index is matched.
Definition: albumfiltermodel.h:59
@ DirectMatch
The index itself is matched.
Definition: albumfiltermodel.h:55
SearchTextSettings m_settings
Definition: albumfiltermodel.h:282
void signalFilterChanged()
void searchTextSettingsChanged(bool wasSearching, bool searched)
static int compareByOrder(const T &a, const T &b, Qt::SortOrder sortOrder)
Definition: albumfiltermodel.h:183
static int compareByOrder(int compareResult, Qt::SortOrder sortOrder)
Definition: albumfiltermodel.h:170
void searchTextSettingsAboutToChange(bool searched, bool willSearch)
void hasSearchResult(bool hasResult)
Abstract base class for all album types.
Definition: album.h:67
Definition: albumfiltermodel.h:294
bool m_filterPartiallyChecked
Definition: albumfiltermodel.h:318
bool m_filterChecked
Definition: albumfiltermodel.h:317
Definition: albumfiltermodel.h:327
bool m_listTemporary
Definition: albumfiltermodel.h:367
int m_searchType
Definition: albumfiltermodel.h:366
Definition: albummodel.h:95
Definition: searchtextbar.h:43
Definition: albummodel.h:63
Definition: albumfiltermodel.h:376
QSet< QString > m_propertiesWhiteList
Definition: albumfiltermodel.h:404
QSet< QString > m_propertiesBlackList
Definition: albumfiltermodel.h:403
Type
Definition: coredbconstants.h:60
Definition: datefolderview.cpp:43