QGIS API Documentation
2.6.0-Brighton
|
A line edit for capturing file names that can have files dropped onto it via drag & drop. More...
#include <qgsfiledropedit.h>
Public Member Functions | |
QgsFileDropEdit (QWidget *parent=0) | |
virtual | ~QgsFileDropEdit () |
bool | isDirOnly () const |
void | setDirOnly (bool isDirOnly) |
bool | isFileOnly () const |
void | setFileOnly (bool isFileOnly) |
const QString & | suffixFilter () const |
void | setSuffixFilter (const QString &suffix) |
Protected Member Functions | |
virtual void | dragEnterEvent (QDragEnterEvent *event) |
virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
virtual void | dropEvent (QDropEvent *event) |
virtual void | paintEvent (QPaintEvent *e) |
A line edit for capturing file names that can have files dropped onto it via drag & drop.
The QgsDropNameEdit class provides a line edit widget which accepts file drops.
Dropping can be limited to files only, files with a specific extension or directories only. By default, dropping is limited to files only.
QgsFileDropEdit::QgsFileDropEdit | ( | QWidget * | parent = 0 | ) |
|
virtual |
|
protectedvirtual |
Check if dragged object is acceptible. Called when a drag is in progress and the mouse enters this widget.
|
protectedvirtual |
Called when a drag is in progress and the mouse leaves this widget.
|
protectedvirtual |
Receive the dragged object. Called when the drag is dropped on this widget.
|
inline |
|
inline |
|
protectedvirtual |
Paints line edit with drag highlight in response to a paint event.
void QgsFileDropEdit::setDirOnly | ( | bool | isDirOnly | ) |
Limit drops to directories.
void QgsFileDropEdit::setFileOnly | ( | bool | isFileOnly | ) |
Limit drops to files.
void QgsFileDropEdit::setSuffixFilter | ( | const QString & | suffix | ) |
Limit drops to files with specified extension.
|
inline |