Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
UserInterface.h
1#ifndef UserInterface_h
2#define UserInterface_h
7
8/* SPDX-License-Identifier: CC0-1.0 */
9#include "Gui.h"
10#include "IsisAml.h"
11
12class Gui;
13
14namespace Isis {
137
138 class UserInterface : public IsisAml {
139 public:
140 UserInterface(const QString &xmlfile, int &argc, char *argv[]);
141 UserInterface(const QString &xmlfile, QVector<QString> &args);
143
151 return p_abortOnError;
152 };
153
161 return p_batchList.size();
162 };
163
170 return p_gui != NULL;
171 };
172
178 int ParentId() {
179 return p_parentId;
180 };
181
186 return p_gui;
187 };
188
195 return p_preference;
196 }
197
198 QString GetInfoFileName();
199 bool GetInfoFlag();
200
201 QString BuildNewCommandLineFromPvl(Pvl temp);
202
203 void SetBatchList(int i);
204 void SetErrorList(int i);
205
206 void SaveHistory();
207
208
209 private:
210 void loadBatchList(const QString file);
211 void loadCommandLine(QVector<QString> &args, bool ignoreAppName=true);
212
213 void loadCommandLine(int argc, char *argv[]);
214 void loadHistory(const QString file);
215
216 void evaluateOption(const QString name, const QString value);
217 void getNextParameter(unsigned int &curPos,
218 QString &unresolvedParam,
219 std::vector<QString> &value);
220 void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
221 std::vector<QString> readArray(QString arrayString);
222 QString resolveParameter(QString &name,
223 std::vector<QString> &reservedParams,
224 bool handleNoMatches = true);
225
229 std::vector<std::vector<QString> > p_batchList;
231 std::vector<char *> p_cmdline;
233 QString p_errList;
237 bool p_info;
245 QString p_progName;
247 QString p_saveFile;
248 QString p_preference;
249 };
250};
251
252#endif
Gui for Isis Applications.
Definition Gui.h:73
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.
IsisAml(const QString &xmlfile)
Constructs an IsisAml object and internalizes the XML data in the given file name.
Definition IsisAml.cpp:41
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16