digiKam
Digikam::ItemFilterModel Class Reference
+ Inheritance diagram for Digikam::ItemFilterModel:

Public Types

enum  AdditionalRoles { CategoryDisplayRole = 0x17CE990A , CategorySortRole = 0x27857E60 }
 
enum  ItemFilterModelRoles {
  CategorizationModeRole = ItemModel::FilterModelRoles + 1 , SortOrderRole = ItemModel::FilterModelRoles + 2 , CategoryAlbumIdRole = ItemModel::FilterModelRoles + 3 , CategoryFormatRole = ItemModel::FilterModelRoles + 4 ,
  CategoryDateRole = ItemModel::FilterModelRoles + 5 , CategoryFaceRole = ItemModel::FilterModelRoles + 6 , GroupIsOpenRole = ItemModel::FilterModelRoles + 7 , ItemFilterModelPointerRole = ItemModel::FilterModelRoles + 50
}
 

Public Slots

void packageDiscarded (const ItemFilterModelTodoPackage &package)
 
void packageFinished (const ItemFilterModelTodoPackage &package)
 
void preprocessInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
void processAddedInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
void setAllGroupsOpen (bool open)
 
void setCategorizationMode (ItemSortSettings::CategorizationMode mode)
 
void setCategorizationSortOrder (ItemSortSettings::SortOrder order)
 
void setDayFilter (const QList< QDateTime > &days)
 
void setExceptionList (const QList< qlonglong > &idlist, const QString &id)
 
void setGeolocationFilter (const ItemFilterSettings::GeolocationCondition &condition)
 
void setGroupItemFilterSettings (const GroupItemFilterSettings &settings)
 
void setGroupOpen (qlonglong group, bool open)
 
void setIdWhitelist (const QList< qlonglong > &idList, const QString &id)
 
virtual void setItemFilterSettings (const ItemFilterSettings &settings)
 
virtual void setItemSortSettings (const ItemSortSettings &settings)
 
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)
 
void setVersionManagerSettings (const VersionManagerSettings &settings)
 
void toggleGroupOpen (qlonglong group)
 

Signals

void filterMatches (bool matches)
 
void filterMatchesForText (bool matchesByText)
 
void filterSettingsChanged (const ItemFilterSettings &settings)
 
void imageInfosAboutToBeRemoved (const QList< ItemInfo > &infos)
 
void imageInfosAdded (const QList< ItemInfo > &infos)
 
void packageToFilter (const ItemFilterModelTodoPackage &package)
 
void packageToPrepare (const ItemFilterModelTodoPackage &package)
 
void reAddingFinished ()
 
void reAddItemInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 

Public Member Functions

void addPrepareHook (ItemFilterModelPrepareHook *const hook)
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
GroupItemFilterSettings groupItemFilterSettings () const
 
ItemFilterModelimageFilterModel () const override
 
ItemFilterSettings imageFilterSettings () 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
 
ItemSortSettings imageSortSettings () const
 
QModelIndex indexForImageId (qlonglong id) const
 
QModelIndex indexForItemInfo (const ItemInfo &info) const
 
QModelIndex indexForPath (const QString &filePath) const
 
void infosToProcess (const QList< ItemInfo > &infos)
 
void infosToProcess (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues, bool forReAdd=true)
 
void init (ItemFilterModel *q)
 
bool isAllGroupsOpen () const
 
bool isCategorizedModel () const
 
bool isGroupOpen (qlonglong group) const
 
 ItemFilterModel (QObject *const parent=nullptr)
 
 ItemFilterModelPrivate ()
 
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
 
QModelIndex mapToSourceItemModel (const QModelIndex &index) const
 
void removePrepareHook (ItemFilterModelPrepareHook *const hook)
 
void setCategorizedModel (bool categorizedModel)
 
void setSendItemInfoSignals (bool sendSignals)
 
void setSortCategoriesByNaturalComparison (bool sortCategoriesByNaturalComparison)
 
