Isis Developer Reference
FileDialog.h
Go to the documentation of this file.
1 #ifndef FileDialog_h
2 #define FileDialog_h
3 
4 #include <QFileDialog>
5 #include <QtGui>
6 #include <QSettings>
7 #include "FileName.h"
8 #include "FileTool.h"
9 
10 class QComboBox;
11 class QLineEdit;
12 
13 namespace Isis {
32  class FileDialog : public QFileDialog {
33  Q_OBJECT
34  public:
35  FileDialog(QString title, QStringList &filterList, QDir &directory, QWidget *parent = 0);
36  void closeEvent(QCloseEvent *event);
37  void readSettings();
38  void writeSettings();
39 
40  protected:
41  bool eventFilter(QObject *o, QEvent *e);
42 
43  protected slots:
44  void sendSignal();
45 
46  void done();
47  void done(int r);
48 
49  void cancel();
50  void saveFilter();
51 
52  signals:
53  void fileSelected(QString);
54  void filterSelected(QString);
55 
56  private:
57  QList<QComboBox *> p_comboBoxes;
58  QList<QPushButton *> p_allPButtons;
59  QString p_appName;
60  QDialog *p_mainDialog;
61  QWidget *p_parent;
62  QPushButton *p_filterButton;
63  QLineEdit *p_filterLine;
64  QStringList &p_filterList;
65  QDir &p_dir;
66  //QStringList &p_fileList;
67 
68  };
69 };
70 
71 #endif
Isis::FileDialog::writeSettings
void writeSettings()
This method is called when the File Dialog is closed or hidden to write the size and location setting...
Definition: FileDialog.cpp:171
FileName.h
QWidget
QList< QComboBox * >
Isis::FileDialog::closeEvent
void closeEvent(QCloseEvent *event)
This method is overridden so that we can be sure to write the current settings of the Main window.
Definition: FileDialog.cpp:112
QFileDialog
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
FileTool.h
Isis::FileDialog
Class for browsing cubes.
Definition: FileDialog.h:32
Isis::FileDialog::sendSignal
void sendSignal()
This saves the directory that the user selected the file from so it can open to this directory next t...
Definition: FileDialog.cpp:92
Isis::FileDialog::done
void done()
Called when the user presses OK.
Definition: FileDialog.cpp:122
QStringList
Isis::FileDialog::cancel
void cancel()
Called when user presses cancel.
Definition: FileDialog.cpp:140
IString.h
QComboBox
Isis::FileDialog::filterSelected
void filterSelected(QString)
Isis::FileDialog::eventFilter
bool eventFilter(QObject *o, QEvent *e)
This event filter is installed on the parent of this window.
Definition: FileDialog.cpp:200
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
FileDialog.h
Isis::FileDialog::saveFilter
void saveFilter()
This is where we actually set the user editable filters and remember them.
Definition: FileDialog.cpp:77
Isis::FileDialog::FileDialog
FileDialog(QString title, QStringList &filterList, QDir &directory, QWidget *parent=0)
Definition: FileDialog.cpp:14
QDialog
QObject
Isis::FileDialog::readSettings
void readSettings()
This method is called from the constructor so that when the Main window is created,...
Definition: FileDialog.cpp:150
Isis::FileDialog::fileSelected
void fileSelected(QString)
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16