Isis 3 Programmer Reference
UserInterface.h
1#ifndef UserInterface_h
2#define UserInterface_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include "Gui.h"
10#include "IsisAml.h"
11#include "PvlTokenizer.h"
12
13class Gui;
14
15namespace Isis {
139 class UserInterface : public IsisAml {
140 public:
141 UserInterface(const QString &xmlfile, int &argc, char *argv[]);
142 UserInterface(const QString &xmlfile, QVector<QString> &args);
144
152 return p_abortOnError;
153 };
154
162 return p_batchList.size();
163 };
164
171 return p_gui != NULL;
172 };
173
179 int ParentId() {
180 return p_parentId;
181 };
182
187 return p_gui;
188 };
189
196 return p_preference;
197 }
198
199 QString GetInfoFileName();
200 bool GetInfoFlag();
201
202 QString BuildNewCommandLineFromPvl(Pvl temp);
203
204 void SetBatchList(int i);
205 void SetErrorList(int i);
206
207 void SaveHistory();
208
209
210 private:
211 void loadBatchList(const QString file);
212 void loadCommandLine(QVector<QString> &args, bool ignoreAppName=true);
213
214 void loadCommandLine(int argc, char *argv[]);
215 void loadHistory(const QString file);
216
217 void evaluateOption(const QString name, const QString value);
218 void getNextParameter(unsigned int &curPos,
219 QString &unresolvedParam,
220 std::vector<QString> &value);
221 void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
222 std::vector<QString> readArray(QString arrayString);
223 QString resolveParameter(QString &name,
224 std::vector<QString> &reservedParams,
225 bool handleNoMatches = true);
226
230 std::vector<std::vector<QString> > p_batchList;
232 std::vector<char *> p_cmdline;
234 QString p_errList;
238 bool p_info;
246 QString p_progName;
248 QString p_saveFile;
249 QString p_preference;
250 };
251};
252
253#endif
Gui for Isis Applications.
Definition Gui.h:73
Container for cube-like labels.
Definition Pvl.h:119
Command Line and Xml loader, validation, and access.
QString p_saveFile
FileName to save last history to.
int p_parentId
This is a status to indicate if the GUI is running or not.
void preProcess(QString fullReservedName, std::vector< QString > &reservedParams)
This parses the command line and looks for the specified reserved parameter name passed.
std::vector< std::vector< QString > > p_batchList
Vector of batchlist data.
QString resolveParameter(QString &name, std::vector< QString > &reservedParams, bool handleNoMatches=true)
This resolves a reserved parameter token on the command line to its fullname.
QString p_progName
Name of program to run.
QString p_infoFileName
FileName to save debugging info.
int ParentId()
Returns the parent id.
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used.
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
std::vector< char * > p_cmdline
This variable will contain argv.
bool p_interactive
Boolean value representing whether the program is interactive or not.
bool p_info
Boolean value representing if it's in debug mode.
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
void loadBatchList(const QString file)
Loads the user entered batchlist file into a private variable for later use.
void loadCommandLine(QVector< QString > &args, bool ignoreAppName=true)
This is used to load the command line into p_cmdline and the Aml object using information contained i...
bool GetInfoFlag()
This method returns the flag state of info.
QString GetParamPreference()
Get the the preference path passed in by the user.
std::vector< QString > readArray(QString arrayString)
This interprets an array value from the command line.
void evaluateOption(const QString name, const QString value)
This interprets the "-" options for reserved parameters.
void loadHistory(const QString file)
Loads the previous history for the program.
bool p_abortOnError
Boolean value representing whether to abort or continue on error.
Gui * p_gui
Pointer to the gui object.
QString p_errList
FileName to write batchlist line that caused error on.
int BatchListSize()
Returns the size of the batchlist.
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
void SaveHistory()
Saves the user parameter information in the history of the program for later use.
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters.
~UserInterface()
Destroys the UserInterface object.
void getNextParameter(unsigned int &curPos, QString &unresolvedParam, std::vector< QString > &value)
This gets the next parameter in the list of arguments.
Application program XML file parameter manager.
Definition IsisAml.h:140
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16