Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QmitkFileChooser_h_Included
00019 #define QmitkFileChooser_h_Included
00020
00021 #include <QWidget>
00022 #include "QmitkExtExports.h"
00023
00024 class QPushButton;
00025 class QLineEdit;
00026
00031 class QmitkExt_EXPORT QmitkFileChooser : public QWidget
00032 {
00033 Q_OBJECT
00034
00035 public:
00036 explicit QmitkFileChooser( bool horizontalLayout=false,
00037 bool selectDir = false,
00038 bool fileMustExist = true,
00039 QWidget* parent = 0
00040 , Qt::WindowFlags f = 0);
00041
00042 void SetHorizotalLayout(bool horizontalLayout);
00043 void SetSelectDir( bool selectDir );
00044 void SetFileMustExist( bool fileMustExist );
00045 void SetFile( const std::string& file );
00046 void SetFilePattern( const std::string& filepattern );
00047
00048 bool IsValidFile() const;
00049 virtual std::string GetFile() const;
00050
00051 signals:
00052 void NewFileSelected( const std::string& );
00053
00054 protected slots:
00055 virtual void OnSelectFileClicked ( bool );
00056
00057 protected:
00058 bool m_SelectDir;
00059 bool m_FileMustExist;
00060 bool m_ValidFile;
00061
00062 QString m_FilePattern;
00063 QPushButton* m_SelectFile;
00064 QLineEdit* m_File;
00065 };
00066
00067 #endif
00068