digiKam
|
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 |
AlbumModel * | model () const |
Protected Attributes | |
AbstractAlbumModel * | m_model |
|
explicit |
|
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::AlbumModelDragDropHandler.
References Digikam::AlbumModel::albumForIndex(), Digikam::DItemDrag::canDecode(), Digikam::DAlbumDrag::canDecode(), Digikam::DCameraItemListDrag::canDecode(), Digikam::DAlbumDrag::decode(), Digikam::AlbumManager::findPAlbum(), Digikam::AlbumManager::instance(), Digikam::Album::isAncestorOf(), Digikam::Album::isRoot(), Digikam::Album::isTrashAlbum(), model(), and Digikam::MoveAction.
Referenced by dropEvent().
|
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().
|
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().
|
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::AlbumModelDragDropHandler.
References accepts(), Digikam::AlbumModel::albumForIndex(), Digikam::ItemInfo::albumId(), Digikam::DItemDrag::canDecode(), Digikam::DAlbumDrag::canDecode(), Digikam::DCameraItemListDrag::canDecode(), Digikam::DIO::copy(), Digikam::DAlbumDrag::decode(), Digikam::DItemDrag::decode(), Digikam::AlbumManager::findPAlbum(), Digikam::AlbumManager::instance(), model(), Digikam::DIO::move(), Digikam::ImportUI::slotDownload(), and Digikam::AlbumManager::updatePAlbumIcon().
|
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().
AlbumModel * Digikam::AlbumDragDropHandler::model | ( | ) | const |
References Digikam::AlbumModelDragDropHandler::m_model.
Referenced by accepts(), and dropEvent().
|
protectedinherited |
Referenced by model(), Digikam::TagDragDropHandler::model(), and Digikam::AlbumModelDragDropHandler::model().