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

Public Types

enum  ItemModelRoles {
  ItemModelPointerRole = Qt::UserRole , ItemModelInternalId = Qt::UserRole + 1 , ThumbnailRole = Qt::UserRole + 2 , CreationDateRole = Qt::UserRole + 3 ,
  ExtraDataRole = Qt::UserRole + 5 , ExtraDataDuplicateCount = Qt::UserRole + 6 , LTLeftPanelRole = Qt::UserRole + 50 , LTRightPanelRole = Qt::UserRole + 51 ,
  SubclassRoles = Qt::UserRole + 100 , FilterModelRoles = Qt::UserRole + 500
}
 

Public Slots

void preloadAllThumbnails ()
 
void preloadThumbnails (const QList< ItemInfo > &)
 
void preloadThumbnails (const QList< QModelIndex > &)
 
void prepareThumbnails (const QList< QModelIndex > &indexesToPrepare)
 
void prepareThumbnails (const QList< QModelIndex > &indexesToPrepare, const ThumbnailSize &thumbSize)
 
void reAddingFinished ()
 
void reAddItemInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 

Signals

void allRefreshingFinished ()
 
void imageChange (const ImageChangeset &, const QItemSelection &)
 
void imageInfosAboutToBeAdded (const QList< ItemInfo > &infos)
 
void imageInfosAboutToBeRemoved (const QList< ItemInfo > &infos)
 
void imageInfosAdded (const QList< ItemInfo > &infos)
 
void imageInfosRemoved (const QList< ItemInfo > &infos)
 
void imageTagChange (const ImageTagChangeset &, const QItemSelection &)
 
void preprocess (const QList< ItemInfo > &infos, const QList< QVariant > &)
 
void processAdded (const QList< ItemInfo > &infos, const QList< QVariant > &)
 
void readyForIncrementalRefresh ()
 
void thumbnailAvailable (const QModelIndex &index, int requestedSize)
 
void thumbnailFailed (const QModelIndex &index, int requestedSize)
 

Public Member Functions

void addItemInfo (const ItemInfo &info)
 
void addItemInfos (const QList< ItemInfo > &infos)
 
void addItemInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
void addItemInfosSynchronously (const QList< ItemInfo > &infos)
 
void addItemInfosSynchronously (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
void addItemInfoSynchronously (const ItemInfo &info)
 
void clearItemInfos ()
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
virtual Qt::ItemFlags dragDropFlags (const QModelIndex &index) const
 
Qt::ItemFlags dragDropFlagsV2 (const QModelIndex &index) const
 
AbstractItemDragDropHandlerdragDropHandler () const
 
bool dropMimeData (const QMimeData *, Qt::DropAction, int, int, const QModelIndex &)
 
void ensureHasGroupedImages (const ItemInfo &groupLeader)
 
void ensureHasItemInfo (const ItemInfo &info)
 
void ensureHasItemInfos (const QList< ItemInfo > &infos)
 
void ensureHasItemInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool hasImage (const ItemInfo &info) const
 
bool hasImage (const ItemInfo &info, const QVariant &extraValue) const
 
bool hasImage (qlonglong id) const
 
bool hasImage (qlonglong id, const QVariant &extraValue) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
qlonglong imageId (const QModelIndex &index) const
 
qlonglong imageId (int row) const
 
QList< qlonglong > imageIds () const
 
QList< qlonglong > imageIds (const QList< QModelIndex > &indexes) const
 
ItemInfo imageInfo (const QModelIndex &index) const
 
ItemInfo imageInfo (const QString &filePath) const
 
ItemInfo imageInfo (int row) const
 
ItemInfoimageInfoRef (const QModelIndex &index) const
 
ItemInfoimageInfoRef (int row) const
 
QList< ItemInfoimageInfos () const
 
QList< ItemInfoimageInfos (const QList< QModelIndex > &indexes) const
 
QList< ItemInfoimageInfos (const QString &filePath) const
 
QModelIndex index (int row, int column=0, const QModelIndex &parent=QModelIndex()) const override
 
QList< QModelIndex > indexesForImageId (qlonglong id) const
 
QList< QModelIndex > indexesForItemInfo (const ItemInfo &info) const
 
QList< QModelIndex > indexesForPath (const QString &filePath) const
 
QModelIndex indexForImageId (qlonglong id) const
 
QModelIndex indexForImageId (qlonglong id, const QVariant &extraValue) const
 
QModelIndex indexForItemInfo (const ItemInfo &info) const
 
QModelIndex indexForItemInfo (const ItemInfo &info, const QVariant &extraValue) const
 
QModelIndex indexForPath (const QString &filePath) const
 
virtual bool isDragEnabled (const QModelIndex &index) const
 
virtual bool isDropEnabled (const QModelIndex &index) const
 
bool isEmpty () const
 
bool isRefreshing () const
 
int itemCount () const
 
 ItemListModel (QObject *const parent=nullptr)
 
bool keepsFilePathCache () const
 
QMimeData * mimeData (const QModelIndexList &indexes) const
 
QStringList mimeTypes () const
 
int numberOfIndexesForImageId (qlonglong id) const
 
int numberOfIndexesForItemInfo (const ItemInfo &info) const
 
void removeIndex (const QModelIndex &indexes)
 
void removeIndexes (const QList< QModelIndex > &indexes)
 
void removeItemInfo (const ItemInfo &info)
 
void removeItemInfos (const QList< ItemInfo > &infos)
 
void removeItemInfos (const QList< ItemInfo > &infos, const QList< QVariant > &extraValues)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole) override
 
