USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::SaveAsDialog Class Reference

Widget to save(Save As) Isis cubes(used in qview) to display the FileDialog to select the output cube. More...

#include <SaveAsDialog.h>

Inheritance diagram for Isis::SaveAsDialog:
Inheritance graph
Collaboration diagram for Isis::SaveAsDialog:
Collaboration graph

Public Types

enum  saveAsType { FullImage, ExportAsIs, ExportFullRes }
 

Public Slots

void setFullImage (bool)
 Check FullImage radio button and if checked set the saveAsType to FullImage.
 
void setAsIs (bool)
 Check ExportAsIs radio button and if checked set the saveAsType to ExportAsIs.
 
void setFullResolution (bool)
 Check ExportFullRes radio button and if checked set the saveAsType to ExportFullRes.
 

Signals

void fileSelected (QString)
 
void filterSelected (QString)
 

Public Member Functions

 SaveAsDialog (QString pTitle, QStringList &pFilterList, QDir &pDir, QWidget *pParent=0)
 Constructor - Displays FileDialog with different save options.
 
int getSaveAsType ()
 Get user chosen save type.
 
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 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

QDir & p_dir
 The directory to open the dialog with.
 
QRadioButton * p_fullImage
 FullImage Button.
 
QRadioButton * p_exportAsIs
 ExportAsIs Button.
 
QRadioButton * p_exportFullRes
 ExportFullRes Button.
 
saveAsType p_saveAsType
 Current Save Type.
 

Detailed Description

Widget to save(Save As) Isis cubes(used in qview) to display the FileDialog to select the output cube.

This dialog additionally displays radio buttons for choices FullImage, ExportAsIs, ExportFullRes. These choices are located at the bottom of the dialog.

FullImage - copies the entire image into the user specified output file ExportAsIs - copies the image as displayed in the qview app window ExportFullRes - copies the image as displayed in the qview app window but with full resolution

Author
2011-05-11 Sharmila Prasad
History:
2011-05-11 Sharmila Prasad - Initial Version

Definition at line 46 of file SaveAsDialog.h.

Constructor & Destructor Documentation

Isis::SaveAsDialog::SaveAsDialog ( QString  pTitle,
QStringList pFilterList,
QDir &  pDir,
QWidget pParent = 0 
)

Constructor - Displays FileDialog with different save options.

Author
Sharmila Prasad (5/11/2011)
Parameters
pTitle- Dialog Title
pFilterList- Dialog Filter list
pDir- Current Directory
pParent- Parent widget

Edit the second (Cancel) button title.

Definition at line 20 of file SaveAsDialog.cpp.

References p_exportAsIs, p_exportFullRes, p_fullImage, p_saveAsType, setAsIs(), setFullImage(), and setFullResolution().

Member Function Documentation

void Isis::FileDialog::cancel ( )
protectedslotinherited

Called when user presses cancel.

Definition at line 127 of file FileDialog.cpp.

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

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 106 of file FileDialog.cpp.

References Isis::FileDialog::writeSettings().

void Isis::FileDialog::done ( )
protectedslotinherited

Called when the user presses OK.

Definition at line 116 of file FileDialog.cpp.

References Isis::FileDialog::sendSignal().

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

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 187 of file FileDialog.cpp.

References Isis::FileDialog::writeSettings().

int Isis::SaveAsDialog::getSaveAsType ( )

Get user chosen save type.

Author
Sharmila Prasad (5/11/2011)
Returns
int - Return user chosen save type

Definition at line 81 of file SaveAsDialog.cpp.

References p_exportAsIs, and p_exportFullRes.

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 137 of file FileDialog.cpp.

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

void Isis::FileDialog::saveFilter ( )
protectedslotinherited

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

Definition at line 71 of file FileDialog.cpp.

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

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 86 of file FileDialog.cpp.

Referenced by Isis::FileDialog::done(), and Isis::FileDialog::FileDialog().

void Isis::SaveAsDialog::setAsIs ( bool  pbChecked)
slot

Check ExportAsIs radio button and if checked set the saveAsType to ExportAsIs.

Author
Sharmila Prasad (5/11/2011)
Parameters
pbChecked- Button Checked(true/false)

Definition at line 113 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

void Isis::SaveAsDialog::setFullImage ( bool  pbChecked)
slot

Check FullImage radio button and if checked set the saveAsType to FullImage.

Author
Sharmila Prasad (5/11/2011)
Parameters
pbChecked- Button Checked(true/false)

Definition at line 98 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

void Isis::SaveAsDialog::setFullResolution ( bool  pbChecked)
slot

Check ExportFullRes radio button and if checked set the saveAsType to ExportFullRes.

Author
Sharmila Prasad (5/11/2011)
Parameters
pbChecked- Button Checked(true/false)

Definition at line 128 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

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 158 of file FileDialog.cpp.

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

Member Data Documentation

QDir& Isis::SaveAsDialog::p_dir
private

The directory to open the dialog with.

Definition at line 59 of file SaveAsDialog.h.

QRadioButton* Isis::SaveAsDialog::p_exportAsIs
private

ExportAsIs Button.

Definition at line 61 of file SaveAsDialog.h.

Referenced by getSaveAsType(), and SaveAsDialog().

QRadioButton* Isis::SaveAsDialog::p_exportFullRes
private

ExportFullRes Button.

Definition at line 62 of file SaveAsDialog.h.

Referenced by getSaveAsType(), and SaveAsDialog().

QRadioButton* Isis::SaveAsDialog::p_fullImage
private

FullImage Button.

Definition at line 60 of file SaveAsDialog.h.

Referenced by SaveAsDialog().

saveAsType Isis::SaveAsDialog::p_saveAsType
private

Current Save Type.

Definition at line 63 of file SaveAsDialog.h.

Referenced by SaveAsDialog(), setAsIs(), setFullImage(), and setFullResolution().


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