Isis 3 Programmer Reference
Isis::BrowseDialog Class Reference

Class for browsing cubes. More...

#include <BrowseDialog.h>

Inheritance diagram for Isis::BrowseDialog:
Inheritance graph
Collaboration diagram for Isis::BrowseDialog:
Collaboration graph

Public Slots

void displayCube ()
 This method is called after the user has selected a file either by double clicking on the file name or by pressing the 'view' button. More...
 
void done (int r)
 This is an overridden method from QDialog. More...
 

Signals

void fileSelected (QString)
 
void filterSelected (QString)
 

Public Member Functions

 BrowseDialog (QString title, QStringList &filterList, QDir &dir, QWidget *parent=0)
 BrowseDialog constructor. More...
 
void closeEvent (QCloseEvent *event)
 This method is overridden so that we can be sure to write the current settings of the Main window. More...
 
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. More...
 
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. More...
 

Protected Slots

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

Protected Member Functions

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

Private Attributes

QDir & p_dir
 The directory to open the dialog with. More...
 
QList< QComboBox * > p_comboBoxes
 
QList< QPushButton * > p_allPButtons
 
QString p_appName
 
QDialogp_mainDialog
 
QWidgetp_parent
 
QPushButton * p_filterButton
 
QLineEdit * p_filterLine
 
QStringListp_filterList
 

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.
History:
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. When the user changes directories, the dir variable which is passed by reference set to that new directory.

Definition at line 36 of file BrowseDialog.h.

Constructor & Destructor Documentation

◆ BrowseDialog()

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

BrowseDialog constructor.

Parameters
title
filterList
directory
parent

Definition at line 28 of file BrowseDialog.cpp.

References displayCube().

Member Function Documentation

◆ cancel

void Isis::FileDialog::cancel ( )
protectedslotinherited

Called when user presses cancel.

Definition at line 140 of file FileDialog.cpp.

Referenced by Isis::FileDialog::FileDialog().

◆ closeEvent()

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

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 Isis::FileDialog::writeSettings().

◆ displayCube

void Isis::BrowseDialog::displayCube ( )
slot

This method is called after the user has selected a file either by double clicking on the file name or by pressing the 'view' button.

A signal is emitted which eventually calls the addBrowseView function from the Workspace object.

Definition at line 54 of file BrowseDialog.cpp.

References p_dir.

Referenced by BrowseDialog(), and done().

◆ done [1/2]

void Isis::FileDialog::done ( )
protectedslotinherited

Called when the user presses OK.

Definition at line 122 of file FileDialog.cpp.

References Isis::FileDialog::sendSignal().

Referenced by Isis::FileDialog::FileDialog().

◆ done [2/2]

void Isis::BrowseDialog::done ( int  r)
slot

This is an overridden method from QDialog.

QDialog closes the dialog. We want to leave the box open and display the cube in the view port.

Parameters
r

Definition at line 79 of file BrowseDialog.cpp.

References displayCube().

◆ eventFilter()

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

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 Isis::FileDialog::writeSettings().

◆ readSettings()

void Isis::FileDialog::readSettings ( )
inherited

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.

References Isis::FileName::expanded().

Referenced by Isis::FileDialog::FileDialog().

◆ saveFilter

void Isis::FileDialog::saveFilter ( )
protectedslotinherited

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

Definition at line 77 of file FileDialog.cpp.

Referenced by Isis::FileDialog::FileDialog().

◆ sendSignal

void Isis::FileDialog::sendSignal ( )
protectedslotinherited

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 Isis::FileDialog::done(), and Isis::FileDialog::FileDialog().

◆ writeSettings()

void Isis::FileDialog::writeSettings ( )
inherited

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.

References Isis::FileName::expanded().

Referenced by Isis::FileDialog::closeEvent(), and Isis::FileDialog::eventFilter().

Member Data Documentation

◆ p_dir

QDir& Isis::BrowseDialog::p_dir
private

The directory to open the dialog with.

Definition at line 46 of file BrowseDialog.h.

Referenced by displayCube().


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