Isis 3 Programmer Reference
|
Gui for Isis Applications. More...
#include <Gui.h>
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 Gui * | Create (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 | |
GuiParameter * | AddParameter (Isis::UserInterface &ui, int group, int param) |
void | Preferences () |
void | CreateAreas () |
QAction * | CreateProcessAction () |
QAction * | CreateStopAction () |
QAction * | CreateExitAction () |
QAction * | CreateResetAction () |
QAction * | CreatePreviousHistoryAction () |
QAction * | CreateNextHistoryAction () |
QAction * | CreateSaveLogAction () |
QAction * | CreateClearLogAction () |
QAction * | CreateWhatsThisAction () |
void | UpdateHistory () |
Changed the parameters based on the history pointer. More... | |
Private Attributes | |
void(* | p_funct )() |
QScrollArea * | p_scrollArea |
QWidget * | p_scrollWidget |
QVBoxLayout * | p_scrollLayout |
QLabel * | p_statusText |
QProgressBar * | p_progressBar |
GuiLog * | p_log |
QAction * | p_processAction |
QAction * | p_exitAction |
QAction * | p_stopAction |
QAction * | p_resetAction |
QAction * | p_saveLogAction |
QAction * | p_clearLogAction |
QAction * | p_previousHistoryAction |
QAction * | p_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 Gui * | p_gui = NULL |
Singleton. More... | |
This is the main GUI for all Isis Applications.
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.
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().
|
static |
check to see if X is available
Definition at line 49 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 616 of file Gui.cpp.
References Progress(), and ProgressText().
int Isis::Gui::Exec | ( | void(*)() | funct | ) |
|
privateslot |
Activate helper buttons.
Definition at line 892 of file Gui.cpp.
References IsisAml::Clear(), Isis::Application::GetGuiHelper(), Isis::Application::GetUserInterface(), Isis::Application::GuiReportError(), Isis::GuiParameter::IsEnabled(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::Name(), IsisAml::PutAsString(), and UpdateParameters().
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().
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().
|
privateslot |
|
privateslot |
Goto the previous history entry.
Definition at line 683 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 655 of file Gui.cpp.
Referenced by StartProcess().
void Isis::Gui::Progress | ( | int | percent | ) |
Update the progress bar.
Definition at line 565 of file Gui.cpp.
Referenced by eventFilter(), and StartProcess().
void Isis::Gui::ProgressText | ( | const QString & | text | ) |
Change progress text.
Definition at line 559 of file Gui.cpp.
Referenced by eventFilter(), and StartProcess().
|
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().
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().
|
privateslot |
The user pressed the go button.
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 329 of file Gui.cpp.
References IsisAml::Clear(), Isis::Application::FunctionCleanup(), Isis::Application::FunctionError(), Isis::Application::GetUserInterface(), Isis::GuiParameter::IsEnabled(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::Name(), ProcessEvents(), Progress(), ProgressText(), IsisAml::PutAsString(), Isis::UserInterface::SaveHistory(), ShowWarning(), Isis::IException::toString(), Isis::GuiParameter::Update(), and IsisAml::VerifyAll().
|
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().
|
privateslot |
Update the command line toolbar.
Definition at line 824 of file Gui.cpp.
References Isis::Application::GetUserInterface(), Isis::GuiParameter::IsEnabled(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::Name(), and IsisAml::ProgramName().
Referenced by Gui().
|
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().
|
private |
Changed the parameters based on the history pointer.
Definition at line 696 of file Gui.cpp.
References IsisAml::Clear(), Isis::PvlObject::findGroup(), Isis::Application::GetUserInterface(), Isis::PvlObject::group(), Isis::PvlObject::groups(), Isis::PvlContainer::isNamed(), Isis::PvlContainer::keywords(), LoadMessage(), Isis::PvlContainer::name(), IsisAml::ProgramName(), IsisAml::PutAsString(), Isis::Pvl::read(), ResetParameters(), ShowWarning(), Isis::PvlObject::Traverse, and Isis::GuiParameter::Update().
Referenced by NextHistory(), and PreviousHistory().
|
privateslot |
Update Parameters.
Definition at line 856 of file Gui.cpp.
References Isis::GuiParameter::Update().
Referenced by InvokeHelper().