void setDragDropHandler (AbstractItemDragDropHandler *handler)
 
void setEmitDataChanged (bool emitSignal)
 
void setExifRotate (bool rotate)
 
void setItemInfos (const QList< ItemInfo > &infos)
 
void setKeepsFilePathCache (bool keepCache)
 
void setPreloadThumbnails (bool preload)
 
void setPreloadThumbnailSize (const ThumbnailSize &thumbSize)
 If you want to fix a size for preloading, do it here. More...
 
DECLARE_MODEL_DRAG_DROP_METHODS void setPreprocessor (QObject *const processor)
 
void setSendRemovalSignals (bool send)
 
void setThumbnailLoadThread (ThumbnailLoadThread *const thread)
 
void setThumbnailSize (const ThumbnailSize &thumbSize)
 Set the thumbnail size to use. More...
 
void setWatchFlags (const DatabaseFields::Set &set)
 
Qt::DropActions supportedDropActions () const
 
ThumbnailLoadThreadthumbnailLoadThread () const
 
ThumbnailSize thumbnailSize () const
 
QList< ItemInfouniqueItemInfos () const
 
void unsetPreprocessor (QObject *const processor)
 
 ~ItemListModel () override
 

Static Public Member Functions

static qlonglong retrieveImageId (const QModelIndex &index)
 
static ItemInfo retrieveItemInfo (const QModelIndex &index)
 

Protected Slots

void slotCollectionImageChange (const CollectionImageChangeset &changeset)
 
virtual void slotImageChange (const ImageChangeset &changeset)
 
virtual void slotImageTagChange (const ImageTagChangeset &changeset)
 
void slotThumbnailLoaded (const LoadingDescription &loadingDescription, const QPixmap &thumb)
 

Protected Member Functions

void emitDataChangedForAll ()
 
void emitDataChangedForSelection (const QItemSelection &selection)
 
void finishIncrementalRefresh ()
 
void finishRefresh ()
 
bool hasIncrementalRefreshPending () const
 
virtual void imageInfosAboutToBeRemoved (int, int)
 
void imageInfosCleared () override
 
void requestIncrementalRefresh ()
 
void startIncrementalRefresh ()
 
void startRefresh ()
 

Protected Attributes

AbstractItemDragDropHandlerm_dragDropHandler
 

Member Enumeration Documentation

◆ ItemModelRoles

Enumerator
ItemModelPointerRole 

An ItemModel* pointer to this model

