Isis 3.0 Programmer Reference
Back | Home
UserInterface.h
Go to the documentation of this file.
1 #ifndef UserInterface_h
2 #define UserInterface_h
3 
25 #include "FileName.h"
26 #include "Gui.h"
27 #include "IsisAml.h"
28 #include "PvlTokenizer.h"
29 
30 class Gui;
31 
32 namespace Isis {
152  class UserInterface : public IsisAml {
153  public:
154  UserInterface(const QString &xmlfile, int &argc, char *argv[]);
155  ~UserInterface();
156 
163  bool AbortOnError() {
164  return p_abortOnError;
165  };
166 
174  return p_batchList.size();
175  };
176 
182  bool IsInteractive() {
183  return p_gui != NULL;
184  };
185 
191  int ParentId() {
192  return p_parentId;
193  };
194 
198  Gui *TheGui() {
199  return p_gui;
200  };
201 
202  QString GetInfoFileName();
203  bool GetInfoFlag();
204 
205  void SetBatchList(int i);
206  void SetErrorList(int i);
207 
208  void SaveHistory();
209 
210  private:
211  void loadBatchList(const QString file);
212  void loadCommandLine(int argc, char *argv[]);
213  void loadHistory(const QString file);
214 
215  void evaluateOption(const QString name, const QString value);
216  void getNextParameter(unsigned int &curPos,
217  QString &unresolvedParam,
218  std::vector<QString> &value);
219  void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
220  std::vector<QString> readArray(QString arrayString);
221  QString resolveParameter(QString &name,
222  std::vector<QString> &reservedParams,
223  bool handleNoMatches = true);
224 
228  std::vector<std::vector<QString> > p_batchList;
230  std::vector<char *> p_cmdline;
232  QString p_errList;
236  bool p_info;
238  QString p_infoFileName;
244  QString p_progName;
246  QString p_saveFile;
247  };
248 };
249 
250 #endif
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
QString resolveParameter(QString &name, std::vector< QString > &reservedParams, bool handleNoMatches=true)
This resolves a reserved parameter token on the command line to its fullname.
void loadHistory(const QString file)
Loads the previous history for the program.
int BatchListSize()
Returns the size of the batchlist.
int p_parentId
This is a status to indicate if the GUI is running or not.
Gui * p_gui
Pointer to the gui object.
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the &quot;-info&quot; tag is used...
QString p_saveFile
FileName to save last history to.
std::vector< char * > p_cmdline
This variable will contain argv.
void SaveHistory()
Saves the user parameter information in the history of the program for later use. ...
void evaluateOption(const QString name, const QString value)
This interprets the &quot;-&quot; options for reserved parameters.
int ParentId()
Returns the parent id.
QString p_infoFileName
FileName to save debugging info.
void loadBatchList(const QString file)
Loads the user entered batchlist file into a private variable for later use.
bool GetInfoFlag()
This method returns the flag state of info.
std::vector< std::vector< QString > > p_batchList
Vector of batchlist data.
~UserInterface()
Destroys the UserInterface object.
bool p_interactive
Boolean value representing whether the program is interactive or not.
void loadCommandLine(int argc, char *argv[])
This is used to load the command line into p_cmdline and the Aml object using information contained i...
QString p_progName
Name of program to run.
Application program XML file parameter manager.
Definition: IsisAml.h:152
QString p_errList
FileName to write batchlist line that caused error on.
Command Line and Xml loader, validation, and access.
bool p_info
Boolean value representing if it&#39;s in debug mode.
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
std::vector< QString > readArray(QString arrayString)
This interprets an array value from the command line.
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters...
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
void getNextParameter(unsigned int &curPos, QString &unresolvedParam, std::vector< QString > &value)
This gets the next parameter in the list of arguments.
void preProcess(QString fullReservedName, std::vector< QString > &reservedParams)
This parses the command line and looks for the specified reserved parameter name passed.
bool p_abortOnError
Boolean value representing whether to abort or continue on error.
Gui for Isis Applications.
Definition: Gui.h:86
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:31:17