Isis 3 Programmer Reference
Isis::GuiFileNameParameter Class Reference

#include <GuiFilenameParameter.h>

Inheritance diagram for Isis::GuiFileNameParameter:
Inheritance graph
Collaboration diagram for Isis::GuiFileNameParameter:
Collaboration graph

Public Types

enum  ParameterType {
  IntegerWidget, DoubleWidget, StringWidget, ListWidget,
  FileNameWidget, CubeWidget, BooleanWidget, ComboWidget
}
 

Signals

void ValueChanged ()
 
void HelperTrigger (const QString &)
 

Public Member Functions

 GuiFileNameParameter (QGridLayout *grid, UserInterface &ui, int group, int param)
 Construct a GuiFileNameParameter object. More...
 
 ~GuiFileNameParameter ()
 Destructor of GuiFileNameParameter object. More...
 
QString Value ()
 Gets the value found in the line edit text box. More...
 
void Set (QString newValue)
 Sets the line edit text box to value passed in by this method. More...
 
QString Name () const
 Return the name of the parameter. More...
 
void SetToDefault ()
 Change the parameter to the default value. More...
 
void SetToCurrent ()
 Change the parameter to the current user interface value. More...
 
void SetEnabled (bool enabled, bool isParentCombo=false)
 Enable or disable the parameter. More...
 
bool IsEnabled () const
 Is the parameter enabled. More...
 
virtual bool IsModified ()
 Return if the parameter value is different from the default value. More...
 
void Update ()
 Update the value on the GUI with the value in the UI. More...
 
void RememberWidget (QWidget *w)
 Add widgets to a list for enabling/disabling. More...
 
QWidgetAddHelpers (QObject *lo)
 Sets up helper button. More...
 
virtual std::vector< QString > Exclusions ()
 Return list of current exclusions. More...
 
ParameterType Type ()
 

Protected Slots

virtual void SelectFile ()
 Gets an input/output file from a GUI filechooser or typed in filename. More...
 

Protected Attributes

QToolButton * p_fileButton
 
QLineEdit * p_lineEdit
 
int p_group
 
int p_param
 
QString p_name
 
UserInterfacep_ui
 
QLabel * p_label
 
QList< QWidget * > p_widgetList
 
ParameterType p_type
 

Private Attributes

QMenup_helperMenu
 

Detailed Description

Author
2006-10-31 ???
History:
2009-11-10 Mackenzie Boyd - Moved SelectFile method up to parent class GuiParameter, also moved member pointers to QToolButton and QLineEdit up.
History:
2009-12-15 Travis Addair - Fixed bug with button for opening file dialog, made this class a parent for GuiCubeParameter, and moved SelectFile method back to this class, no longer prompting users to confirm overwriting a file.
History:
2010-07-19 Jeannie Walldren - Modified SelectFile() method to allow users to view files in the directory. Updated documentation.

Definition at line 32 of file GuiFilenameParameter.h.

Constructor & Destructor Documentation

◆ GuiFileNameParameter()

Isis::GuiFileNameParameter::GuiFileNameParameter ( QGridLayout *  grid,
UserInterface ui,
int  group,
int  param 
)

Construct a GuiFileNameParameter object.

Parameters
gridPointer to QGridLayout
uiUser interface object
groupIndex of group
paramIndex of parameter

Definition at line 29 of file GuiFilenameParameter.cpp.

References Isis::GuiParameter::AddHelpers(), Isis::FileName::expanded(), IsisAml::HelpersSize(), Isis::GuiParameter::RememberWidget(), and SelectFile().

◆ ~GuiFileNameParameter()

Isis::GuiFileNameParameter::~GuiFileNameParameter ( )

Destructor of GuiFileNameParameter object.

Definition at line 64 of file GuiFilenameParameter.cpp.

Member Function Documentation

◆ AddHelpers()

◆ Exclusions()

std::vector< QString > Isis::GuiParameter::Exclusions ( )
virtualinherited

Return list of current exclusions.

Reimplemented in Isis::GuiListParameter, Isis::GuiComboBoxParameter, and Isis::GuiBooleanParameter.

Definition at line 239 of file GuiParameter.cpp.

Referenced by Isis::Gui::UpdateExclusions().

◆ IsEnabled()

bool Isis::GuiParameter::IsEnabled ( ) const
inlineinherited

◆ IsModified()

bool Isis::GuiParameter::IsModified ( )
virtualinherited

◆ Name()

QString Isis::GuiParameter::Name ( ) const
inlineinherited

◆ RememberWidget()

void Isis::GuiParameter::RememberWidget ( QWidget w)
inherited

Add widgets to a list for enabling/disabling.

Definition at line 212 of file GuiParameter.cpp.

Referenced by Isis::GuiParameter::AddHelpers(), and GuiFileNameParameter().

◆ SelectFile

void Isis::GuiFileNameParameter::SelectFile ( )
protectedvirtualslot

Gets an input/output file from a GUI filechooser or typed in filename.

This method determines which directory to look in, sets up extension filters, and gets the filename.

History:
2007-05-16 Tracie Sucharski - For files located in CWD, do not include path in the lineEdit.
History:
2007-06-05 Steven Koechle - Corrected problem where output FileName was being opened not saved. Defaulted to output mode if not specified.
History:
2009-11-02 Mackenzie Boyd - Corrected building of filter string to match GuiCubeParameter.cpp and, if no filters specified, to specify "Any(*)" not ";;Any(*)" as it had been doing.
History:
2010-07-19 Jeannie Walldren - Modified to allow users to view files in the directory.

Definition at line 105 of file GuiFilenameParameter.cpp.

References Isis::FileName::dir(), Isis::FileName::expanded(), Isis::FileName::name(), IsisAml::ParamFileMode(), IsisAml::ParamFilter(), IsisAml::ParamInternalDefault(), IsisAml::ParamPath(), and Set().

Referenced by Isis::GuiCubeParameter::GuiCubeParameter(), and GuiFileNameParameter().

◆ Set()

void Isis::GuiFileNameParameter::Set ( QString  newValue)
virtual

Sets the line edit text box to value passed in by this method.

Parameters
newValue

Implements Isis::GuiParameter.

Definition at line 72 of file GuiFilenameParameter.cpp.

Referenced by SelectFile().

◆ SetEnabled()

void Isis::GuiParameter::SetEnabled ( bool  enabled,
bool  isParentCombo = false 
)
inherited

Enable or disable the parameter.

Definition at line 217 of file GuiParameter.cpp.

Referenced by Isis::Gui::UpdateExclusions().

◆ SetToCurrent()

void Isis::GuiParameter::SetToCurrent ( )
inherited

Change the parameter to the current user interface value.

Definition at line 171 of file GuiParameter.cpp.

References IsisAml::GetAsString(), Isis::GuiParameter::SetToDefault(), and IsisAml::WasEntered().

◆ SetToDefault()

void Isis::GuiParameter::SetToDefault ( )
inherited

Change the parameter to the default value.

Definition at line 158 of file GuiParameter.cpp.

References IsisAml::ParamDefault(), and IsisAml::ParamInternalDefault().

Referenced by Isis::GuiParameter::SetToCurrent().

◆ Update()

void Isis::GuiParameter::Update ( )
inherited

◆ Value()

QString Isis::GuiFileNameParameter::Value ( )
virtual

Gets the value found in the line edit text box.

Returns
IString Value found in line edit text box

Implements Isis::GuiParameter.

Definition at line 82 of file GuiFilenameParameter.cpp.

Referenced by Isis::GuiCubeParameter::ViewCube(), and Isis::GuiCubeParameter::ViewLabel().


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