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

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 73 of file Gui.h.

Constructor & Destructor Documentation

◆ Gui()

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

Constructor.

Definition at line 130 of file Gui.cpp.

References UpdateCommandLine().

◆ ~Gui()

Isis::Gui::~Gui ( )

Destructor.

Definition at line 175 of file Gui.cpp.

Member Function Documentation

◆ AboutIsis

void Isis::Gui::AboutIsis ( )
privateslot

Definition at line 875 of file Gui.cpp.

◆ AboutProgram

void Isis::Gui::AboutProgram ( )
privateslot

Definition at line 888 of file Gui.cpp.

◆ AddParameter()

GuiParameter * Isis::Gui::AddParameter ( Isis::UserInterface & ui,
int group,
int param )
private

Definition at line 528 of file Gui.cpp.

◆ checkX11()

void Isis::Gui::checkX11 ( )
static

check to see if X is available

Definition at line 55 of file Gui.cpp.

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

◆ Create()

Gui * Isis::Gui::Create ( Isis::UserInterface & ui,
int & argc,
char * argv[] )
static

Definition at line 84 of file Gui.cpp.

◆ CreateAreas()

void Isis::Gui::CreateAreas ( )
private

Definition at line 184 of file Gui.cpp.

◆ CreateClearLogAction()

QAction * Isis::Gui::CreateClearLogAction ( )
private

Definition at line 460 of file Gui.cpp.

◆ CreateExitAction()

QAction * Isis::Gui::CreateExitAction ( )
private

Definition at line 395 of file Gui.cpp.

◆ CreateNextHistoryAction()

QAction * Isis::Gui::CreateNextHistoryAction ( )
private

Definition at line 494 of file Gui.cpp.

◆ CreatePreviousHistoryAction()

QAction * Isis::Gui::CreatePreviousHistoryAction ( )
private

Definition at line 477 of file Gui.cpp.

◆ CreateProcessAction()

QAction * Isis::Gui::CreateProcessAction ( )
private

Definition at line 308 of file Gui.cpp.

◆ CreateResetAction()

QAction * Isis::Gui::CreateResetAction ( )
private

Definition at line 410 of file Gui.cpp.

◆ CreateSaveLogAction()

QAction * Isis::Gui::CreateSaveLogAction ( )
private

Definition at line 444 of file Gui.cpp.

◆ CreateStopAction()

QAction * Isis::Gui::CreateStopAction ( )
private

Definition at line 427 of file Gui.cpp.

◆ CreateWhatsThisAction()

QAction * Isis::Gui::CreateWhatsThisAction ( )
private

Definition at line 511 of file Gui.cpp.

◆ 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 622 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 580 of file Gui.cpp.

Referenced by Isis::Application::Run().

◆ InvokeHelper

void Isis::Gui::InvokeHelper ( const QString & funct)
privateslot

◆ LoadMessage()

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

Add more information to the error message.

Definition at line 586 of file Gui.cpp.

Referenced by Isis::Application::FunctionError(), Isis::Application::GuiReportError(), and UpdateHistory().

◆ Log()

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

Write text to the gui log.

Definition at line 617 of file Gui.cpp.

References Isis::GuiLog::Write().

Referenced by Isis::Application::FunctionCleanup().

◆ NextHistory

void Isis::Gui::NextHistory ( )
privateslot

Goto the next history entry.

Definition at line 683 of file Gui.cpp.

References UpdateHistory().

◆ PreviousHistory

void Isis::Gui::PreviousHistory ( )
privateslot

Goto the previous history entry.

Definition at line 689 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 661 of file Gui.cpp.

Referenced by Isis::Application::ProcessGuiEvents(), and StartProcess().

◆ Progress()

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

Update the progress bar.

Definition at line 571 of file Gui.cpp.

Referenced by eventFilter(), StartProcess(), and Isis::Application::UpdateProgress().

◆ ProgressText()

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

Change progress text.

Definition at line 565 of file Gui.cpp.

Referenced by eventFilter(), Isis::Application::GuiReportError(), StartProcess(), and Isis::Application::UpdateProgress().

◆ ResetParameters

void Isis::Gui::ResetParameters ( )
privateslot

Reset the parameters fields to the defaults.

Definition at line 667 of file Gui.cpp.

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

Referenced by UpdateHistory().

◆ ShowLog()

void Isis::Gui::ShowLog ( )
inline

Definition at line 90 of file Gui.h.

◆ ShowWarning()

int Isis::Gui::ShowWarning ( )

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

Definition at line 606 of file Gui.cpp.

References Isis::Application::GetUserInterface().

Referenced by Isis::Application::GuiReportError(), StartProcess(), and UpdateHistory().

◆ StartProcess

void Isis::Gui::StartProcess ( )
privateslot

The user pressed the go button.

