API Documentation
Loading...
Searching...
No Matches
FileDropFrame Class Reference

A simple frame that allows the user to drag and drop a file into it. More...

#include <FileDropFrame.h>

Inheritance diagram for FileDropFrame:
[legend]
Collaboration diagram for FileDropFrame:
[legend]

Public Member Functions

void dragEnterEvent (QDragEnterEvent *event)
 
void dropEvent (QDropEvent *event)
 
 FileDropFrame (QWidget *parent=nullptr)
 
void setDropCallback (const std::function< void(QDropEvent *event)> &drop_callback)
 
void setDropFilter (std::function< bool(const QMimeData *event)> filter)
 

Protected Attributes

std::function< void(QDropEvent *event)> m_drop_callback
 
std::function< bool(const QMimeData *event)> m_drop_filter
 

Detailed Description

A simple frame that allows the user to drag and drop a file into it.


Constructor & Destructor Documentation

◆ FileDropFrame()

FileDropFrame ( QWidget * parent = nullptr)
inline

Member Function Documentation

◆ dragEnterEvent()

void dragEnterEvent ( QDragEnterEvent * event)
inline

◆ dropEvent()

void dropEvent ( QDropEvent * event)
inline

◆ setDropCallback()

void setDropCallback ( const std::function< void(QDropEvent *event)> & drop_callback)
inline

◆ setDropFilter()

void setDropFilter ( std::function< bool(const QMimeData *event)> filter)
inline

Member Data Documentation

◆ m_drop_callback

std::function<void(QDropEvent* event)> m_drop_callback
protected

◆ m_drop_filter

std::function<bool(const QMimeData* event)> m_drop_filter
protected

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