casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FileLoader.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef FILELOADER_QO_H
26 #define FILELOADER_QO_H
27 
28 #include <QDialog>
29 #include <guitools/Feather/FileLoader.ui.h>
30 
31 class QFileSystemModel;
32 class QKeyEvent;
33 
34 namespace casa {
35 
36 class FileLoader : public QDialog
37 {
38  Q_OBJECT
39 
40 public:
41  FileLoader(QWidget *parent = 0);
42  ~FileLoader();
43  QString getFilePathLowResolution() const;
44  QString getFilePathHighResolution() const;
45  QString getFilePathOutput() const;
46  QString getFileDirty() const;
47  bool isOutputSaved() const;
48  void updateOutput(const QString& directory, const QString& file );
49 
50 signals:
51  void imageFilesChanged();
52 
53 public slots:
54  void saveStateChanged( int checked );
55 
56 protected:
57  void keyPressEvent( QKeyEvent* event );
58 
59 private slots:
60  void filesChanged();
61  void filesReset();
62  void directoryChanged(const QModelIndex& modelIndex );
66  void dirtyImageChanged();
67  void validateDirectory( const QString& str );
68 
69 private:
70  bool validatePath( QLineEdit* lineEdit, const QString& errorPrefix, bool file, QString& destination );
71  void fileChanged( QLineEdit* destinationLineEdit, const QString& emptyWarning, bool directory );
74  QString outputFile;
75  QString outputDirectory;
76  QString dirtyImageFile;
77  QFileSystemModel* fileModel;
78  bool saveOutput;
79  Ui::FileLoaderClass ui;
80 };
81 
82 }
83 
84 #endif // FILELOADER_QO_H
QString getFilePathOutput() const
QString getFilePathHighResolution() const
void validateDirectory(const QString &str)
void keyPressEvent(QKeyEvent *event)
QString highResolutionImageFile
Definition: FileLoader.qo.h:73
Ui::FileLoaderClass ui
Definition: FileLoader.qo.h:79
void fileChanged(QLineEdit *destinationLineEdit, const QString &emptyWarning, bool directory)
void fileLowResolutionChanged()
void outputDirectoryChanged()
QString dirtyImageFile
Definition: FileLoader.qo.h:76
void imageFilesChanged()
void saveStateChanged(int checked)
void fileHighResolutionChanged()
FileLoader(QWidget *parent=0)
QString getFilePathLowResolution() const
QString getFileDirty() const
void dirtyImageChanged()
bool isOutputSaved() const
void updateOutput(const QString &directory, const QString &file)
QString lowResolutionImageFile
Definition: FileLoader.qo.h:72
void directoryChanged(const QModelIndex &modelIndex)
QString outputDirectory
Definition: FileLoader.qo.h:75
QFileSystemModel * fileModel
Definition: FileLoader.qo.h:77
bool validatePath(QLineEdit *lineEdit, const QString &errorPrefix, bool file, QString &destination)
Defines nreal time structures used by the VLA table filler.
Definition: nreal.h:100