void setSourceFilterModel (ImageSortFilterModel *const model)
 
void setSourceItemModel (ItemModel *const model)
 
void setupWorkers ()
 
void sort (int column, Qt::SortOrder order=Qt::AscendingOrder) override
 
bool sortCategoriesByNaturalComparison () const
 
int sortColumn () const
 
Qt::SortOrder sortOrder () const
 
ImageSortFilterModelsourceFilterModel () const
 
ItemModelsourceItemModel () const
 
DatabaseFields::Set suggestedWatchFlags () const
 
VersionItemFilterSettings versionItemFilterSettings () const
 
 ~ItemFilterModel () override
 
 ~ItemFilterModelPrivate () override
 

Public Attributes

ItemFilterSettings filter
 
ItemFilterSettings filterCopy
 
ItemFilterModelFiltererfilterer
 
QHash< qlonglong, bool > filterResults
 
GroupItemFilterSettings groupFilter
 
GroupItemFilterSettings groupFilterCopy
 
bool hasOneMatch
 
bool hasOneMatchForText
 
ItemModelimageModel
 
unsigned int lastDiscardVersion
 
unsigned int lastFilteredVersion
 
QMutex mutex
 
bool needPrepare
 
bool needPrepareComments
 
bool needPrepareGroups
 
bool needPrepareTags
 
QList< ItemFilterModelPrepareHook * > prepareHooks
 
ItemFilterModelPreparerpreparer
 
ItemFilterModelq
 
int sentOut
 
int sentOutForReAdd
 
ItemSortSettings sorter
 
QTimer * updateFilterTimer
 
volatile unsigned int version
 
VersionItemFilterSettings versionFilter
 
VersionItemFilterSettings versionFilterCopy
 

Protected Slots

void slotImageChange (const ImageChangeset &changeset)
 
void slotImageTagChange (const ImageTagChangeset &changeset)
 
void slotModelReset ()
 
void slotRowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
void slotRowsInserted (const QModelIndex &parent, int start, int end)
 
void slotUpdateFilter ()
 

Protected Member Functions

virtual QString categoryIdentifier (const ItemInfo &info, const FaceTagsIface &face) const
 
int compareCategories (const QModelIndex &left, const QModelIndex &right) const override
 
virtual int compareInfosCategories (const ItemInfo &left, const ItemInfo &right) const
 
virtual int compareInfosCategories (const ItemInfo &left, const ItemInfo &right, const FaceTagsIface &leftFace, const FaceTagsIface &rightFace) const
 
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override
 
virtual bool infosLessThan (const ItemInfo &left, const ItemInfo &right) const
 
 ItemFilterModel (ItemFilterModelPrivate &dd, QObject *const parent)
 
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override
 
void setDirectSourceItemModel (ItemModel *const model) override
 
void setSourceModel (QAbstractItemModel *const model) override
 NOTE: made protected. More...
 
bool subSortLessThan (const QModelIndex &left, const QModelIndex &right) const override
 

Protected Attributes

ItemFilterModelPrivate *const d_ptr
 
ImageSortFilterModelm_chainedModel
 

Member Enumeration Documentation

◆ AdditionalRoles

Enumerator
CategoryDisplayRole 

NOTE: use printf "0x%08X\n" $(($RANDOM*$RANDOM)) to define additional roles. This role is used for asking the category to a given index

CategorySortRole 

This role is used for sorting categories. You can return a string or a long long value. Strings will be sorted alphabetically while long long will be sorted by their value. Please note that this value won't be shown on the view, is only for sorting purposes. What will be shown as "Category" on the view will be asked with the role CategoryDisplayRole.

◆ ItemFilterModelRoles

Enumerator
CategorizationModeRole 

Returns the current categorization mode.

SortOrderRole 

Returns the current sort order.

CategoryAlbumIdRole 

Returns the number of items in the index category.

Returns the id of the PAlbum of the index which is used for category

CategoryFormatRole 

Returns the format of the index which is used for category.

CategoryDateRole 

