Isis 3 Programmer Reference
Isis::Gui Class Reference

Gui for Isis Applications. More...

#include <Gui.h>

Inheritance diagram for Isis::Gui:
Inheritance graph
Collaboration diagram for Isis::Gui:
Collaboration graph

Public Member Functions

void ProgressText (const QString &text)
 Change progress text. More...
 
void Progress (int percent)
 Update the progress bar. More...
 
int Exec (void(*funct)())
 Start the Gui and enter the main loop This routine only returns when the program is ready to exit. More...
 
bool ProcessEvents ()
 Let the event loop have some time to see if we need to cancel. More...
 
void LoadMessage (const QString &message)
 Add more information to the error message. More...
 
int ShowWarning ()
 Show an error message and return if the user wants to continue/abort. More...
 
void ShowLog ()
 
void Log (const QString &text)
 Write text to the gui log. More...
 
 Gui (Isis::UserInterface &ui)
 Constructor. More...
 
 ~Gui ()
 Destructor. More...
 
bool eventFilter (QObject *o, QEvent *e)
 Reset the Progress bar when the user moves the mouse onto the toolbar. More...
 

Static Public Member Functions

static void checkX11 ()
 check to see if X is available More...
 
static GuiCreate (Isis::UserInterface &ui, int &argc, char *argv[])
 

Private Slots

void StartProcess ()
 The user pressed the go button. More...
 
void StopProcessing ()
 The user pressed the stop button ... see what they want to do. More...
 
void ResetParameters ()
 Reset the parameters fields to the defaults. More...
 
void NextHistory ()
 Goto the next history entry. More...
 
void PreviousHistory ()
 Goto the previous history entry. More...
 
void UpdateExclusions ()
 Grey out parameters that should be excluded for radio buttons and checkboxes. More...
 
void UpdateCommandLine ()
 Update the command line toolbar. More...
 
void UpdateParameters ()
 Update Parameters. More...
 
void WhatsThis ()
 
void AboutProgram ()
 
void AboutIsis ()
 
void InvokeHelper (const QString &funct)
 Activate helper buttons. More...
 

Private Member Functions

GuiParameterAddParameter (Isis::UserInterface &ui, int group, int param)
 
void Preferences ()
 
void CreateAreas ()
 
QActionCreateProcessAction ()
 
QActionCreateStopAction ()
 
QActionCreateExitAction ()
 
QActionCreateResetAction ()
 
QActionCreatePreviousHistoryAction ()
 
QActionCreateNextHistoryAction ()
 
QActionCreateSaveLogAction ()
 
QActionCreateClearLogAction ()
 
QActionCreateWhatsThisAction ()
 
void UpdateHistory ()
 Changed the parameters based on the history pointer. More...
 

Private Attributes

void(* p_funct )()
 
QScrollArea * p_scrollArea
 
QWidgetp_scrollWidget
 
QVBoxLayout * p_scrollLayout
 
QLabel * p_statusText
 
QProgressBarp_progressBar
 
GuiLogp_log
 
QActionp_processAction
 
QActionp_exitAction
 
QActionp_stopAction
 
QActionp_resetAction
 
QActionp_saveLogAction
 
QActionp_clearLogAction
 
QActionp_previousHistoryAction
 
QActionp_nextHistoryAction
 
QMap< QString, QGridLayout * > p_grids
 
std::vector< GuiParameter * > p_parameters
 
QString p_errorString
 
bool p_stop
 
int p_historyEntry
 
QLineEdit * p_commandLineEdit
 

Static Private Attributes

static Guip_gui = NULL
 Singleton. More...
 

Detailed Description

Gui for Isis Applications.

This is the main GUI for all Isis Applications.

Author
2003-01-01 Stuart Sides
History:

2007-07-19 Steven Lambright Fixed bugs: Command Line not checked but displayed initially and Command Line edit was not read only.

2008-06-06 Steven Lambright Fixed bug with corrupt parameter history file causing the program to crash

2008-07-29 Steven Lambright Fixed memory leaks and naming convention

2009-11-19 Kris Becker - Made argc pass by reference since Qt's QApplication/QCoreApplication requires it

2010-03-17 Stuart Sides - Added the location of the Qt plugins into the library path

2010-07-19 Jeannie Walldren - Modified SelectFile() in GuiFileNameParameter.cpp and removed SelectFile() from GuiCubeParameter. Cube and File customization preferences are now being handled in Cube's CubeIoHandler and IsisAml classes.

2012-11-08 Janet Barrett - Modified the AddParameter method to only update exclusions for list and combobox widgets. Fixes #624.

2013-01-28 Janet Barrett - Modified the AddParameter method to also update exclusions for boolean widgets. References #1452.

2016-06-28 Adam Paquette - Modified UpdateHistory to appropriately retrieve lists from the history pvl.

