1 #ifndef SUIT_FILEDIALOG_H
2 #define SUIT_FILEDIALOG_H
6 #include <qfiledialog.h>
11 class SUIT_FileValidator;
13 /*! \class QFileDialog
14 * For more information see <a href="http://doc.trolltech.com">QT documentation</a>.
16 class SUIT_EXPORT SUIT_FileDlg : public QFileDialog
21 SUIT_FileDlg( QWidget*, bool open, bool showQuickDir = true, bool modal = true );
22 virtual ~SUIT_FileDlg();
25 bool isOpenDlg() const;
26 QString selectedFile() const;
28 void setValidator( SUIT_FileValidator* );
30 static QString getFileName( QWidget* parent, const QString& initial, const QStringList& filters,
31 const QString& caption, const bool open, const bool showQuickDir = true,
32 SUIT_FileValidator* validator = 0 );
33 static QStringList getOpenFileNames( QWidget* parent, const QString& initial, const QStringList& filters,
34 const QString& caption, bool showQuickDir = true,
35 SUIT_FileValidator* validator = 0 );
36 static QString getExistingDirectory( QWidget* parent, const QString& initial,
37 const QString& caption, const bool showQuickDir = true );
45 bool processPath( const QString& path );
50 void quickDir( const QString& );
54 bool myOpen; //!< open/save selector
55 QString mySelectedFile; //!< selected filename
56 SUIT_FileValidator* myValidator; //!< file validator
57 QLabel* myQuickLab; //!< quick dir combo box
58 QComboBox* myQuickCombo; //!< quick dir combo box
59 QPushButton* myQuickButton; //!< quick dir add button
62 * \brief flag is used to warkaround the Qt 2.2.2
63 * \bug accept() method is called twice if user presses 'Enter' key
64 * in file name editor while file name is not acceptable by acceptData()
65 * (e.g. permission denied)
69 static QString myLastVisitedPath; //!< last visited path