Returns the date of the index which is used for category.

CategoryFaceRole 

Returns the suggested name for the face in this index.

GroupIsOpenRole 

Returns true if the given image is a group leader, and the group is opened.

ItemFilterModelPointerRole 

Constructor & Destructor Documentation

◆ ItemFilterModel() [1/2]

Digikam::ItemFilterModel::ItemFilterModel ( QObject *const  parent = nullptr)
explicit

References d_ptr.

◆ ~ItemFilterModel()

Digikam::ItemFilterModel::~ItemFilterModel ( )
override

◆ ItemFilterModel() [2/2]

Digikam::ItemFilterModel::ItemFilterModel ( ItemFilterModelPrivate dd,
QObject *const  parent 
)
protected

References d_ptr.

◆ ~ItemFilterModelPrivate()

Digikam::ItemFilterModel::~ItemFilterModelPrivate ( )
override

Member Function Documentation

◆ addPrepareHook()

void Digikam::ItemFilterModel::addPrepareHook ( ItemFilterModelPrepareHook *const  hook)

Add a hook to get added images for preparation tasks before they are added in the model

◆ categoryIdentifier()

◆ compareCategories()

int Digikam::ItemFilterModel::compareCategories ( const QModelIndex &  left,
const QModelIndex &  right 
) const
overrideprotectedvirtual

This method compares the category of the left index with the category of the right index.

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.

References compareInfosCategories(), Digikam::ItemModel::ExtraDataRole, Digikam::FaceTagsIface::fromVariant(), and Digikam::ItemInfo::groupImageId().

◆ compareInfosCategories() [1/2]

int Digikam::ItemFilterModel::compareInfosCategories ( const ItemInfo left,
const ItemInfo right 
) const
protectedvirtual

Reimplement to customize category sorting, Return negative if category of left < category right, Return 0 if left and right are in the same category, else return positive.

Reimplemented in Digikam::ItemAlbumFilterModel.

Referenced by compareCategories(), and Digikam::ItemAlbumFilterModel::compareInfosCategories().

◆ compareInfosCategories() [2/2]

int Digikam::ItemFilterModel::compareInfosCategories ( const ItemInfo left,
const ItemInfo right,
const FaceTagsIface leftFace,
const FaceTagsIface rightFace 
) const
protectedvirtual

In order to be able to Categorize by Faces, it's necessary to pass in the face as well. One image may have multiple Faces in it, hence just the ItemInfo isn't sufficient.

Reimplemented in Digikam::ItemAlbumFilterModel.

◆ data()

◆ filterAcceptsRow()

bool Digikam::ItemFilterModel::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const
overrideprotected

◆ filterMatches

void Digikam::ItemFilterModel::filterMatches ( bool  matches)
signal

Signals that the set filter matches at least one index

◆ filterMatchesForText

void Digikam::ItemFilterModel::filterMatchesForText ( bool  matchesByText)
signal

Signals that the set text filter matches at least one entry. If no text filter is set, this signal is emitted with 'false' when filterMatches() is emitted.

◆ filterSettingsChanged

void Digikam::ItemFilterModel::filterSettingsChanged ( const ItemFilterSettings settings)
signal

Emitted when the filter settings have been changed (the model may not yet have been updated)

Referenced by setItemFilterSettings().

◆ groupItemFilterSettings()

GroupItemFilterSettings Digikam::ItemFilterModel::groupItemFilterSettings ( ) const

◆ imageFilterModel()

ItemFilterModel * Digikam::ItemFilterModel::imageFilterModel ( ) const
overridevirtual

Returns this, any chained ItemFilterModel, or 0.

Reimplemented from Digikam::ImageSortFilterModel.

◆ imageFilterSettings()

ItemFilterSettings Digikam::ItemFilterModel::imageFilterSettings ( ) const

◆ imageId()

◆ imageIds()

QList< qlonglong > Digikam::ImageSortFilterModel::imageIds ( const QList< QModelIndex > &  indexes) const
inherited

