Isis 3 Programmer Reference
Isis::FileDialog Class Reference

Class for browsing cubes. More...

#include <FileDialog.h>

Inheritance diagram for Isis::FileDialog:
Inheritance graph
Collaboration diagram for Isis::FileDialog:
Collaboration graph

Signals

void fileSelected (QString)
 
void filterSelected (QString)
 

Public Member Functions

 FileDialog (QString title, QStringList &filterList, QDir &directory, QWidget *parent=0)
 
void closeEvent (QCloseEvent *event)
 This method is overridden so that we can be sure to write the current settings of the Main window.
 
void readSettings ()
 This method is called from the constructor so that when the Main window is created, it know's it's size and location.
 
void writeSettings ()
 This method is called when the File Dialog is closed or hidden to write the size and location settings to a config file in the user's home directory.
 

Protected Slots

void sendSignal ()
 This saves the directory that the user selected the file from so it can open to this directory next time.
 
void done ()
 Called when the user presses OK.
 
void done (int r)
 Called when the user presses OK.
 
void cancel ()
 Called when user presses cancel.
 
void saveFilter ()
 This is where we actually set the user editable filters and remember them.
 

Protected Member Functions

bool eventFilter (QObject *o, QEvent *e)
 This event filter is installed on the parent of this window.
 

Private Attributes

QList< QComboBox * > p_comboBoxes
 
QList< QPushButton * > p_allPButtons
 
QString p_appName
 
QDialogp_mainDialog
 
QWidgetp_parent
 
QPushButton * p_filterButton
 
QLineEdit * p_filterLine
 
QStringListp_filterList
 
QDir & p_dir
 

Detailed Description

Class for browsing cubes.

Author
????-??-?? Stacy Alley
History

2008-01-18 Stacy Alley - Changed the constructor to accept a QStringList which serves as the default filters for the file dialog boxes.

2008-01-28 Stacy Alley - Changed the constructor again to accept a QDir which is the default directory the file dialog box should point to.

2011-07-28 Steven Lambright - Now connects to the buttons' clicked signals instead of pressed, clicked is the appropriate signal. Fixes #270

Definition at line 32 of file FileDialog.h.

Constructor & Destructor Documentation

◆ FileDialog()

Isis::FileDialog::FileDialog ( QString title,
QStringList & filterList,
QDir & directory,
QWidget * parent = 0 )

I had to disconnect this buttons signal because I overwrote the

Definition at line 14 of file FileDialog.cpp.

References cancel(), done(), readSettings(), saveFilter(), and sendSignal().

Member Function Documentation

◆ cancel

void Isis::FileDialog::cancel ( )
protectedslot

Called when user presses cancel.

Definition at line 140 of file FileDialog.cpp.

Referenced by FileDialog().

◆ closeEvent()

void Isis::FileDialog::closeEvent ( QCloseEvent * event)

This method is overridden so that we can be sure to write the current settings of the Main window.

Parameters
event

Definition at line 112 of file FileDialog.cpp.

References writeSettings().

◆ done [1/2]

void Isis::FileDialog::done ( )
protectedslot

Called when the user presses OK.

Definition at line 122 of file FileDialog.cpp.

References sendSignal().

Referenced by FileDialog().

◆ done [2/2]

void Isis::FileDialog::done ( int r)
protectedslot

Called when the user presses OK.

Definition at line 131 of file FileDialog.cpp.

◆ eventFilter()

bool Isis::FileDialog::eventFilter ( QObject * o,
QEvent * e )
protected

This event filter is installed on the parent of this window.

When the user closes the main window of the application, the FileDialog will write their settings even though they did not receive the close event themselves.

Parameters
o
e
Returns
bool

Definition at line 200 of file FileDialog.cpp.

References writeSettings().

◆ readSettings()

void Isis::FileDialog::readSettings ( )

This method is called from the constructor so that when the Main window is created, it know's it's size and location.

Definition at line 150 of file FileDialog.cpp.

Referenced by FileDialog().

◆ saveFilter

void Isis::FileDialog::saveFilter ( )
protectedslot

This is where we actually set the user editable filters and remember them.

Definition at line 77 of file FileDialog.cpp.

Referenced by FileDialog().

◆ sendSignal

void Isis::FileDialog::sendSignal ( )
protectedslot

This saves the directory that the user selected the file from so it can open to this directory next time.

Also, emits the signal to open the selected file.

Definition at line 92 of file FileDialog.cpp.

Referenced by done(), and FileDialog().

◆ writeSettings()

void Isis::FileDialog::writeSettings ( )

This method is called when the File Dialog is closed or hidden to write the size and location settings to a config file in the user's home directory.

Definition at line 171 of file FileDialog.cpp.

Referenced by closeEvent(), and eventFilter().

Member Data Documentation

◆ p_allPButtons

QList<QPushButton *> Isis::FileDialog::p_allPButtons
private

Definition at line 58 of file FileDialog.h.

◆ p_appName

QString Isis::FileDialog::p_appName
private

Definition at line 59 of file FileDialog.h.

◆ p_comboBoxes

QList<QComboBox *> Isis::FileDialog::p_comboBoxes
private

Definition at line 57 of file FileDialog.h.

◆ p_dir

QDir& Isis::FileDialog::p_dir
private

Definition at line 65 of file FileDialog.h.

◆ p_filterButton

QPushButton* Isis::FileDialog::p_filterButton
private

Definition at line 62 of file FileDialog.h.

◆ p_filterLine

QLineEdit* Isis::FileDialog::p_filterLine
private

Definition at line 63 of file FileDialog.h.

◆ p_filterList

QStringList& Isis::FileDialog::p_filterList
private

Definition at line 64 of file FileDialog.h.

◆ p_mainDialog

QDialog* Isis::FileDialog::p_mainDialog
private

Definition at line 60 of file FileDialog.h.

◆ p_parent

QWidget* Isis::FileDialog::p_parent
private

Definition at line 61 of file FileDialog.h.


The documentation for this class was generated from the following files: