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

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 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 ()
 

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
 
 ItemModel (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
 
void setDragDropHandler (AbstractItemDragDropHandler *handler)
 
void setItemInfos (const QList< ItemInfo > &infos)
 
void setKeepsFilePathCache (bool keepCache)
 
DECLARE_MODEL_DRAG_DROP_METHODS void setPreprocessor (QObject *const processor)
 
void setSendRemovalSignals (bool send)
 
void setWatchFlags (const DatabaseFields::Set &set)
 
Qt::DropActions supportedDropActions () const
 
QList< ItemInfouniqueItemInfos () const
 
void unsetPreprocessor (QObject *const processor)
 
 ~ItemModel () override
 

Static Public Member Functions

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

Protected Slots

virtual void slotImageChange (const ImageChangeset &changeset)
 
virtual void slotImageTagChange (const ImageTagChangeset &changeset)
 

Protected Member Functions

void emitDataChangedForAll ()
 
void emitDataChangedForSelection (const QItemSelection &selection)
 
void finishIncrementalRefresh ()
 
void finishRefresh ()
 
bool hasIncrementalRefreshPending () const
 
virtual void imageInfosAboutToBeRemoved (int, int)
 
virtual void imageInfosCleared ()
 
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

◆ ItemModel()

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

◆ ~ItemModel()

Digikam::ItemModel::~ItemModel ( )
override

Member Function Documentation

◆ addItemInfo()

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

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 addItemInfos().

◆ addItemInfos() [1/2]

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

◆ addItemInfos() [2/2]

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

◆ addItemInfosSynchronously() [1/2]

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

References addItemInfos().

Referenced by addItemInfoSynchronously().

◆ addItemInfosSynchronously() [2/2]

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

References processAdded().

◆ addItemInfoSynchronously()

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

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 addItemInfosSynchronously().

◆ allRefreshingFinished

void Digikam::ItemModel::allRefreshingFinished ( )
signal

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 ( )

◆ data()

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

◆ 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 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 ( )
protected

◆ emitDataChangedForSelection()

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

◆ ensureHasGroupedImages()

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

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

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

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

◆ ensureHasItemInfo()

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

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

References ensureHasItemInfos().

◆ ensureHasItemInfos() [1/2]

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

◆ ensureHasItemInfos() [2/2]

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

◆ finishIncrementalRefresh()

void Digikam::ItemModel::finishIncrementalRefresh ( )
protected

◆ finishRefresh()

void Digikam::ItemModel::finishRefresh ( )
protected

◆ flags()

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

◆ hasImage() [1/4]

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

◆ hasImage() [2/4]

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

◆ hasImage() [3/4]

◆ hasImage() [4/4]

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

References hasImage().

◆ hasIncrementalRefreshPending()

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

◆ headerData()

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

◆ imageChange

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

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 slotImageChange().

◆ imageId() [1/2]

qlonglong Digikam::ItemModel::imageId ( const QModelIndex &  index) const

◆ imageId() [2/2]

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

◆ imageIds() [1/2]

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

◆ imageIds() [2/2]

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

References imageId(), and index().

◆ imageInfo() [1/3]

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

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 index().

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

◆ imageInfo() [2/3]

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

◆ imageInfo() [3/3]

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

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

◆ imageInfoRef() [2/2]

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

◆ imageInfos() [1/3]

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

◆ imageInfos() [2/3]

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

◆ imageInfos() [3/3]

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

◆ imageInfosAboutToBeAdded

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

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)
signal

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   
)
inlineprotectedvirtual

Called before rowsAboutToBeRemoved

◆ imageInfosAdded

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

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

◆ imageInfosCleared()

virtual void Digikam::ItemModel::imageInfosCleared ( )
inlineprotectedvirtual

Called when the internal storage is cleared

Reimplemented in Digikam::ItemThumbnailModel.

Referenced by clearItemInfos().

◆ imageInfosRemoved

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

Informs that ItemInfos have been removed from the model. This signal is sent after 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().

◆ imageTagChange

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

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

Referenced by slotImageTagChange().

◆ index()

◆ indexesForImageId()

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

◆ indexesForItemInfo()

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

◆ indexesForPath()

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

◆ indexForImageId() [1/2]

◆ indexForImageId() [2/2]

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

References indexForImageId().

◆ indexForItemInfo() [1/2]

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

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

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

◆ indexForItemInfo() [2/2]

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

◆ indexForPath()

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

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 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

◆ isRefreshing()

bool Digikam::ItemModel::isRefreshing ( ) const

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

◆ keepsFilePathCache()

bool Digikam::ItemModel::keepsFilePathCache ( ) const

◆ 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

Referenced by data(), and numberOfIndexesForItemInfo().

◆ numberOfIndexesForItemInfo()

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

◆ preprocess

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

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

Referenced by unsetPreprocessor().

◆ processAdded

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

◆ reAddingFinished

void Digikam::ItemModel::reAddingFinished ( )
slot

Referenced by unsetPreprocessor().

◆ reAddItemInfos

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

Referenced by unsetPreprocessor().

◆ readyForIncrementalRefresh

void Digikam::ItemModel::readyForIncrementalRefresh ( )
signal

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 requestIncrementalRefresh().

◆ removeIndex()

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

Directly remove the given indexes or infos from the model.

References index(), and removeIndexes().

◆ removeIndexes()

◆ removeItemInfo()

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

References removeItemInfos().

◆ removeItemInfos() [1/2]

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

◆ removeItemInfos() [2/2]

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

◆ requestIncrementalRefresh()

void Digikam::ItemModel::requestIncrementalRefresh ( )
protected

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 readyForIncrementalRefresh().

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

◆ retrieveImageId()

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

◆ retrieveItemInfo()

◆ rowCount()

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

◆ setDragDropHandler()

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

◆ setItemInfos()

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

Clears and adds the infos.

References addItemInfos(), and clearItemInfos().

Referenced by Digikam::ImageWindow::loadItemInfos().

◆ setKeepsFilePathCache()

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

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().

◆ setPreprocessor()

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

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 unsetPreprocessor().

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

◆ setSendRemovalSignals()

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

Enable sending of imageInfosAboutToBeRemoved and imageInfosRemoved signals. Default: false

◆ setWatchFlags()

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

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().

◆ slotImageChange

void Digikam::ItemModel::slotImageChange ( const ImageChangeset changeset)
protectedvirtualslot

◆ slotImageTagChange

void Digikam::ItemModel::slotImageTagChange ( const ImageTagChangeset changeset)
protectedvirtualslot

◆ startIncrementalRefresh()

void Digikam::ItemModel::startIncrementalRefresh ( )
protected

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 ( )
protected

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.

◆ uniqueItemInfos()

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

◆ unsetPreprocessor()

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

Member Data Documentation

◆ m_dragDropHandler


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