ItemModelInternalId 
ThumbnailRole 

Returns a thumbnail pixmap. May be implemented by subclasses. Returns either a valid pixmap or a null QVariant.

CreationDateRole 

Returns a QDateTime with the creation date

ExtraDataRole 

Return (optional) extraData field

ExtraDataDuplicateCount 

Returns the number of duplicate indexes for the same image id

LTLeftPanelRole 

Roles which are defined here but not implemented by ItemModel Returns position of item in Left Light Table preview.

LTRightPanelRole 

Returns position of item in Right Light Table preview.

SubclassRoles 

For use by subclasses

FilterModelRoles 

For use by filter models

Constructor & Destructor Documentation

◆ ItemListModel()

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

◆ ~ItemListModel()

Digikam::ItemListModel::~ItemListModel ( )
override

Member Function Documentation

◆ addItemInfo()

void Digikam::ItemModel::addItemInfo ( const ItemInfo info)
inherited

Main entry point for subclasses adding image infos to the model. If you list entries not unique per image id, you must add an extraValue so that every entry is unique by imageId and extraValues. Please note that these methods do not prevent addition of duplicate entries.

References Digikam::ItemModel::addItemInfos().

◆ addItemInfos() [1/2]

◆ addItemInfos() [2/2]

void Digikam::ItemModel::addItemInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
inherited

◆ addItemInfosSynchronously() [1/2]

void Digikam::ItemModel::addItemInfosSynchronously ( const QList< ItemInfo > &  infos)
inherited

◆ addItemInfosSynchronously() [2/2]

void Digikam::ItemModel::addItemInfosSynchronously ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
inherited

◆ addItemInfoSynchronously()

void Digikam::ItemModel::addItemInfoSynchronously ( const ItemInfo info)
inherited

addItemInfo() is asynchronous if a prepocessor is set. This method first adds the info, synchronously. Only afterwards, the preprocessor will have the opportunity to process it. This method also bypasses any incremental updates. Please note that these methods do not prevent addition of duplicate entries.

References Digikam::ItemModel::addItemInfosSynchronously().

◆ allRefreshingFinished

void Digikam::ItemModel::allRefreshingFinished ( )
signalinherited

Signals that the model has finished currently with all scheduled refreshing, full or incremental, and all preprocessing. The model is in polished, clean situation right now.

Referenced by Digikam::ItemThumbnailModel::setPreloadThumbnails().

◆ clearItemInfos()

void Digikam::ItemModel::clearItemInfos ( )
inherited

◆ data()

QVariant Digikam::ItemThumbnailModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
overrideinherited

Handles the ThumbnailRole. If the pixmap is available, returns it in the QVariant. If it still needs to be loaded, returns a null QVariant and emits thumbnailAvailable() as soon as it is available.

References Digikam::ItemModel::data(), Digikam::ItemModel::imageInfo(), Digikam::ItemModel::index(), Digikam::ItemInfo::isNull(), Digikam::ItemInfo::thumbnailIdentifier(), and Digikam::ItemModel::ThumbnailRole.

Referenced by Digikam::ItemAlbumModel::startListJob().

◆ dragDropFlags()

Qt::ItemFlags Digikam::DragDropModelImplementation::dragDropFlags ( const QModelIndex &  index) const
virtualinherited

Call from your flags() method, adding the relevant drag drop flags. Default implementation enables both drag and drop on the index if a drag drop handler is set. Reimplement to fine-tune. Note: There is an alternative below.

References Digikam::DragDropModelImplementation::m_dragDropHandler.

Referenced by Digikam::ItemModel::flags(), ShowFoto::ShowfotoItemModel::flags(), and Digikam::ImportItemModel::flags().

◆ dragDropFlagsV2()

Qt::ItemFlags Digikam::DragDropModelImplementation::dragDropFlagsV2 ( const QModelIndex &  index) const
inherited

This is an alternative approach to dragDropFlags(). dragDropFlagsV2 calls the virtual methods isDragEnabled() and isDropEnabled() which you then reimplement. Use simple dragDropFlags() if you need not customization, or reimplement dragDropFlags() if you fine-tune it yourself.

