24 #ifndef DIGIKAM_IMPORT_FILTER_MODEL_H
25 #define DIGIKAM_IMPORT_FILTER_MODEL_H
40 class ImportFilterModel;
69 qlonglong
camItemId(
const QModelIndex& index)
const;
142 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
193 class ImportFilterModelPrivate;
197 ImportFilterModelPrivate*
const d_ptr;
203 bool filterAcceptsRow(
int source_row,
const QModelIndex& source_parent)
const override;
205 int compareCategories(
const QModelIndex& left,
const QModelIndex& right)
const override;
206 bool subSortLessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
242 bool filterAcceptsRow(
int source_row,
const QModelIndex& source_parent)
const override;
Definition: camiteminfo.h:48
Definition: camitemsortsettings.h:42
CategorizationMode
Definition: camitemsortsettings.h:53
SortOrder
Definition: camitemsortsettings.h:46
SortRole
Definition: camitemsortsettings.h:61
Definition: camerathumbsctrl.h:48
Definition: dcategorizedsortfilterproxymodel.h:53
Definition: importfiltermodel.h:101
void setCamItemSortSettings(const CamItemSortSettings &sorter)
Definition: importfiltermodel.cpp:334
void setFilter(Filter *)
Definition: importfiltermodel.cpp:370
void camItemInfosAdded(const QList< CamItemInfo > &infos)
ImportFilterModel(QObject *const parent=nullptr)
Definition: importfiltermodel.cpp:281
void setCameraThumbsController(CameraThumbsCtrl *const thumbsCtrl)
Definition: importfiltermodel.cpp:377
void slotRowsInserted(const QModelIndex &parent, int start, int end)
Definition: importfiltermodel.cpp:403
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: importfiltermodel.cpp:294
void setSortRole(CamItemSortSettings::SortRole role)
Definition: importfiltermodel.cpp:349
virtual QString categoryIdentifier(const CamItemInfo &info) const
Definition: importfiltermodel.cpp:527
ImportFilterModel * importFilterModel() const override
Returns this, any chained ImportFilterModel, or 0.
Definition: importfiltermodel.cpp:327
void setCategorizationMode(CamItemSortSettings::CategorizationMode mode)
Definition: importfiltermodel.cpp:342
virtual int compareInfosCategories(const CamItemInfo &left, const CamItemInfo &right) const
Definition: importfiltermodel.cpp:513
void slotProcessAdded(const QList< CamItemInfo > &)
Definition: importfiltermodel.cpp:466
ImportFilterModelPrivate *const d_ptr
Definition: importfiltermodel.h:193
bool subSortLessThan(const QModelIndex &left, const QModelIndex &right) const override
Definition: importfiltermodel.cpp:488
CamItemSortSettings camItemSortSettings() const
void slotRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: importfiltermodel.cpp:415
void camItemInfosAboutToBeRemoved(const QList< CamItemInfo > &infos)
ImportFilterModelRoles
Definition: importfiltermodel.h:107
@ CategoryFormatRole
Returns the format of the index which is used for category.
Definition: importfiltermodel.h:115
@ ImportFilterModelPointerRole
Returns true if the given camera item is a group leader, and the group is opened.
Definition: importfiltermodel.h:122
@ SortOrderRole
Returns the current sort order.
Definition: importfiltermodel.h:112
@ CategorizationModeRole
Returns the current categorization mode.
Definition: importfiltermodel.h:109
@ CategoryDateRole
Returns the date of the index which is used for category.
Definition: importfiltermodel.h:118
void setSendCamItemInfoSignals(bool sendSignals)
Enables sending camItemInfosAdded and camItemInfosAboutToBeRemoved.
Definition: importfiltermodel.cpp:383
int compareCategories(const QModelIndex &left, const QModelIndex &right) const override
Definition: importfiltermodel.cpp:471
~ImportFilterModel() override
Definition: importfiltermodel.cpp:288
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
Definition: importfiltermodel.cpp:550
void setSortOrder(CamItemSortSettings::SortOrder order)
Definition: importfiltermodel.cpp:356
void setStringTypeNatural(bool natural)
Definition: importfiltermodel.cpp:363
virtual bool infosLessThan(const CamItemInfo &left, const CamItemInfo &right) const
Definition: importfiltermodel.cpp:520
void setDirectSourceImportModel(ImportItemModel *const sourceModel) override
Reimplement if needed. Called only when model shall be set as (direct) sourceModel.
Definition: importfiltermodel.cpp:427
Definition: importimagemodel.h:43
@ FilterModelRoles
Definition: importimagemodel.h:71
Definition: importfiltermodel.h:43
void setSourceImportModel(ImportItemModel *const sourceModel)
Definition: importfiltermodel.cpp:45
QList< QModelIndex > mapListToSource(const QList< QModelIndex > &indexes) const
Definition: importfiltermodel.cpp:133
QModelIndex indexForPath(const QString &filePath) const
Definition: importfiltermodel.cpp:191
qlonglong camItemId(const QModelIndex &index) const
Definition: importfiltermodel.cpp:162
CamItemInfo camItemInfo(const QModelIndex &index) const
Definition: importfiltermodel.cpp:157
QModelIndex indexForCamItemId(qlonglong id) const
Definition: importfiltermodel.cpp:203
ImportItemModel * sourceImportModel() const
Definition: importfiltermodel.cpp:57
QModelIndex mapToSourceImportModel(const QModelIndex &proxyIndex) const
Definition: importfiltermodel.cpp:88
QList< CamItemInfo > camItemInfos(const QList< QModelIndex > &indexes) const
Definition: importfiltermodel.cpp:167
ImportSortFilterModel(QObject *const parent=nullptr)
Definition: importfiltermodel.cpp:35
void setSourceModel(QAbstractItemModel *sourceModel) override
Definition: importfiltermodel.cpp:231
~ImportSortFilterModel() override
Definition: importfiltermodel.cpp:41
QList< QModelIndex > mapListFromSource(const QList< QModelIndex > &sourceIndexes) const
Definition: importfiltermodel.cpp:145
QList< CamItemInfo > camItemInfosSorted() const
Definition: importfiltermodel.cpp:208
QModelIndex mapFromSourceImportModel(const QModelIndex &importModelIndex) const
Definition: importfiltermodel.cpp:103
ImportSortFilterModel * m_chainedModel
Definition: importfiltermodel.h:95
ImportSortFilterModel * sourceFilterModel() const
Definition: importfiltermodel.cpp:83
QModelIndex indexForCamItemInfo(const CamItemInfo &info) const
Definition: importfiltermodel.cpp:198
virtual void setDirectSourceImportModel(ImportItemModel *const sourceModel)
Reimplement if needed. Called only when model shall be set as (direct) sourceModel.
Definition: importfiltermodel.cpp:236
QModelIndex mapFromDirectSourceToSourceImportModel(const QModelIndex &sourceModelIndex) const
Definition: importfiltermodel.cpp:118
QList< qlonglong > camItemIds(const QList< QModelIndex > &indexes) const
Definition: importfiltermodel.cpp:179
virtual ImportFilterModel * importFilterModel() const
Returns this, any chained ImportFilterModel, or 0.
Definition: importfiltermodel.cpp:221
void setSourceFilterModel(ImportSortFilterModel *const sourceModel)
Definition: importfiltermodel.cpp:67
Definition: importfiltermodel.h:233
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
Definition: importfiltermodel.cpp:577
NoDuplicatesImportFilterModel(QObject *const parent=nullptr)
Definition: importfiltermodel.cpp:572
Definition: datefolderview.cpp:43