digiKam Developer Documentation: ShowFoto::ShowfotoSortFilterModel Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ShowFoto::ShowfotoSortFilterModel Class Reference
Inheritance diagram for ShowFoto::ShowfotoSortFilterModel:

## Public Member Functions
| ShowfotoSortFilterModel (QObject *const parent=nullptr)
QModelIndex | indexForShowfotoItemId (qlonglong id) const
QModelIndex | indexForShowfotoItemInfo (const ShowfotoItemInfo &info) const
QModelIndex | indexForUrl (const QUrl &fileUrl) const
QModelIndex | mapFromDirectSourceToSourceShowfotoModel (const QModelIndex &sourceModelIndex) const
QModelIndex | mapFromSourceShowfotoModel (const QModelIndex &showfotoModelIndex) const
QList< QModelIndex > | mapListFromSource (const QList< QModelIndex > &sourceIndexes) const
QList< QModelIndex > | mapListToSource (const QList< QModelIndex > &indexes) const
QModelIndex | mapToSourceShowfotoModel (const QModelIndex &proxyIndex) const
| Convenience methods mapped to ShowfotoItemModel.
void | setSourceFilterModel (ShowfotoSortFilterModel *const sourceModel)
void | setSourceShowfotoModel (ShowfotoItemModel *const sourceModel)
virtual ShowfotoFilterModel * | showfotoFilterModel () const
| Returns this, any chained ShowfotoFilterModel, or 0.
qlonglong | showfotoItemId (const QModelIndex &index) const
QList< qlonglong > | showfotoItemIds (const QList< QModelIndex > &indexes) const
ShowfotoItemInfo | showfotoItemInfo (const QModelIndex &index) const
QList< ShowfotoItemInfo > | showfotoItemInfos (const QList< QModelIndex > &indexes) const
QList< ShowfotoItemInfo > | showfotoItemInfosSorted () const
| Returns a list of all showfoto infos, sorted according to this model.
ShowfotoSortFilterModel * | sourceFilterModel () const
ShowfotoItemModel * | sourceShowfotoModel () 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 | setDirectSourceShowfotoModel (ShowfotoItemModel *const sourceModel)
| Reimplement if needed. Called only when model shall be set as (direct) sourceModel.
void | setSourceModel (QAbstractItemModel *sourceModel) 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
ShowfotoSortFilterModel * | m_chainedModel = nullptr

## Additional Inherited Members
Public Types inherited from Digikam::DCategorizedSortFilterProxyModel
enum | AdditionalRoles { CategoryDisplayRole = 0x17CE990A , CategorySortRole = 0x27857E60 }

## Member Function Documentation

## ◆ mapToSourceShowfotoModel()

QModelIndex ShowFoto::ShowfotoSortFilterModel::mapToSourceShowfotoModel | ( | const QModelIndex & | proxyIndex | ) | const

Mentioned indexes returned come from the source Showfoto image model.

## ◆ setDirectSourceShowfotoModel()

void ShowFoto::ShowfotoSortFilterModel::setDirectSourceShowfotoModel | ( | ShowfotoItemModel *const | sourceModel | ) |
| protectedvirtual

Reimplemented in ShowFoto::ShowfotoFilterModel.

## ◆ showfotoFilterModel()

ShowfotoFilterModel * ShowFoto::ShowfotoSortFilterModel::showfotoFilterModel | ( |  | ) | const
| virtual

Reimplemented in ShowFoto::ShowfotoFilterModel.

## ◆ showfotoItemInfosSorted()

QList< ShowfotoItemInfo > ShowFoto::ShowfotoSortFilterModel::showfotoItemInfosSorted | ( |  | ) | const

If you do not need a sorted list, use ShowfotoItemModel's showfotoItemInfo() method.