![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Member Functions | |
AlbumModelDragDropHandler (AbstractAlbumModel *model) | |
virtual Qt::DropAction | accepts (const QDropEvent *e, const QModelIndex &dropIndex) |
Returns if the given mime data is accepted for drop on dropIndex. | |
virtual bool | acceptsMimeData (const QMimeData *data) |
Returns if the given mime data can be handled. | |
virtual QMimeData * | createMimeData (const QList< Album * > &) |
Create a mime data object for starting a drag from the given Albums. | |
virtual bool | dropEvent (QAbstractItemView *view, const QDropEvent *e, const QModelIndex &droppedOn) |
Gives the view and the occurring drop event. | |
virtual QStringList | mimeTypes () const |
Returns the supported mime types. | |
virtual AbstractAlbumModel * | model () const |
Protected Attributes | |
AbstractAlbumModel * | m_model = nullptr |
|
virtual |
Returns the proposed action, or Qt::IgnoreAction if not accepted.
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
|
virtual |
acceptsMimeData shall return true if a drop of the given mime data will be accepted on any index or place at all. If this returns false, the more specific method accepts() will not be called for this drag. The default implementation uses mimeTypes() to check for supported mime types. There is usually no need to reimplement this.
|
virtual |
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
|
virtual |
The index is the index where the drop was dropped on. It may be invalid (dropped on decoration, viewport) Returns true if the event is to be accepted.
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
|
virtual |
Called by the default implementation of model's mimeTypes().
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.