2016-08-15 Adam Paquette - Reset locale after QApplication is instantiated. Fixes #3908.

2017-05-16 Cole Neubauer - Fixed Title not showing in Putty/Xming setup. Fixes #4731.

2017-05-19 Marjorie Hahn - Applied font style and font size from the IsisPreferences file. Fixes #198.

Definition at line 90 of file Gui.h.

Constructor & Destructor Documentation

◆ Gui()

Isis::Gui::Gui ( Isis::UserInterface ui)

Constructor.

Definition at line 124 of file Gui.cpp.

References IsisAml::NumGroups(), IsisAml::NumParams(), Isis::GuiParameter::Update(), and UpdateCommandLine().

◆ ~Gui()

Isis::Gui::~Gui ( )

Destructor.

Definition at line 169 of file Gui.cpp.

Member Function Documentation

◆ checkX11()

void Isis::Gui::checkX11 ( )
static

check to see if X is available

Definition at line 49 of file Gui.cpp.

Referenced by Isis::UserInterface::UserInterface().

◆ eventFilter()

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

Reset the Progress bar when the user moves the mouse onto the toolbar.

Definition at line 616 of file Gui.cpp.

References Progress(), and ProgressText().

◆ Exec()

int Isis::Gui::Exec ( void(*)()  funct)

Start the Gui and enter the main loop This routine only returns when the program is ready to exit.

Definition at line 574 of file Gui.cpp.

◆ InvokeHelper

◆ LoadMessage()

void Isis::Gui::LoadMessage ( const QString &  message)

Add more information to the error message.

Definition at line 580 of file Gui.cpp.

Referenced by UpdateHistory().

◆ Log()

void Isis::Gui::Log ( const QString &  text)

Write text to the gui log.

Definition at line 611 of file Gui.cpp.

References Isis::GuiLog::Write().

◆ NextHistory

void Isis::Gui::NextHistory ( )
privateslot

Goto the next history entry.

Definition at line 677 of file Gui.cpp.

References UpdateHistory().

◆ PreviousHistory

void Isis::Gui::PreviousHistory ( )
privateslot

Goto the previous history entry.

Definition at line 683 of file Gui.cpp.

References UpdateHistory().

◆ ProcessEvents()

bool Isis::Gui::ProcessEvents ( )

Let the event loop have some time to see if we need to cancel.

This is normally called by the Isis::Progress class.

Definition at line 655 of file Gui.cpp.

Referenced by StartProcess().

◆ Progress()

void Isis::Gui::Progress ( int  percent)

Update the progress bar.

Definition at line 565 of file Gui.cpp.

Referenced by eventFilter(), and StartProcess().

◆ ProgressText()

void Isis::Gui::ProgressText ( const QString &  text)

Change progress text.

Definition at line 559 of file Gui.cpp.

Referenced by eventFilter(), and StartProcess().

◆ ResetParameters

void Isis::Gui::ResetParameters ( )
privateslot

Reset the parameters fields to the defaults.

Definition at line 661 of file Gui.cpp.

References IsisAml::Clear(), Isis::Application::GetUserInterface(), Isis::GuiParameter::Name(), and Isis::GuiParameter::Update().

Referenced by UpdateHistory().

◆ ShowWarning()

int Isis::Gui::ShowWarning ( )

Show an error message and return if the user wants to continue/abort.

Definition at line 600 of file Gui.cpp.

References Isis::Application::GetUserInterface(), and IsisAml::ProgramName().

Referenced by StartProcess(), and UpdateHistory().

◆ StartProcess

void Isis::Gui::StartProcess ( )
privateslot

◆ StopProcessing

void Isis::Gui::StopProcessing ( )
privateslot

The user pressed the stop button ... see what they want to do.

Definition at line 627 of file Gui.cpp.

References Isis::Application::GetUserInterface(), and IsisAml::ProgramName().

◆ UpdateCommandLine

void Isis::Gui::UpdateCommandLine ( )
privateslot

◆ UpdateExclusions

void Isis::Gui::UpdateExclusions ( )
privateslot

Grey out parameters that should be excluded for radio buttons and checkboxes.

Definition at line 802 of file Gui.cpp.

References Isis::GuiParameter::Exclusions(), Isis::GuiParameter::Name(), and Isis::GuiParameter::SetEnabled().

◆ UpdateHistory()

void Isis::Gui::UpdateHistory ( )
private

◆ UpdateParameters

void Isis::Gui::UpdateParameters ( )
privateslot

Update Parameters.

Definition at line 856 of file Gui.cpp.

References Isis::GuiParameter::Update().

Referenced by InvokeHelper().

Member Data Documentation

◆ p_gui

Gui * Isis::Gui::p_gui = NULL
staticprivate

Singleton.

Definition at line 118 of file Gui.h.


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