|
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 | setItemFilterSettings (const ItemFilterSettings &settings) |
| Changes the current image filter settings and refilters.
|
|
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) |
|
|
| 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 |
|
| 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 |
|
| 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 |
|
|
| 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.
|
|
virtual int | compareInfosCategories (const ItemInfo &left, const ItemInfo &right) const |
| Reimplement to customize category sorting,.
|
|
virtual int | compareInfosCategories (const ItemInfo &left, const ItemInfo &right, const FaceTagsIface &leftFace, const FaceTagsIface &rightFace) const |
| In order to be able to Categorize by Faces, it's necessary to pass in the face as well.
|
|
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.
|
|
void | setSourceModel (QAbstractItemModel *const model) override |
|
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
| Overridden from QSortFilterProxyModel.
|
|
int Digikam::ItemFilterModel::compareCategories |
( |
const QModelIndex & |
left, |
|
|
const QModelIndex & |
right |
|
) |
| const |
|
overrideprotectedvirtual |
Internally and if not reimplemented, this method will ask for left
and right
models for role CategorySortRole. In order to correctly sort categories, the data() method of the model should return a qlonglong (or numeric) value, or a QString object. QString objects will be sorted with QString::localeAwareCompare if sortCategoriesByNaturalComparison() is true.
- Note
- Please have present that: QString(QChar(QChar::ObjectReplacementCharacter)) > QString(QChar(QChar::ReplacementCharacter)) > [ all possible strings ] > QString();
This means that QString() will be sorted the first one, while QString(QChar(QChar::ObjectReplacementCharacter)) and QString(QChar(QChar::ReplacementCharacter)) will be sorted in last position.
- Warning
- Please note that data() method of the model should return always information of the same type. If you return a QString for an index, you should return always QStrings for all indexes for role CategorySortRole in order to correctly sort categories. You can't mix by returning a QString for one index, and a qlonglong for other.
- Note
- If you need a more complex layout, you will have to reimplement this method.
- Returns
- A negative value if the category of
left
should be placed before the category of right
. 0 if left
and right
are on the same category, and a positive value if the category of left
should be placed after the category of right
.
Reimplemented from Digikam::DCategorizedSortFilterProxyModel.