References Digikam::DragDropModelImplementation::isDragEnabled(), and Digikam::DragDropModelImplementation::isDropEnabled().

◆ dragDropHandler()

◆ dropMimeData()

bool Digikam::DragDropModelImplementation::dropMimeData ( const QMimeData *  ,
Qt::DropAction  ,
int  ,
int  ,
const QModelIndex &   
)
inherited

◆ emitDataChangedForAll()

void Digikam::ItemModel::emitDataChangedForAll ( )
protectedinherited

◆ emitDataChangedForSelection()

void Digikam::ItemModel::emitDataChangedForSelection ( const QItemSelection &  selection)
protectedinherited

◆ ensureHasGroupedImages()

void Digikam::ItemModel::ensureHasGroupedImages ( const ItemInfo groupLeader)
inherited

Ensure that all images grouped on the given leader are contained in the model.

References Digikam::ItemModel::ensureHasItemInfos(), and Digikam::ItemInfo::groupedImages().

Referenced by Digikam::DigikamItemView::groupIndicatorClicked().

◆ ensureHasItemInfo()

void Digikam::ItemModel::ensureHasItemInfo ( const ItemInfo info)
inherited

Add the given entries. Method returns immediately, the addition may happen later asynchronously. These methods prevent the addition of duplicate entries.

References Digikam::ItemModel::ensureHasItemInfos().

◆ ensureHasItemInfos() [1/2]

void Digikam::ItemModel::ensureHasItemInfos ( const QList< ItemInfo > &  infos)
inherited

◆ ensureHasItemInfos() [2/2]

void Digikam::ItemModel::ensureHasItemInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
inherited

◆ finishIncrementalRefresh()

void Digikam::ItemModel::finishIncrementalRefresh ( )
protectedinherited

◆ finishRefresh()

void Digikam::ItemModel::finishRefresh ( )
protectedinherited

◆ flags()

Qt::ItemFlags Digikam::ItemModel::flags ( const QModelIndex &  index) const
overrideinherited

◆ hasImage() [1/4]

bool Digikam::ItemModel::hasImage ( const ItemInfo info) const
inherited

◆ hasImage() [2/4]

bool Digikam::ItemModel::hasImage ( const ItemInfo info,
const QVariant &  extraValue 
) const
inherited

◆ hasImage() [3/4]

◆ hasImage() [4/4]

bool Digikam::ItemModel::hasImage ( qlonglong  id,
const QVariant &  extraValue 
) const
inherited

◆ hasIncrementalRefreshPending()

bool Digikam::ItemModel::hasIncrementalRefreshPending ( ) const
protectedinherited

◆ headerData()

QVariant Digikam::ItemModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
overrideinherited

◆ imageChange

void Digikam::ItemModel::imageChange ( const ImageChangeset ,
const QItemSelection &   
)
signalinherited

If an ImageChangeset affected indexes of this model with changes as set in watchFlags(), this signal contains the changeset and the affected indexes.

Referenced by Digikam::ItemModel::slotImageChange().

◆ imageId() [1/2]

◆ imageId() [2/2]

qlonglong Digikam::ItemModel::imageId ( int  row) const
inherited

◆ imageIds() [1/2]

QList< qlonglong > Digikam::ItemModel::imageIds ( ) const
inherited

◆ imageIds() [2/2]

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

◆ imageInfo() [1/3]

ItemInfo Digikam::ItemModel::imageInfo ( const QModelIndex &  index) const
inherited

Returns the ItemInfo object, reference or image id from the underlying data pointed to by the index. If the index is not valid, imageInfo will return a null ItemInfo, imageId will return 0, imageInfoRef must not be called with an invalid index.

References Digikam::ItemModel::index().

