Isis 3 Programmer Reference
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. More...
 
void setAsIs (bool)
 Check ExportAsIs radio button and if checked set the saveAsType to ExportAsIs. More...
 
void setFullResolution (bool)
 Check ExportFullRes radio button and if checked set the saveAsType to ExportFullRes. More...
 

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. More...
 
int getSaveAsType ()
 Get user chosen save type. 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 done (int r)
 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...
 
QRadioButton * p_fullImage
 FullImage Button. More...
 
QRadioButton * p_exportAsIs
 ExportAsIs Button. More...
 
QRadioButton * p_exportFullRes
 ExportFullRes Button. More...
 
saveAsType p_saveAsType
 Current Save Type. More...
 

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

2017-06-01 Kaj Williams - renamed "save as ..." radio buttons to reflect their actual usage. Updated the associated tooltips. Also updated the "enum saveAsType" documentation.

Definition at line 48 of file SaveAsDialog.h.

Member Enumeration Documentation

◆ saveAsType

Parameters
FullImage,ExportAsIs,ExportFullRes

Definition at line 55 of file SaveAsDialog.h.

Constructor & Destructor Documentation

◆ SaveAsDialog()

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 24 of file SaveAsDialog.cpp.

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

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().

◆ 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::FileDialog::done ( int  r)
protectedslotinherited

Called when the user presses OK.

Definition at line 131 of file FileDialog.cpp.

◆ 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().

◆ getSaveAsType()

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

References p_exportAsIs, and p_exportFullRes.

◆ 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().

◆ setAsIs

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 118 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

◆ setFullImage

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 103 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

◆ setFullResolution

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 133 of file SaveAsDialog.cpp.

References p_saveAsType.

Referenced by SaveAsDialog().

◆ 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::SaveAsDialog::p_dir
private

The directory to open the dialog with.

Definition at line 64 of file SaveAsDialog.h.

◆ p_exportAsIs

QRadioButton* Isis::SaveAsDialog::p_exportAsIs
private

ExportAsIs Button.

Definition at line 66 of file SaveAsDialog.h.

Referenced by getSaveAsType(), and SaveAsDialog().

◆ p_exportFullRes

QRadioButton* Isis::SaveAsDialog::p_exportFullRes
private

ExportFullRes Button.

Definition at line 67 of file SaveAsDialog.h.

Referenced by getSaveAsType(), and SaveAsDialog().

◆ p_fullImage

QRadioButton* Isis::SaveAsDialog::p_fullImage
private

FullImage Button.

Definition at line 65 of file SaveAsDialog.h.

Referenced by SaveAsDialog().

◆ p_saveAsType

saveAsType Isis::SaveAsDialog::p_saveAsType
private

Current Save Type.

Definition at line 68 of file SaveAsDialog.h.

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


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