◆ imageInfo()

◆ imageInfos()

QList< ItemInfo > Digikam::ImageSortFilterModel::imageInfos ( const QList< QModelIndex > &  indexes) const
inherited

◆ imageInfosAboutToBeRemoved

void Digikam::ItemFilterModel::imageInfosAboutToBeRemoved ( const QList< ItemInfo > &  infos)
signal

◆ imageInfosAdded

void Digikam::ItemFilterModel::imageInfosAdded ( const QList< ItemInfo > &  infos)
signal

These signals need to be explicitly enabled with setSendItemInfoSignals()

Referenced by slotRowsInserted().

◆ imageInfosSorted()

QList< ItemInfo > Digikam::ImageSortFilterModel::imageInfosSorted ( ) const
inherited

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.

References Digikam::ItemModel::imageInfo(), Digikam::ImageSortFilterModel::mapToSourceItemModel(), and Digikam::ImageSortFilterModel::sourceItemModel().

◆ imageSortSettings()

ItemSortSettings Digikam::ItemFilterModel::imageSortSettings ( ) const

◆ indexForImageId()

QModelIndex Digikam::ImageSortFilterModel::indexForImageId ( qlonglong  id) const
inherited

◆ indexForItemInfo()

QModelIndex Digikam::ImageSortFilterModel::indexForItemInfo ( const ItemInfo info) const
inherited

◆ indexForPath()

QModelIndex Digikam::ImageSortFilterModel::indexForPath ( const QString &  filePath) const
inherited

◆ infosLessThan()

bool Digikam::ItemFilterModel::infosLessThan ( const ItemInfo left,
const ItemInfo right 
) const
protectedvirtual

Reimplement to customize sorting. Do not take categories into account here.

Referenced by subSortLessThan().

◆ infosToProcess() [1/2]

void Digikam::ItemFilterModel::infosToProcess ( const QList< ItemInfo > &  infos)

◆ infosToProcess() [2/2]

void Digikam::ItemFilterModel::infosToProcess ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues,
bool  forReAdd = true 
)

◆ init()

void Digikam::ItemFilterModel::init ( ItemFilterModel q)

◆ isAllGroupsOpen()

bool Digikam::ItemFilterModel::isAllGroupsOpen ( ) const

◆ isCategorizedModel()

◆ isGroupOpen()

bool Digikam::ItemFilterModel::isGroupOpen ( qlonglong  group) const

group is identified by the id of its group leader

Referenced by toggleGroupOpen().

◆ ItemFilterModelPrivate()

Digikam::ItemFilterModel::ItemFilterModelPrivate ( )

◆ lessThan()

bool Digikam::DCategorizedSortFilterProxyModel::lessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const
overrideprotectedinherited

Overridden from QSortFilterProxyModel. If you are subclassing DCategorizedSortFilterProxyModel, you will probably not need to reimplement this method.

It calls compareCategories() to sort by category. If the both items are in the same category (i.e. compareCategories returns 0), then subSortLessThan is called.

Returns
Returns true if the item left is less than the item right when sorting.
Warning
You usually won't need to reimplement this method when subclassing from DCategorizedSortFilterProxyModel.

References Digikam::DCategorizedSortFilterProxyModel::Private::categorizedModel, Digikam::DCategorizedSortFilterProxyModel::compareCategories(), and Digikam::DCategorizedSortFilterProxyModel::subSortLessThan().

◆ mapFromDirectSourceToSourceItemModel()

QModelIndex Digikam::ImageSortFilterModel::mapFromDirectSourceToSourceItemModel ( const QModelIndex &  sourceModel_index) const
inherited

◆ mapFromSourceItemModel()

◆ mapListFromSource()

QList< QModelIndex > Digikam::ImageSortFilterModel::mapListFromSource ( const QList< QModelIndex > &  sourceIndexes) const
inherited

◆ mapListToSource()

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

Convenience methods mapped to ItemModel. Mentioned indexes returned come from the source image model.