Referenced by Digikam::ItemThumbnailModel::data(), Digikam::ItemDragDropHandler::dropEvent(), Digikam::ImageSortFilterModel::imageInfo(), Digikam::ImageSortFilterModel::imageInfos(), Digikam::ItemModel::imageInfos(), Digikam::ImageSortFilterModel::imageInfosSorted(), Digikam::TableViewModel::infoFromItem(), and Digikam::ItemModel::retrieveItemInfo().

◆ imageInfo() [2/3]

ItemInfo Digikam::ItemModel::imageInfo ( const QString &  filePath) const
inherited

◆ imageInfo() [3/3]

ItemInfo Digikam::ItemModel::imageInfo ( int  row) const
inherited

Returns the ItemInfo object, reference or image id from the underlying data of the given row (parent is the invalid QModelIndex, column is 0). Note that imageInfoRef will crash if index is invalid.

◆ imageInfoRef() [1/2]

ItemInfo & Digikam::ItemModel::imageInfoRef ( const QModelIndex &  index) const
inherited

◆ imageInfoRef() [2/2]

ItemInfo & Digikam::ItemModel::imageInfoRef ( int  row) const
inherited

◆ imageInfos() [1/3]

QList< ItemInfo > Digikam::ItemModel::imageInfos ( ) const
inherited

◆ imageInfos() [2/3]

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

◆ imageInfos() [3/3]

QList< ItemInfo > Digikam::ItemModel::imageInfos ( const QString &  filePath) const
inherited

◆ imageInfosAboutToBeAdded

void Digikam::ItemModel::imageInfosAboutToBeAdded ( const QList< ItemInfo > &  infos)
signalinherited

Informs that ItemInfos will be added to the model. This signal is sent before the model data is changed and views are informed.

◆ imageInfosAboutToBeRemoved [1/2]

void Digikam::ItemModel::imageInfosAboutToBeRemoved ( const QList< ItemInfo > &  infos)
signalinherited

Informs that ItemInfos will be removed from the model. This signal is sent before the model data is changed and views are informed. Note: You need to explicitly enable sending of this signal. It is not sent in clearItemInfos().

◆ imageInfosAboutToBeRemoved() [2/2]

virtual void Digikam::ItemModel::imageInfosAboutToBeRemoved ( int  ,
int   
)
inlineprotectedvirtualinherited

Called before rowsAboutToBeRemoved

◆ imageInfosAdded

void Digikam::ItemModel::imageInfosAdded ( const QList< ItemInfo > &  infos)
signalinherited

Informs that ItemInfos have been added to the model. This signal is sent after the model data is changed and views are informed.

◆ imageInfosCleared()

void Digikam::ItemThumbnailModel::imageInfosCleared ( )
overrideprotectedvirtualinherited

Called when the internal storage is cleared

Reimplemented from Digikam::ItemModel.

Referenced by Digikam::ItemAlbumModel::startListJob().

◆ imageInfosRemoved

void Digikam::ItemListModel::imageInfosRemoved ( const QList< ItemInfo > &  infos)
signal

Emitted when images are removed from the model because they are removed in the database

◆ imageTagChange

void Digikam::ItemModel::imageTagChange ( const ImageTagChangeset ,
const QItemSelection &   
)
signalinherited

If an ImageTagChangeset affected indexes of this model, this signal contains the changeset and the affected indexes.

Referenced by Digikam::ItemModel::slotImageTagChange().

◆ index()

◆ indexesForImageId()

QList< QModelIndex > Digikam::ItemModel::indexesForImageId ( qlonglong  id) const
inherited

◆ indexesForItemInfo()

QList< QModelIndex > Digikam::ItemModel::indexesForItemInfo ( const ItemInfo info) const
inherited

◆ indexesForPath()

QList< QModelIndex > Digikam::ItemModel::indexesForPath ( const QString &  filePath) const
inherited

◆ indexForImageId() [1/2]

◆ indexForImageId() [2/2]

QModelIndex Digikam::ItemModel::indexForImageId ( qlonglong  id,
const QVariant &  extraValue 
) const
inherited

◆ indexForItemInfo() [1/2]

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

Return the index for the given ItemInfo or id, if contained in this model.

