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

Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | List of all members
Digikam::DTrashItemModel Class Reference
Inheritance diagram for Digikam::DTrashItemModel:

## Public Types
enum | DTrashColumn { DTrashThumb = 0 , DTrashRelPath , DTrashTimeStamp , DTrashNumCol }

## Public Slots
void | append (const DTrashItemInfo &itemInfo)
| appends item to model data and informs the view
void | refreshLayout ()
| refreshes the view layout
void | refreshThumbnails (const LoadingDescription &desc, const QPixmap &pix)
| refreshes the thumbnails
void | removeItems (const QModelIndexList &indexes)
| removes list of items for given indexes from model data and informs the view

## Signals
void | dataChange ()
void | signalLoadingFinished ()
void | signalLoadingStarted ()

## Public Member Functions
| DTrashItemModel (QObject *const parent, QWidget *const widget)
DTrashItemInfoList | allItems ()
| returns a list of all items in model
void | changeThumbSize (int size)
| Changes the thumbnail size.
void | clearCurrentData ()
| Clears all data from model and informs the view.
int | columnCount (const QModelIndex &) const override
QVariant | data (const QModelIndex &index, int role) const override
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override
QModelIndex | indexForItem (const DTrashItemInfo &itemInfo) const
| returns the index for the DTrashItemInfo in model
bool | isEmpty ()
DTrashItemInfo | itemForIndex (const QModelIndex &index)
| returns DTrashItemInfo for specific index in model
DTrashItemInfoList | itemsForIndexes (const QList< QModelIndex > &indexes)
| returns DTrashItemInfoList for given indexes in model
void | loadItemsForCollection (const QString &colPath)
| Runs a thread to list all items from a collection trash.
bool | pixmapForItem (const QString &path, QPixmap &pix) const
| loads a thumbnail for item in trash for showing
int | rowCount (const QModelIndex &) const override
| QAbstractItemModel interface.
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) override
void | stopLoadingTrash ()
| Stop loading of trash.
void | suspendLoadingTrashThumbs ()
| Stop loading of trash thumbnails.
QString | trashAlbumPath () const

## Member Function Documentation

## ◆ append

void Digikam::DTrashItemModel::append | ( | const DTrashItemInfo & | itemInfo | ) |
| slot

Parameters

  itemInfo | item to append

## ◆ changeThumbSize()

void Digikam::DTrashItemModel::changeThumbSize | ( | int | size | ) |

Parameters

  size | size to change to

## ◆ isEmpty()

bool Digikam::DTrashItemModel::isEmpty | ( |  | ) |

Returns
  true if there is no data in the model

## ◆ loadItemsForCollection()

void Digikam::DTrashItemModel::loadItemsForCollection | ( | const QString & | colPath | ) |

Parameters

  colPath | path to collection to load items for

## ◆ pixmapForItem()

bool Digikam::DTrashItemModel::pixmapForItem | ( | const QString & | path,
|  | QPixmap & | pix
| ) |  | const

Parameters

  path | path of image in trash
  pix | Pixmap to fill

Returns
  true if there is an available thumbnail

## ◆ refreshThumbnails

void Digikam::DTrashItemModel::refreshThumbnails | ( | const LoadingDescription & | desc,
|  | const QPixmap & | pix
| ) |  |
| slot

Parameters

  desc | loading description from thumbnail load thread
  pix | pixmap from thumbnail load thread

## ◆ removeItems

void Digikam::DTrashItemModel::removeItems | ( | const QModelIndexList & | indexes | ) |
| slot

Parameters

  indexes | indexes to remove