digiKam Developer Documentation: Digikam::AlbumDragDropHandler Class Reference

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

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

## Public Member Functions
| AlbumDragDropHandler (AlbumModel *const model)
Qt::DropAction | accepts (const QDropEvent *e, const QModelIndex &dropIndex) override
| Returns if the given mime data is accepted for drop on dropIndex.
QMimeData * | createMimeData (const QList< Album * > &) override
| Create a mime data object for starting a drag from the given Albums.
bool | dropEvent (QAbstractItemView *view, const QDropEvent *e, const QModelIndex &droppedOn) override
| Gives the view and the occurring drop event.
QStringList | mimeTypes () const override
| Returns the supported mime types.
AlbumModel * | model () const override
Public Member Functions inherited from Digikam::AlbumModelDragDropHandler
| AlbumModelDragDropHandler (AbstractAlbumModel *model)
virtual bool | acceptsMimeData (const QMimeData *data)
| Returns if the given mime data can be handled.

## Additional Inherited Members
Protected Attributes inherited from Digikam::AlbumModelDragDropHandler
AbstractAlbumModel * | m_model = nullptr

## Member Function Documentation

## ◆ accepts()

Qt::DropAction Digikam::AlbumDragDropHandler::accepts | ( | const QDropEvent * | e,
|  | const QModelIndex & | dropIndex
| ) |  |
| overridevirtual

Returns the proposed action, or Qt::IgnoreAction if not accepted.

Reimplemented from Digikam::AlbumModelDragDropHandler.

## ◆ createMimeData()

QMimeData * Digikam::AlbumDragDropHandler::createMimeData | ( | const QList< Album * > & |  | ) |
| overridevirtual

Reimplemented from Digikam::AlbumModelDragDropHandler.

## ◆ dropEvent()

bool Digikam::AlbumDragDropHandler::dropEvent | ( | QAbstractItemView * | view,
|  | const QDropEvent * | e,
|  | const QModelIndex & | droppedOn
| ) |  |
| overridevirtual

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 from Digikam::AlbumModelDragDropHandler.

## ◆ mimeTypes()

QStringList Digikam::AlbumDragDropHandler::mimeTypes | ( |  | ) | const
| overridevirtual

Called by the default implementation of model's mimeTypes().

Reimplemented from Digikam::AlbumModelDragDropHandler.

## ◆ model()

AlbumModel * Digikam::AlbumDragDropHandler::model | ( |  | ) | const
| overridevirtual

Reimplemented from Digikam::AlbumModelDragDropHandler.