References Digikam::ItemInfo::id(), and Digikam::ItemModel::indexForImageId().

◆ indexForItemInfo() [2/2]

QModelIndex Digikam::ItemModel::indexForItemInfo ( const ItemInfo info,
const QVariant &  extraValue 
) const
inherited

◆ indexForPath()

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

Returns the index or ItemInfo object from the underlying data for the given file path. This is fast if keepsFilePathCache is enabled. The file path is as returned by ItemInfo.filePath(). In case of multiple occurrences of the same file, the simpler variants return any one found first, use the QList methods to retrieve all occurrences.

References Digikam::ItemModel::indexForImageId().

◆ isDragEnabled()

bool Digikam::DragDropModelImplementation::isDragEnabled ( const QModelIndex &  index) const
virtualinherited

◆ isDropEnabled()

bool Digikam::DragDropModelImplementation::isDropEnabled ( const QModelIndex &  index) const
virtualinherited

◆ isEmpty()

bool Digikam::ItemModel::isEmpty ( ) const
inherited

◆ isRefreshing()

bool Digikam::ItemModel::isRefreshing ( ) const
inherited

Returns true if this model is currently refreshing. For a preprocessor this means that, although the preprocessor may currently have processed all it got, more batches are to be expected.

◆ itemCount()

int Digikam::ItemModel::itemCount ( ) const
inherited

◆ keepsFilePathCache()

bool Digikam::ItemModel::keepsFilePathCache ( ) const
inherited

◆ mimeData()

QMimeData * Digikam::DragDropModelImplementation::mimeData ( const QModelIndexList &  indexes) const
inherited

◆ mimeTypes()

QStringList Digikam::DragDropModelImplementation::mimeTypes ( ) const
inherited

◆ numberOfIndexesForImageId()

int Digikam::ItemModel::numberOfIndexesForImageId ( qlonglong  id) const
inherited

◆ numberOfIndexesForItemInfo()

int Digikam::ItemModel::numberOfIndexesForItemInfo ( const ItemInfo info) const
inherited

◆ preloadAllThumbnails

void Digikam::ItemThumbnailModel::preloadAllThumbnails ( )
slotinherited

◆ preloadThumbnails [1/2]

void Digikam::ItemThumbnailModel::preloadThumbnails ( const QList< ItemInfo > &  infos)
slotinherited

Preload thumbnail for the given infos resp. indexes. Note: Use setPreloadThumbnails to automatically preload all entries in the model. Note: This only ensures thumbnail generation. It is not guaranteed that pixmaps are stored in the cache. For thumbnails that are expect to be drawn immediately, include them in prepareThumbnails(). Note: Stops preloading of previously added thumbnails.

References Digikam::ItemInfo::thumbnailIdentifier().

Referenced by Digikam::ItemThumbnailModel::preloadAllThumbnails().

◆ preloadThumbnails [2/2]

void Digikam::ItemThumbnailModel::preloadThumbnails ( const QList< QModelIndex > &  indexesToPreload)
slotinherited

◆ prepareThumbnails [1/2]

void Digikam::ItemThumbnailModel::prepareThumbnails ( const QList< QModelIndex > &  indexesToPrepare)
slotinherited

Prepare the thumbnail loading for the given indexes

◆ prepareThumbnails [2/2]

void Digikam::ItemThumbnailModel::prepareThumbnails ( const QList< QModelIndex > &  indexesToPrepare,
const ThumbnailSize thumbSize 
)
slotinherited

◆ preprocess

void Digikam::ItemModel::preprocess ( const QList< ItemInfo > &  infos,
const QList< QVariant > &   
)
signalinherited

Connect to this signal only if you are the current preprocessor.

Referenced by Digikam::ItemModel::unsetPreprocessor().

◆ processAdded

void Digikam::ItemModel::processAdded ( const QList< ItemInfo > &  infos,
const QList< QVariant > &   
)
signalinherited

◆ reAddingFinished

void Digikam::ItemModel::reAddingFinished ( )
slotinherited

◆ reAddItemInfos

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