References Digikam::ImageSortFilterModel::mapToSourceItemModel().

◆ mapToSourceItemModel()

◆ packageDiscarded

void Digikam::ItemFilterModel::packageDiscarded ( const ItemFilterModelTodoPackage package)
slot

◆ packageFinished

void Digikam::ItemFilterModel::packageFinished ( const ItemFilterModelTodoPackage package)
slot

◆ packageToFilter

void Digikam::ItemFilterModel::packageToFilter ( const ItemFilterModelTodoPackage package)
signal

◆ packageToPrepare

void Digikam::ItemFilterModel::packageToPrepare ( const ItemFilterModelTodoPackage package)
signal

◆ preprocessInfos

void Digikam::ItemFilterModel::preprocessInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
slot

◆ processAddedInfos

void Digikam::ItemFilterModel::processAddedInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
slot

◆ reAddingFinished

void Digikam::ItemFilterModel::reAddingFinished ( )
signal

◆ reAddItemInfos

void Digikam::ItemFilterModel::reAddItemInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
signal

◆ removePrepareHook()

void Digikam::ItemFilterModel::removePrepareHook ( ItemFilterModelPrepareHook *const  hook)

◆ setAllGroupsOpen

void Digikam::ItemFilterModel::setAllGroupsOpen ( bool  open)
slot

◆ setCategorizationMode

◆ setCategorizationSortOrder

void Digikam::ItemFilterModel::setCategorizationSortOrder ( ItemSortSettings::SortOrder  order)
slot

◆ setCategorizedModel()

void Digikam::DCategorizedSortFilterProxyModel::setCategorizedModel ( bool  categorizedModel)
inherited

◆ setDayFilter

void Digikam::ItemFilterModel::setDayFilter ( const QList< QDateTime > &  days)
slot

Adjust the current ItemFilterSettings. Equivalent to retrieving the current filter settings, adjusting the parameter and calling setItemFilterSettings. Provided for convenience. It is encouraged to use setItemFilterSettings if you change more than one parameter at a time.

References setItemFilterSettings().

◆ setDirectSourceItemModel()

void Digikam::ItemFilterModel::setDirectSourceItemModel ( ItemModel *const  model)
overrideprotectedvirtual

◆ setExceptionList

void Digikam::ItemFilterModel::setExceptionList ( const QList< qlonglong > &  idlist,
const QString &  id 
)
slot

◆ setGeolocationFilter

void Digikam::ItemFilterModel::setGeolocationFilter ( const ItemFilterSettings::GeolocationCondition condition)
slot

◆ setGroupItemFilterSettings

void Digikam::ItemFilterModel::setGroupItemFilterSettings ( const GroupItemFilterSettings settings)
slot

Changes the current version image filter settings and refilters.

References slotUpdateFilter().

Referenced by setAllGroupsOpen(), and setGroupOpen().

◆ setGroupOpen

void Digikam::ItemFilterModel::setGroupOpen ( qlonglong  group,
bool  open 
)
slot

References setGroupItemFilterSettings().

Referenced by toggleGroupOpen().

◆ setIdWhitelist

void Digikam::ItemFilterModel::setIdWhitelist ( const QList< qlonglong > &  idList,
const QString &  id 
)
slot

◆ setItemFilterSettings

◆ setItemSortSettings

void Digikam::ItemFilterModel::setItemSortSettings ( const ItemSortSettings settings)
virtualslot

◆ setMimeTypeFilter

void Digikam::ItemFilterModel::setMimeTypeFilter ( int  mimeTypeFilter)
slot

◆ setRatingFilter

void Digikam::ItemFilterModel::setRatingFilter ( int  rating,
ItemFilterSettings::RatingCondition  ratingCond,
bool  isUnratedExcluded 
)
slot

◆ setSendItemInfoSignals()

void Digikam::ItemFilterModel::setSendItemInfoSignals ( bool  sendSignals)

Enables sending imageInfosAdded and imageInfosAboutToBeRemoved

