digikam
Digikam::AlbumModelDragDropHandler Class Reference
#include <albummodeldragdrophandler.h>

Public Member Functions | |
| AlbumModelDragDropHandler (AbstractAlbumModel *model) | |
| virtual | ~AlbumModelDragDropHandler () |
| virtual Qt::DropAction | accepts (const QDropEvent *e, const QModelIndex &dropIndex) |
| virtual bool | acceptsMimeData (const QMimeData *data) |
| virtual QMimeData * | createMimeData (const QList< Album * > &) |
| virtual bool | dropEvent (QAbstractItemView *view, const QDropEvent *e, const QModelIndex &droppedOn) |
| virtual QStringList | mimeTypes () const |
| AbstractAlbumModel * | model () const |
Protected Attributes | |
| AbstractAlbumModel * | m_model |
Detailed Description
Definition at line 38 of file albummodeldragdrophandler.h.
Constructor & Destructor Documentation
| Digikam::AlbumModelDragDropHandler::AlbumModelDragDropHandler | ( | AbstractAlbumModel * | model | ) |
Definition at line 37 of file albummodeldragdrophandler.cpp.
| virtual Digikam::AlbumModelDragDropHandler::~AlbumModelDragDropHandler | ( | ) | [inline, virtual] |
Definition at line 44 of file albummodeldragdrophandler.h.
Member Function Documentation
| Qt::DropAction Digikam::AlbumModelDragDropHandler::accepts | ( | const QDropEvent * | e, | |
| const QModelIndex & | dropIndex | |||
| ) | [virtual] |
Returns if the given mime data is accepted for drop on dropIndex.
Returns the proposed action, or Qt::IgnoreAction if not accepted.
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
Definition at line 52 of file albummodeldragdrophandler.cpp.
| bool Digikam::AlbumModelDragDropHandler::acceptsMimeData | ( | const QMimeData * | data | ) | [virtual] |
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.
Definition at line 67 of file albummodeldragdrophandler.cpp.
| QMimeData * Digikam::AlbumModelDragDropHandler::createMimeData | ( | const QList< Album * > & | ) | [virtual] |
Create a mime data object for starting a drag from the given Albums.
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
Definition at line 62 of file albummodeldragdrophandler.cpp.
| bool Digikam::AlbumModelDragDropHandler::dropEvent | ( | QAbstractItemView * | view, | |
| const QDropEvent * | e, | |||
| const QModelIndex & | droppedOn | |||
| ) | [virtual] |
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 in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
Definition at line 47 of file albummodeldragdrophandler.cpp.
| QStringList Digikam::AlbumModelDragDropHandler::mimeTypes | ( | ) | const [virtual] |
Returns the supported mime types.
Called by the default implementation of model's mimeTypes().
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
Definition at line 57 of file albummodeldragdrophandler.cpp.
| AbstractAlbumModel * Digikam::AlbumModelDragDropHandler::model | ( | ) | const |
Reimplemented in Digikam::AlbumDragDropHandler, and Digikam::TagDragDropHandler.
Definition at line 42 of file albummodeldragdrophandler.cpp.
Member Data Documentation
Definition at line 75 of file albummodeldragdrophandler.h.
The documentation for this class was generated from the following files:
KDE 4.5 API Reference