◆ readyForIncrementalRefresh

void Digikam::ItemModel::readyForIncrementalRefresh ( )
signalinherited

Signals that the model is right now ready to start an incremental refresh. This is guaranteed only for the scope of emitting this signal.

Referenced by Digikam::ItemAlbumModel::ItemAlbumModel(), and Digikam::ItemModel::requestIncrementalRefresh().

◆ removeIndex()

void Digikam::ItemModel::removeIndex ( const QModelIndex &  indexes)
inherited

Directly remove the given indexes or infos from the model.

References Digikam::ItemModel::index(), and Digikam::ItemModel::removeIndexes().

◆ removeIndexes()

◆ removeItemInfo()

void Digikam::ItemModel::removeItemInfo ( const ItemInfo info)
inherited

◆ removeItemInfos() [1/2]

◆ removeItemInfos() [2/2]

void Digikam::ItemModel::removeItemInfos ( const QList< ItemInfo > &  infos,
const QList< QVariant > &  extraValues 
)
inherited

◆ requestIncrementalRefresh()

void Digikam::ItemModel::requestIncrementalRefresh ( )
protectedinherited

As soon as the model is ready to start an incremental refresh, the signal readyForIncrementalRefresh() will be emitted. The signal will be emitted inline if the model is ready right now.

References Digikam::ItemModel::readyForIncrementalRefresh().

Referenced by Digikam::ItemAlbumModel::slotNextIncrementalRefresh().

◆ retrieveImageId()

qlonglong Digikam::ItemModel::retrieveImageId ( const QModelIndex &  index)
staticinherited

◆ retrieveItemInfo()

◆ rowCount()

int Digikam::ItemModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
overrideinherited

◆ setData()

bool Digikam::ItemThumbnailModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::DisplayRole 
)
overrideinherited

You can override the current thumbnail size by giving an integer value for ThumbnailRole. Set a null QVariant to use the thumbnail size set by setThumbnailSize() again. The index given here is ignored for this purpose.

References Digikam::ItemModel::index(), Digikam::ItemModel::ThumbnailRole, and value.

◆ setDragDropHandler()

void Digikam::DragDropModelImplementation::setDragDropHandler ( AbstractItemDragDropHandler handler)
inherited

◆ setEmitDataChanged()

void Digikam::ItemThumbnailModel::setEmitDataChanged ( bool  emitSignal)
inherited

Enable emitting dataChanged() when a thumbnail becomes available. The thumbnailAvailable() signal will be emitted in any case. Default is true.

◆ setExifRotate()

void Digikam::ItemThumbnailModel::setExifRotate ( bool  rotate)
inherited

◆ setItemInfos()

void Digikam::ItemModel::setItemInfos ( const QList< ItemInfo > &  infos)
inherited

◆ setKeepsFilePathCache()

void Digikam::ItemModel::setKeepsFilePathCache ( bool  keepCache)
inherited

If a cache is kept, lookup by file path is fast, without a cache it is O(n). Default is false.

Referenced by Digikam::ItemThumbnailModel::ItemThumbnailModel().

◆ setPreloadThumbnails()

void Digikam::ItemThumbnailModel::setPreloadThumbnails ( bool  preload)
inherited

Enable preloading of thumbnails: If preloading is enabled, for every entry in the model a thumbnail generation is started. Default: false.

References Digikam::ItemModel::allRefreshingFinished(), and Digikam::ItemThumbnailModel::preloadAllThumbnails().

Referenced by Digikam::DigikamItemView::DigikamItemView().

◆ setPreloadThumbnailSize()

void Digikam::ItemThumbnailModel::setPreloadThumbnailSize ( const ThumbnailSize thumbSize)
inherited

If you want to fix a size for preloading, do it here.

Referenced by Digikam::DigikamItemView::setThumbnailSize().

◆ setPreprocessor()

void Digikam::ItemModel::setPreprocessor ( QObject *const  processor)
inherited

