digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::ImageSortFilterModel Class Reference
+ Inheritance diagram for Digikam::ImageSortFilterModel:

Public Member Functions

 ImageSortFilterModel (QObject *const parent=nullptr)
 
virtual ItemFilterModelimageFilterModel () const
 
qlonglong imageId (const QModelIndex &index) const
 
QList< qlonglong > imageIds (const QList< QModelIndex > &indexes) const
 
ItemInfo imageInfo (const QModelIndex &index) const
 
QList< ItemInfoimageInfos (const QList< QModelIndex > &indexes) const
 
QList< ItemInfoimageInfosSorted () 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)
 
ImageSortFilterModelsourceFilterModel () const
 
ItemModelsourceItemModel () const
 
- Public Member Functions inherited from Digikam::DCategorizedSortFilterProxyModel
 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
 

Protected Member Functions

virtual void setDirectSourceItemModel (ItemModel *const model)
 Reimplement if needed.
 
void setSourceModel (QAbstractItemModel *const model) override
 
- Protected Member Functions inherited from Digikam::DCategorizedSortFilterProxyModel
virtual int compareCategories (const QModelIndex &left, const QModelIndex &right) const
 This method compares the category of the left index with the category of the right index.
 
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override
 Overridden from QSortFilterProxyModel.
 
virtual bool subSortLessThan (const QModelIndex &left, const QModelIndex &right) const
 This method has a similar purpose as lessThan() has on QSortFilterProxyModel.
 

Protected Attributes

ImageSortFilterModelm_chainedModel = nullptr
 

Additional Inherited Members

- Public Types inherited from Digikam::DCategorizedSortFilterProxyModel
enum  AdditionalRoles { CategoryDisplayRole = 0x17CE990A , CategorySortRole = 0x27857E60 }
 

Member Function Documentation

◆ imageFilterModel()

ItemFilterModel * Digikam::ImageSortFilterModel::imageFilterModel ( ) const
virtual
Returns
This instance if any chained ItemFilterModel, or nullptr.

Reimplemented in Digikam::ItemFilterModel.

◆ imageInfosSorted()

QList< ItemInfo > Digikam::ImageSortFilterModel::imageInfosSorted ( ) const
Returns
a list of all image infos, sorted according to this model. If you do not need a sorted list, use ItemModel's imageInfos() method.

◆ mapListToSource()

QList< QModelIndex > Digikam::ImageSortFilterModel::mapListToSource ( const QList< QModelIndex > &  indexes) const

Mentioned indexes returned come from the source image model.

◆ setDirectSourceItemModel()

void Digikam::ImageSortFilterModel::setDirectSourceItemModel ( ItemModel *const  model)
protectedvirtual

Called only when model shall be set as (direct) sourceModel.

Reimplemented in Digikam::ItemFilterModel.

◆ setSourceModel()

void Digikam::ImageSortFilterModel::setSourceModel ( QAbstractItemModel *const  model)
overrideprotected
Note
made protected