1
/***************************************************************************
2
qgsfiledropedit.h - File Dropable LineEdit
3
--------------------------------------
5
Copyright : (C) 2007 by Tom Elwertowski
6
Email : telwertowski at users dot sourceforge dot net
7
***************************************************************************
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
14
***************************************************************************/
16
#ifndef QGSFILEDROPEDIT_H
17
#define QGSFILEDROPEDIT_H
22
* A line edit for capturing file names that can have files dropped onto
25
class GUI_EXPORT QgsFileDropEdit: public QLineEdit
28
QgsFileDropEdit( QWidget *parent = 0 );
29
virtual ~QgsFileDropEdit();
31
bool isDirOnly() const { return mDirOnly; }
32
void setDirOnly( bool isDirOnly );
34
bool isFileOnly() const { return mFileOnly; }
35
void setFileOnly( bool isFileOnly );
37
const QString& suffixFilter() const { return mSuffix; }
38
void setSuffixFilter( const QString& suffix );
42
virtual void dragEnterEvent( QDragEnterEvent *event );
43
virtual void dragLeaveEvent( QDragLeaveEvent *event );
44
virtual void dropEvent( QDropEvent *event );
45
virtual void paintEvent( QPaintEvent *e );
48
QString acceptableFilePath( QDropEvent *event ) const;