Install an object as a preprocessor for ItemInfos added to this model. For every QList of ItemInfos added to addItemInfo, the signal preprocess() will be emitted. The preprocessor may process the items and shall then readd them by calling reAddItemInfos(). It may take some time to process. It shall discard any held infos when the modelReset() signal is sent. It shall call readdFinished() when no reset occurred and all infos on the way have been readded. This means that only after calling this method, you shall make three connections (preprocess -> your slot, your signal -> reAddItemInfos, your signal -> reAddingFinished) and make or already hold a connection modelReset() -> your slot. There is only one preprocessor at a time, a previously set object will be disconnected.

References Digikam::ItemModel::unsetPreprocessor().

Referenced by Digikam::ItemFilterModel::setDirectSourceItemModel().

◆ setSendRemovalSignals()

void Digikam::ItemModel::setSendRemovalSignals ( bool  send)
inherited

Enable sending of imageInfosAboutToBeRemoved and imageInfosRemoved signals. Default: false

◆ setThumbnailLoadThread()

void Digikam::ItemThumbnailModel::setThumbnailLoadThread ( ThumbnailLoadThread *const  thread)
inherited

Enable thumbnail loading and set the thread that shall be used. The thumbnail size of this thread will be adjusted.

References Digikam::ItemThumbnailModel::slotThumbnailLoaded().

Referenced by Digikam::DigikamItemView::DigikamItemView().

◆ setThumbnailSize()

void Digikam::ItemThumbnailModel::setThumbnailSize ( const ThumbnailSize thumbSize)
inherited

Set the thumbnail size to use.

◆ setWatchFlags()

void Digikam::ItemModel::setWatchFlags ( const DatabaseFields::Set set)
inherited

Set a set of database fields to watch. If either of these is changed, dataChanged() will be emitted. Default is no flag (no signal will be emitted).

Referenced by Digikam::ItemCategorizedView::installDefaultModels().

◆ slotCollectionImageChange

◆ slotImageChange

◆ slotImageTagChange

◆ slotThumbnailLoaded

◆ startIncrementalRefresh()

void Digikam::ItemModel::startIncrementalRefresh ( )
protectedinherited

Starts an incremental refresh operation. You shall only call this method from a slot connected to readyForIncrementalRefresh(). To initiate an incremental refresh, call requestIncrementalRefresh().

Referenced by Digikam::ItemAlbumModel::incrementalRefresh().

◆ startRefresh()

void Digikam::ItemModel::startRefresh ( )
protectedinherited

Subclasses that add ItemInfos in batches shall call startRefresh() when they start sending batches and finishRefresh() when they have finished. No incremental refreshes will be started while listing. A clearItemInfos() always stops listing, calling finishRefresh() is then not necessary.

Referenced by Digikam::ItemAlbumModel::refresh().

◆ supportedDropActions()

Qt::DropActions Digikam::DragDropModelImplementation::supportedDropActions ( ) const
inherited

Implements the relevant QAbstractItemModel methods for drag and drop. All functionality is redirected to the handler. dropMimeData() always returns false, leaving implementation to the view.

References Digikam::CopyAction, and Digikam::MoveAction.

◆ thumbnailAvailable

void Digikam::ItemThumbnailModel::thumbnailAvailable ( const QModelIndex &  index,
int  requestedSize 
)
signalinherited

◆ thumbnailFailed

void Digikam::ItemThumbnailModel::thumbnailFailed ( const QModelIndex &  index,
int  requestedSize 
)
signalinherited

◆ thumbnailLoadThread()

ThumbnailLoadThread * Digikam::ItemThumbnailModel::thumbnailLoadThread ( ) const
inherited

◆ thumbnailSize()

ThumbnailSize Digikam::ItemThumbnailModel::thumbnailSize ( ) const
inherited

◆ uniqueItemInfos()

QList< ItemInfo > Digikam::ItemModel::uniqueItemInfos ( ) const
inherited

◆ unsetPreprocessor()

void Digikam::ItemModel::unsetPreprocessor ( QObject *const  processor)
inherited

Member Data Documentation

◆ m_dragDropHandler


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