USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::GuiCubeParameter Class Reference

#include <GuiCubeParameter.h>

Inheritance diagram for Isis::GuiCubeParameter:
Inheritance graph
Collaboration diagram for Isis::GuiCubeParameter:
Collaboration graph

Public Types

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

Signals

void ValueChanged ()
 
void HelperTrigger (const QString &)
 

Public Member Functions

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

Protected Slots

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

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 Slots

void SelectAttribute ()
 Select cube attributes.
 
void ViewCube ()
 Opens cube in qview.
 
void ViewLabel ()
 Displays cube label in the GUI log.
 

Private Attributes

QMenu * p_menu
 

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.

2009-12-15 Travis Addair - Fixed bug with button for opening file dialog, made this class a child of GuiFileNameParameter, and moved SelectFile method back to this class, no longer prompting users to confirm overwriting a file.

2010-07-19 Jeannie Walldren - Removed SelectFile() method since it was identical to parent's method after output file options were modified. Updated documentation. Removed unnecessary #includes.

Definition at line 49 of file GuiCubeParameter.h.

Constructor & Destructor Documentation

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

Constructs GuiCubeParameter object.

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

Definition at line 59 of file GuiCubeParameter.cpp.

References SelectAttribute(), Isis::GuiFileNameParameter::SelectFile(), ViewCube(), and ViewLabel().

Isis::GuiCubeParameter::~GuiCubeParameter ( )

Destructor of GuiCubeParameter object.

Definition at line 98 of file GuiCubeParameter.cpp.

Member Function Documentation

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

Return list of current exclusions.

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

Definition at line 255 of file GuiParameter.cpp.

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

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

Return if the parameter value is different from the default value.

Reimplemented in Isis::GuiBooleanParameter.

Definition at line 197 of file GuiParameter.cpp.

References Isis::GuiParameter::IsEnabled(), IsisAml::ParamDefault(), and IsisAml::ParamInternalDefault().

Referenced by Isis::Gui::InvokeHelper(), Isis::Gui::StartProcess(), Isis::Gui::UpdateCommandLine(), ViewCube(), and ViewLabel().

QString Isis::GuiParameter::Name ( ) const
inlineinherited
void Isis::GuiParameter::RememberWidget ( QWidget w)
inherited

Add widgets to a list for enabling/disabling.

Definition at line 228 of file GuiParameter.cpp.

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

void Isis::GuiCubeParameter::SelectAttribute ( )
privateslot
void Isis::GuiFileNameParameter::SelectFile ( )
protectedvirtualslotinherited

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.

2007-06-05 Steven Koechle - Corrected problem where output FileName was being opened not saved. Defaulted to output mode if not specified.

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.

2010-07-19 Jeannie Walldren - Modified to allow users to view files in the directory.

Definition at line 121 of file GuiFilenameParameter.cpp.

References IsisAml::ParamFileMode(), IsisAml::ParamFilter(), IsisAml::ParamInternalDefault(), IsisAml::ParamPath(), and Isis::GuiFileNameParameter::Set().

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

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

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

Parameters
newValue

Implements Isis::GuiParameter.

Definition at line 88 of file GuiFilenameParameter.cpp.

Referenced by Isis::GuiFileNameParameter::SelectFile().

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

Enable or disable the parameter.

Definition at line 233 of file GuiParameter.cpp.

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

void Isis::GuiParameter::SetToCurrent ( )
inherited

Change the parameter to the current user interface value.

Definition at line 187 of file GuiParameter.cpp.

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

void Isis::GuiParameter::SetToDefault ( )
inherited

Change the parameter to the default value.

Definition at line 174 of file GuiParameter.cpp.

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

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

void Isis::GuiParameter::Update ( )
inherited
QString Isis::GuiFileNameParameter::Value ( )
virtualinherited

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 98 of file GuiFilenameParameter.cpp.

Referenced by ViewCube(), and ViewLabel().

void Isis::GuiCubeParameter::ViewCube ( )
privateslot
void Isis::GuiCubeParameter::ViewLabel ( )
privateslot

Displays cube label in the GUI log.

Exceptions
Isis::Exception::User"You must enter a cube name to open"

Definition at line 173 of file GuiCubeParameter.cpp.

References _FILEINFO_, Isis::Cube::close(), Isis::Application::GuiLog(), Isis::Application::GuiReportError(), Isis::GuiParameter::IsModified(), Isis::Cube::label(), Isis::Cube::open(), Isis::IException::User, and Isis::GuiFileNameParameter::Value().

Referenced by GuiCubeParameter().


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