QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
QgsFileDropEdit Class Reference

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)

Detailed Description

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.

Constructor & Destructor Documentation

QgsFileDropEdit::QgsFileDropEdit ( QWidget *  parent = 0)
QgsFileDropEdit::~QgsFileDropEdit ( )
virtual

Member Function Documentation

void QgsFileDropEdit::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

Check if dragged object is acceptible. Called when a drag is in progress and the mouse enters this widget.

void QgsFileDropEdit::dragLeaveEvent ( QDragLeaveEvent *  event)
protectedvirtual

Called when a drag is in progress and the mouse leaves this widget.

void QgsFileDropEdit::dropEvent ( QDropEvent *  event)
protectedvirtual

Receive the dragged object. Called when the drag is dropped on this widget.

bool QgsFileDropEdit::isDirOnly ( ) const
inline
bool QgsFileDropEdit::isFileOnly ( ) const
inline
void QgsFileDropEdit::paintEvent ( QPaintEvent *  e)
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.

const QString& QgsFileDropEdit::suffixFilter ( ) const
inline

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