ImageLoader.qo.h
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
00019
00020
00021
00022
00023
00024
00025 #ifndef IMAGELOADER_QO_H
00026 #define IMAGELOADER_QO_H
00027
00028 #include <QtGui/QDialog>
00029 #include <guitools/Histogram/ImageLoader.ui.h>
00030
00031 class QFileSystemModel;
00032 class QKeyEvent;
00033
00034 namespace casa {
00035
00041 class ImageLoader : public QDialog
00042 {
00043 Q_OBJECT
00044
00045 public:
00046 ImageLoader(QWidget *parent = 0);
00047 ~ImageLoader();
00048 QString getFilePath() const;
00049
00050 signals:
00051 void imageFileChanged();
00052
00053 protected:
00054 void keyPressEvent( QKeyEvent* event );
00055
00056 private slots:
00057 void fileChanged();
00058 void fileReset();
00059 void directoryChanged(const QModelIndex& modelIndex );
00060
00061 void validateDirectory( const QString& str );
00062
00063 private:
00064 ImageLoader( const ImageLoader& );
00065 ImageLoader& operator=( const ImageLoader& );
00066 bool validatePath( QLineEdit* lineEdit, const QString& errorPrefix, bool file, QString& destination );
00067 void fileChanged( QLineEdit* destinationLineEdit, const QString& emptyWarning, bool directory );
00068
00069 QString imageFile;
00070 QFileSystemModel* fileModel;
00071 bool saveOutput;
00072 Ui::ImageLoaderClass ui;
00073 };
00074
00075 }
00076
00077 #endif // FILELOADER_QO_H