History

2007-05-16 Tracie Sucharski - Change cursor to wait while processing.

2016-02-08 Ian Humphrey - Changed exit(0) to QApplication's quit(), since this code is within the QApplication's exec event loop.

Definition at line 335 of file Gui.cpp.

References Isis::Application::FunctionCleanup(), Isis::Application::FunctionError(), Isis::Application::GetUserInterface(), ProcessEvents(), Progress(), ProgressText(), ShowWarning(), and Isis::GuiParameter::Update().

◆ StopProcessing

void Isis::Gui::StopProcessing ( )
privateslot

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

Definition at line 633 of file Gui.cpp.

References Isis::Application::GetUserInterface().

◆ UpdateCommandLine

void Isis::Gui::UpdateCommandLine ( )
privateslot

Update the command line toolbar.

Definition at line 830 of file Gui.cpp.

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

Referenced by Gui().

◆ UpdateExclusions

void Isis::Gui::UpdateExclusions ( )
privateslot

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

Definition at line 808 of file Gui.cpp.

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

◆ UpdateHistory()

void Isis::Gui::UpdateHistory ( )
private

Changed the parameters based on the history pointer.

History
2016-02-08 Ian Humphrey - Changed exit(0) to QApplication's quit(), since this code is within the QApplication's exec event loop.

Definition at line 702 of file Gui.cpp.

References Isis::Application::GetUserInterface(), LoadMessage(), Isis::PvlContainer::name(), Isis::Pvl::read(), ResetParameters(), ShowWarning(), Isis::PvlObject::Traverse, and Isis::GuiParameter::Update().

Referenced by NextHistory(), and PreviousHistory().

◆ UpdateParameters

void Isis::Gui::UpdateParameters ( )
privateslot

Update Parameters.

Definition at line 862 of file Gui.cpp.

References Isis::GuiParameter::Update().

Referenced by InvokeHelper().

◆ WhatsThis

void Isis::Gui::WhatsThis ( )
privateslot

Definition at line 870 of file Gui.cpp.

Member Data Documentation

◆ p_clearLogAction

QAction* Isis::Gui::p_clearLogAction
private

Definition at line 132 of file Gui.h.

◆ p_commandLineEdit

QLineEdit* Isis::Gui::p_commandLineEdit
private

Definition at line 146 of file Gui.h.

◆ p_errorString

QString Isis::Gui::p_errorString
private

Definition at line 140 of file Gui.h.

◆ p_exitAction

QAction* Isis::Gui::p_exitAction
private

Definition at line 128 of file Gui.h.

◆ p_funct

void(* Isis::Gui::p_funct) ()
private

Definition at line 117 of file Gui.h.

◆ p_grids

QMap<QString, QGridLayout *> Isis::Gui::p_grids
private

Definition at line 136 of file Gui.h.

◆ p_gui

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

Singleton.

Definition at line 101 of file Gui.h.

◆ p_historyEntry

int Isis::Gui::p_historyEntry
private

Definition at line 144 of file Gui.h.

◆ p_log

GuiLog* Isis::Gui::p_log
private

Definition at line 125 of file Gui.h.

◆ p_nextHistoryAction

QAction* Isis::Gui::p_nextHistoryAction
private

Definition at line 134 of file Gui.h.

◆ p_parameters

std::vector<GuiParameter *> Isis::Gui::p_parameters
private

Definition at line 138 of file Gui.h.

◆ p_previousHistoryAction

QAction* Isis::Gui::p_previousHistoryAction
private

Definition at line 133 of file Gui.h.

◆ p_processAction

QAction* Isis::Gui::p_processAction
private

Definition at line 127 of file Gui.h.

◆ p_progressBar

QProgressBar* Isis::Gui::p_progressBar
private

Definition at line 124 of file Gui.h.

◆ p_resetAction

QAction* Isis::Gui::p_resetAction
private

Definition at line 130 of file Gui.h.

◆ p_saveLogAction

QAction* Isis::Gui::p_saveLogAction
private

Definition at line 131 of file Gui.h.

◆ p_scrollArea

QScrollArea* Isis::Gui::p_scrollArea
private

Definition at line 119 of file Gui.h.

◆ p_scrollLayout

QVBoxLayout* Isis::Gui::p_scrollLayout
private

Definition at line 121 of file Gui.h.

◆ p_scrollWidget

QWidget* Isis::Gui::p_scrollWidget
private

Definition at line 120 of file Gui.h.

◆ p_statusText

QLabel* Isis::Gui::p_statusText
private

Definition at line 123 of file Gui.h.

◆ p_stop

bool Isis::Gui::p_stop
private

Definition at line 141 of file Gui.h.

◆ p_stopAction

QAction* Isis::Gui::p_stopAction
private

Definition at line 129 of file Gui.h.


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