digiKam
Digikam::DragDropViewImplementation Class Referenceabstract
+ Inheritance diagram for Digikam::DragDropViewImplementation:

Public Member Functions

virtual void copy ()
 
virtual void cut ()
 
 DragDropViewImplementation ()=default
 
virtual void paste ()
 
virtual ~DragDropViewImplementation ()=default
 

Protected Member Functions

virtual QAbstractItemView * asView ()=0
 
bool decodeIsCutSelection (const QMimeData *mimeData)
 
virtual AbstractItemDragDropHandlerdragDropHandler () const =0
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dragMoveEvent (QDragMoveEvent *e)
 
void dropEvent (QDropEvent *e)
 
void encodeIsCutSelection (QMimeData *mime, bool isCutSelection)
 
virtual QModelIndex mapIndexForDragDrop (const QModelIndex &index) const =0
 
virtual QPixmap pixmapForDrag (const QList< QModelIndex > &indexes) const =0
 
void startDrag (Qt::DropActions supportedActions)
 

Constructor & Destructor Documentation

◆ DragDropViewImplementation()

Digikam::DragDropViewImplementation::DragDropViewImplementation ( )
default

◆ ~DragDropViewImplementation()

virtual Digikam::DragDropViewImplementation::~DragDropViewImplementation ( )
virtualdefault

Member Function Documentation

◆ asView()

virtual QAbstractItemView* Digikam::DragDropViewImplementation::asView ( )
protectedpure virtual

This one is implemented by DECLARE_VIEW_DRAG_DROP_METHODS.

Referenced by copy(), cut(), dragMoveEvent(), dropEvent(), paste(), and startDrag().

◆ copy()

void Digikam::DragDropViewImplementation::copy ( )
virtual

◆ cut()

void Digikam::DragDropViewImplementation::cut ( )
virtual

◆ decodeIsCutSelection()

bool Digikam::DragDropViewImplementation::decodeIsCutSelection ( const QMimeData *  mimeData)
protected

Referenced by paste().

◆ dragDropHandler()

virtual AbstractItemDragDropHandler* Digikam::DragDropViewImplementation::dragDropHandler ( ) const
protectedpure virtual

You need to implement these three methods Returns the drag drop handler.

Implemented in Digikam::ImportCategorizedView, ShowFoto::ShowfotoCategorizedView, Digikam::VersionsTreeView, Digikam::TableViewTreeView, and Digikam::ItemCategorizedView.

Referenced by dragEnterEvent(), dragMoveEvent(), dropEvent(), and paste().

◆ dragEnterEvent()

void Digikam::DragDropViewImplementation::dragEnterEvent ( QDragEnterEvent *  event)
protected

Implements the relevant QAbstractItemView methods for drag and drop.

References Digikam::AbstractItemDragDropHandler::acceptsMimeData(), and dragDropHandler().

◆ dragMoveEvent()

void Digikam::DragDropViewImplementation::dragMoveEvent ( QDragMoveEvent *  e)
protected

◆ dropEvent()

void Digikam::DragDropViewImplementation::dropEvent ( QDropEvent *  e)
protected

◆ encodeIsCutSelection()

void Digikam::DragDropViewImplementation::encodeIsCutSelection ( QMimeData *  mime,
bool  isCutSelection 
)
protected

References cut().

Referenced by copy(), and cut().

◆ mapIndexForDragDrop()

virtual QModelIndex Digikam::DragDropViewImplementation::mapIndexForDragDrop ( const QModelIndex &  index) const
protectedpure virtual

Maps the given index of the view's model to an index of the handler's model, which can be a source model of the view's model.

Implemented in Digikam::ItemViewCategorized, Digikam::VersionsTreeView, and Digikam::TableViewTreeView.

Referenced by dragMoveEvent(), and dropEvent().

◆ paste()

◆ pixmapForDrag()

virtual QPixmap Digikam::DragDropViewImplementation::pixmapForDrag ( const QList< QModelIndex > &  indexes) const
protectedpure virtual

Creates a pixmap for dragging the given indexes.

Implemented in Digikam::ItemViewCategorized, Digikam::VersionsTreeView, and Digikam::TableViewTreeView.

Referenced by startDrag().

◆ startDrag()

void Digikam::DragDropViewImplementation::startDrag ( Qt::DropActions  supportedActions)
protected

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