References slotRowsAboutToBeRemoved(), and slotRowsInserted().

◆ setSortCategoriesByNaturalComparison()

void Digikam::DCategorizedSortFilterProxyModel::setSortCategoriesByNaturalComparison ( bool  sortCategoriesByNaturalComparison)
inherited

Set if the sorting using CategorySortRole will use a natural comparison in the case that strings were returned. If enabled, QCollator will be used for sorting.

Parameters
sortCategoriesByNaturalComparisonwhether to sort using a natural comparison or not.

References Digikam::DCategorizedSortFilterProxyModel::sortCategoriesByNaturalComparison(), and Digikam::DCategorizedSortFilterProxyModel::Private::sortCategoriesByNaturalComparison.

◆ setSortOrder

◆ setSortRole

◆ setSourceFilterModel()

◆ setSourceItemModel()

◆ setSourceModel()

void Digikam::ImageSortFilterModel::setSourceModel ( QAbstractItemModel *const  model)
overrideprotectedinherited

◆ setStringTypeNatural

void Digikam::ItemFilterModel::setStringTypeNatural ( bool  natural)
slot

◆ setTagFilter

void Digikam::ItemFilterModel::setTagFilter ( const QList< int > &  includedTags,
const QList< int > &  excludedTags,
ItemFilterSettings::MatchingCondition  matchingCond,
bool  showUnTagged,
const QList< int > &  clTagIds,
const QList< int > &  plTagIds 
)
slot

◆ setTextFilter

void Digikam::ItemFilterModel::setTextFilter ( const SearchTextFilterSettings settings)
slot

◆ setupWorkers()

void Digikam::ItemFilterModel::setupWorkers ( )

◆ setUrlWhitelist

void Digikam::ItemFilterModel::setUrlWhitelist ( const QList< QUrl > &  urlList,
const QString &  id 
)
slot

◆ setVersionItemFilterSettings

void Digikam::ItemFilterModel::setVersionItemFilterSettings ( const VersionItemFilterSettings settings)
slot

Changes the current version image filter settings and refilters.

References slotUpdateFilter().

Referenced by Digikam::ItemIconView::applySettings(), setExceptionList(), and setVersionManagerSettings().

◆ setVersionManagerSettings

void Digikam::ItemFilterModel::setVersionManagerSettings ( const VersionManagerSettings settings)
slot

◆ slotImageChange

void Digikam::ItemFilterModel::slotImageChange ( const ImageChangeset changeset)
protectedslot

◆ slotImageTagChange

void Digikam::ItemFilterModel::slotImageTagChange ( const ImageTagChangeset changeset)
protectedslot

◆ slotModelReset

void Digikam::ItemFilterModel::slotModelReset ( )
protectedslot

◆ slotRowsAboutToBeRemoved

void Digikam::ItemFilterModel::slotRowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedslot

◆ slotRowsInserted

void Digikam::ItemFilterModel::slotRowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedslot

◆ slotUpdateFilter

void Digikam::ItemFilterModel::slotUpdateFilter ( )
protectedslot

◆ sort()

void Digikam::DCategorizedSortFilterProxyModel::sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
)
overrideinherited

Overridden from QSortFilterProxyModel. Sorts the source model using column for the given order.

References Digikam::DCategorizedSortFilterProxyModel::Private::sortColumn, and Digikam::DCategorizedSortFilterProxyModel::Private::sortOrder.

◆ sortCategoriesByNaturalComparison()

bool Digikam::DCategorizedSortFilterProxyModel::sortCategoriesByNaturalComparison ( ) const
inherited
Returns
whether it is being used a natural comparison for sorting. Enabled by default.

References Digikam::DCategorizedSortFilterProxyModel::Private::sortCategoriesByNaturalComparison.

Referenced by Digikam::DCategorizedSortFilterProxyModel::setSortCategoriesByNaturalComparison().

◆ sortColumn()

int Digikam::DCategorizedSortFilterProxyModel::sortColumn ( ) const
inherited

◆ sortOrder()

