Filer
Public Slots | Public Member Functions | List of all members
DragAndDropHandler Class Reference

Handles drag and drop events for a QAbstractItemView so that we don't have to implement the same code in multiple views. It is a friend class of QAbstractItemView. More...

#include <DragAndDropHandler.h>

Inheritance diagram for DragAndDropHandler:
Inheritance graph
[legend]
Collaboration diagram for DragAndDropHandler:
Collaboration graph
[legend]

Public Slots

void handleDragEnterEvent (QDragEnterEvent *event)
 Handles the drag enter event. More...
 
void handleDragMoveEvent (QDragMoveEvent *event)
 Handles the drag move event. More...
 
void handleDropEvent (QDropEvent *event)
 Handles the drop event. More...
 
void handleDragLeaveEvent (QDragLeaveEvent *event)
 Handles the drag leave event. More...
 

Public Member Functions

 DragAndDropHandler (QAbstractItemView *view, QObject *parent=nullptr)
 Constructs a DragAndDropHandler with the given QAbstractItemView and parent object. More...
 

Detailed Description

Handles drag and drop events for a QAbstractItemView so that we don't have to implement the same code in multiple views. It is a friend class of QAbstractItemView.

Constructor & Destructor Documentation

◆ DragAndDropHandler()

DragAndDropHandler::DragAndDropHandler ( QAbstractItemView *  view,
QObject *  parent = nullptr 
)
explicit

Constructs a DragAndDropHandler with the given QAbstractItemView and parent object.

Parameters
viewThe QAbstractItemView for which drag and drop events should be handled.
parentThe parent QObject for this handler (optional).

Member Function Documentation

◆ handleDragEnterEvent

void DragAndDropHandler::handleDragEnterEvent ( QDragEnterEvent *  event)
slot

Handles the drag enter event.

Parameters
eventThe QDragEnterEvent containing information about the drag and drop operation.

◆ handleDragLeaveEvent

void DragAndDropHandler::handleDragLeaveEvent ( QDragLeaveEvent *  event)
slot

Handles the drag leave event.

Parameters
eventThe QDragLeaveEvent containing information about the drag and drop operation.

◆ handleDragMoveEvent

void DragAndDropHandler::handleDragMoveEvent ( QDragMoveEvent *  event)
slot

Handles the drag move event.

Parameters
eventThe QDragMoveEvent containing information about the drag and drop operation.

◆ handleDropEvent

void DragAndDropHandler::handleDropEvent ( QDropEvent *  event)
slot

Handles the drop event.

Parameters
eventThe QDropEvent containing information about the drag and drop operation.

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