USGS

Isis 3.0 Object Programmers' Reference

Home

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

Static Public Member Functions

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

Private Slots

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

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.

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.

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.
History:
2008-06-06 Steven Lambright Fixed bug with corrupt parameter history file causing the program to crash
History:
2008-07-29 Steven Lambright Fixed memory leaks and naming convention
History:
2009-11-19 Kris Becker - Made argc pass by reference since Qt's QApplication/QCoreApplication requires it
History:
2010-03-17 Stuart Sides - Added the location of the Qt plugins into the library path
History:
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.
History:
2012-11-08 Janet Barrett - Modified the AddParameter method to only update exclusions for list and combobox widgets. Fixes #624.
History:
2013-01-28 Janet Barrett - Modified the AddParameter method to also update exclusions for boolean widgets. References #1452.

Definition at line 82 of file Gui.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 100 of file Gui.cpp.

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

Isis::Gui::~Gui ( )

Destructor.

Definition at line 141 of file Gui.cpp.

Member Function Documentation

void Isis::Gui::checkX11 ( )
static

check to see if X is available

Definition at line 45 of file Gui.cpp.

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

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

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

Definition at line 581 of file Gui.cpp.

References Progress(), and ProgressText().

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 539 of file Gui.cpp.

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

Add more information to the error message.

Definition at line 545 of file Gui.cpp.

Referenced by UpdateHistory().

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

Write text to the gui log.

Definition at line 576 of file Gui.cpp.

References Isis::GuiLog::Write().

Referenced by Isis::Application::GuiLog(), and Isis::Application::Log().

void Isis::Gui::NextHistory ( )
privateslot

Goto the next history entry.

Definition at line 642 of file Gui.cpp.

References UpdateHistory().

void Isis::Gui::PreviousHistory ( )
privateslot

Goto the previous history entry.

Definition at line 648 of file Gui.cpp.

References UpdateHistory().

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 620 of file Gui.cpp.

Referenced by StartProcess().

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

Update the progress bar.

Definition at line 530 of file Gui.cpp.

Referenced by eventFilter(), and StartProcess().

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

Change progress text.

Definition at line 524 of file Gui.cpp.

Referenced by eventFilter(), and StartProcess().

void Isis::Gui::ResetParameters ( )
privateslot

Reset the parameters fields to the defaults.

Definition at line 626 of file Gui.cpp.

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

Referenced by UpdateHistory().

int Isis::Gui::ShowWarning ( )

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

Definition at line 565 of file Gui.cpp.

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

Referenced by StartProcess(), and UpdateHistory().

void Isis::Gui::StopProcessing ( )
privateslot

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

Definition at line 592 of file Gui.cpp.

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

void Isis::Gui::UpdateCommandLine ( )
privateslot
void Isis::Gui::UpdateExclusions ( )
privateslot

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

Definition at line 732 of file Gui.cpp.

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

void Isis::Gui::UpdateParameters ( )
privateslot

Update Parameters.

Definition at line 786 of file Gui.cpp.

References Isis::GuiParameter::Update().

Referenced by InvokeHelper().

Member Data Documentation

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

Singleton.

Definition at line 110 of file Gui.h.


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