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

Public Member Functions

Qt::DropAction accepts (const QDropEvent *e, const QModelIndex &dropIndex) override
 
virtual bool acceptsMimeData (const QMimeData *data)
 
 AlbumDragDropHandler (AlbumModel *const model)
 
QMimeData * createMimeData (const QList< Album * > &) override
 
bool dropEvent (QAbstractItemView *view, const QDropEvent *e, const QModelIndex &droppedOn) override
 
QStringList mimeTypes () const override
 
AlbumModelmodel () const
 

Protected Attributes

AbstractAlbumModelm_model
 

Constructor & Destructor Documentation

◆ AlbumDragDropHandler()

Digikam::AlbumDragDropHandler::AlbumDragDropHandler ( AlbumModel *const  model)
explicit

Member Function Documentation

◆ accepts()

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

◆ acceptsMimeData()

bool Digikam::AlbumModelDragDropHandler::acceptsMimeData ( const QMimeData *  data)
virtualinherited

Returns if the given mime data can be handled. 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.

References Digikam::AlbumModelDragDropHandler::mimeTypes().

Referenced by Digikam::AbstractAlbumTreeView::dragEnterEvent().

◆ createMimeData()

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

Create a mime data object for starting a drag from the given Albums

Reimplemented from Digikam::AlbumModelDragDropHandler.

References Digikam::PAlbum::fileUrl(), Digikam::PAlbum::isAlbumRoot(), Digikam::Album::isRoot(), and Digikam::Album::isTrashAlbum().

◆ dropEvent()

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

◆ mimeTypes()

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

Returns the supported mime types. Called by the default implementation of model's mimeTypes().

Reimplemented from Digikam::AlbumModelDragDropHandler.

References Digikam::DItemDrag::mimeTypes(), Digikam::DAlbumDrag::mimeTypes(), and Digikam::DCameraItemListDrag::mimeTypes().

◆ model()

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

Member Data Documentation

◆ m_model

AbstractAlbumModel* Digikam::AlbumModelDragDropHandler::m_model
protectedinherited

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