digiKam
ShowFoto::ShowfotoDragDropHandler Class Reference
+ Inheritance diagram for ShowFoto::ShowfotoDragDropHandler:

Signals

void signalDroppedUrls (const QList< QUrl > &droppedUrls, bool dropped, const QUrl &current)
 

Public Member Functions

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

Protected Attributes

QAbstractItemModel * m_model
 

Constructor & Destructor Documentation

◆ ShowfotoDragDropHandler()

ShowFoto::ShowfotoDragDropHandler::ShowfotoDragDropHandler ( ShowfotoItemModel *const  model)
explicit

Member Function Documentation

◆ accepts()

Qt::DropAction ShowFoto::ShowfotoDragDropHandler::accepts ( const QDropEvent *  e,
const QModelIndex &  dropIndex 
)
overridevirtual

Returns if the given mime data is accepted for drop on dropIndex. Returns the proposed action, or Qt::IgnoreAction if not accepted.

Reimplemented from Digikam::AbstractItemDragDropHandler.

Referenced by dropEvent().

◆ acceptsMimeData()

bool Digikam::AbstractItemDragDropHandler::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::AbstractItemDragDropHandler::mimeTypes().

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

◆ createMimeData()

QMimeData * ShowFoto::ShowfotoDragDropHandler::createMimeData ( const QList< QModelIndex > &  )
overridevirtual

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

Reimplemented from Digikam::AbstractItemDragDropHandler.

References model(), ShowFoto::ShowfotoItemModel::showfotoItemInfos(), and ShowFoto::ShowfotoItemInfo::url.

◆ dropEvent()

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

Gives the view and the occurring drop event. 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::AbstractItemDragDropHandler.

References accepts(), and signalDroppedUrls().

◆ mimeTypes()

QStringList ShowFoto::ShowfotoDragDropHandler::mimeTypes ( ) const
overridevirtual

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

Reimplemented from Digikam::AbstractItemDragDropHandler.

◆ model()

ShowfotoItemModel * ShowFoto::ShowfotoDragDropHandler::model ( ) const

◆ signalDroppedUrls

void ShowFoto::ShowfotoDragDropHandler::signalDroppedUrls ( const QList< QUrl > &  droppedUrls,
bool  dropped,
const QUrl &  current 
)
signal

Referenced by dropEvent().

Member Data Documentation

◆ m_model

QAbstractItemModel* Digikam::AbstractItemDragDropHandler::m_model
protectedinherited

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