24 #ifndef DIGIKAM_DTRASH_ITEM_MODEL_H
25 #define DIGIKAM_DTRASH_ITEM_MODEL_H
29 #include <QAbstractTableModel>
111 int rowCount(
const QModelIndex&)
const override;
112 int columnCount(
const QModelIndex&)
const override;
114 QVariant
data(
const QModelIndex& index,
int role)
const override;
117 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
Definition: dtrashiteminfo.h:36
Definition: dtrashitemmodel.h:40
QModelIndex indexForItem(const DTrashItemInfo &itemInfo) const
returns the index for the DTrashItemInfo in model
Definition: dtrashitemmodel.cpp:412
void removeItems(const QModelIndexList &indexes)
removes list of items for given indexes from model data and informs the view
Definition: dtrashitemmodel.cpp:299
bool isEmpty()
Definition: dtrashitemmodel.cpp:429
QVariant data(const QModelIndex &index, int role) const override
Definition: dtrashitemmodel.cpp:106
DTrashItemInfo itemForIndex(const QModelIndex &index)
returns DTrashItemInfo for specific index in model
Definition: dtrashitemmodel.cpp:385
void loadItemsForCollection(const QString &colPath)
Runs a thread to list all items from a collection trash.
Definition: dtrashitemmodel.cpp:374
void refreshLayout()
refreshes the view layout
Definition: dtrashitemmodel.cpp:332
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Definition: dtrashitemmodel.cpp:247
DTrashItemModel(QObject *const parent=nullptr)
Definition: dtrashitemmodel.cpp:78
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
Definition: dtrashitemmodel.cpp:195
void changeThumbSize(int size)
Changes the thumbnail size.
Definition: dtrashitemmodel.cpp:434
void refreshThumbnails(const LoadingDescription &desc, const QPixmap &pix)
refreshes the thumbnails
Definition: dtrashitemmodel.cpp:342
int columnCount(const QModelIndex &) const override
Definition: dtrashitemmodel.cpp:101
DTrashColumn
Definition: dtrashitemmodel.h:46
@ DTrashTimeStamp
Definition: dtrashitemmodel.h:49
@ DTrashRelPath
Definition: dtrashitemmodel.h:48
@ DTrashThumb
Definition: dtrashitemmodel.h:47
@ DTrashNumCol
Definition: dtrashitemmodel.h:50
~DTrashItemModel() override
Definition: dtrashitemmodel.cpp:90
void append(const DTrashItemInfo &itemInfo)
appends item to model data and informs the view
Definition: dtrashitemmodel.cpp:283
int rowCount(const QModelIndex &) const override
QAbstractItemModel interface.
Definition: dtrashitemmodel.cpp:96
DTrashItemInfoList allItems()
returns a list of all items in model
Definition: dtrashitemmodel.cpp:424
bool pixmapForItem(const QString &path, QPixmap &pix) const
loads a thumbnail for item in trash for showing
Definition: dtrashitemmodel.cpp:236
DTrashItemInfoList itemsForIndexes(const QList< QModelIndex > &indexes)
returns DTrashItemInfoList for given indexes in model
Definition: dtrashitemmodel.cpp:395
void clearCurrentData()
Clears all data from model and informs the view.
Definition: dtrashitemmodel.cpp:364
Definition: loadingdescription.h:45
@ Orientation
Definition: coredbfields.h:86
Definition: datefolderview.cpp:43