Qt::SortOrder Digikam::DCategorizedSortFilterProxyModel::sortOrder ( ) const
inherited
Returns
the sort order being used for sorting.

References Digikam::DCategorizedSortFilterProxyModel::Private::sortOrder.

◆ sourceFilterModel()

ImageSortFilterModel * Digikam::ImageSortFilterModel::sourceFilterModel ( ) const
inherited

◆ sourceItemModel()

◆ subSortLessThan()

bool Digikam::ItemFilterModel::subSortLessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const
overrideprotectedvirtual

This method has a similar purpose as lessThan() has on QSortFilterProxyModel. It is used for sorting items that are in the same category.

Returns
Returns true if the item left is less than the item right when sorting.

Reimplemented from Digikam::DCategorizedSortFilterProxyModel.

References Digikam::ItemModel::ExtraDataRole, Digikam::ItemInfo::groupImageId(), Digikam::ItemInfo::id(), and infosLessThan().

◆ suggestedWatchFlags()

◆ toggleGroupOpen

void Digikam::ItemFilterModel::toggleGroupOpen ( qlonglong  group)
slot

◆ versionItemFilterSettings()

VersionItemFilterSettings Digikam::ItemFilterModel::versionItemFilterSettings ( ) const

Member Data Documentation

◆ d_ptr

ItemFilterModelPrivate* const Digikam::ItemFilterModel::d_ptr
protected

Referenced by ItemFilterModel().

◆ filter

ItemFilterSettings Digikam::ItemFilterModel::filter

◆ filterCopy

ItemFilterSettings Digikam::ItemFilterModel::filterCopy

◆ filterer

ItemFilterModelFilterer* Digikam::ItemFilterModel::filterer

◆ filterResults

QHash<qlonglong, bool> Digikam::ItemFilterModel::filterResults

◆ groupFilter

GroupItemFilterSettings Digikam::ItemFilterModel::groupFilter

◆ groupFilterCopy

GroupItemFilterSettings Digikam::ItemFilterModel::groupFilterCopy

◆ hasOneMatch

bool Digikam::ItemFilterModel::hasOneMatch

◆ hasOneMatchForText

bool Digikam::ItemFilterModel::hasOneMatchForText

◆ imageModel

ItemModel* Digikam::ItemFilterModel::imageModel

◆ lastDiscardVersion

unsigned int Digikam::ItemFilterModel::lastDiscardVersion

◆ lastFilteredVersion

unsigned int Digikam::ItemFilterModel::lastFilteredVersion

◆ m_chainedModel

◆ mutex

QMutex Digikam::ItemFilterModel::mutex

◆ needPrepare

bool Digikam::ItemFilterModel::needPrepare

◆ needPrepareComments

bool Digikam::ItemFilterModel::needPrepareComments

◆ needPrepareGroups

bool Digikam::ItemFilterModel::needPrepareGroups

◆ needPrepareTags

bool Digikam::ItemFilterModel::needPrepareTags

◆ prepareHooks

QList<ItemFilterModelPrepareHook*> Digikam::ItemFilterModel::prepareHooks

◆ preparer

ItemFilterModelPreparer* Digikam::ItemFilterModel::preparer

◆ q

ItemFilterModel* Digikam::ItemFilterModel::q

◆ sentOut

int Digikam::ItemFilterModel::sentOut

◆ sentOutForReAdd

int Digikam::ItemFilterModel::sentOutForReAdd

◆ sorter

ItemSortSettings Digikam::ItemFilterModel::sorter

Referenced by setItemSortSettings().

◆ updateFilterTimer

QTimer* Digikam::ItemFilterModel::updateFilterTimer

◆ version

volatile unsigned int Digikam::ItemFilterModel::version

◆ versionFilter

VersionItemFilterSettings Digikam::ItemFilterModel::versionFilter

◆ versionFilterCopy

VersionItemFilterSettings Digikam::ItemFilterModel::versionFilterCopy

The documentation for this class was generated from the following files: