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 Developer Reference
UserInterface.h
Go to the documentation of this file.
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
227 bool p_abortOnError;
229 std::vector<std::vector<QString> > p_batchList;
231 std::vector<char *> p_cmdline;
233 QString p_errList;
235 Gui *p_gui;
237 bool p_info;
239 QString p_infoFileName;
241 bool p_interactive;
243 int p_parentId;
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
int ParentId()
Returns the parent id.
Definition UserInterface.h:178
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used.
Definition UserInterface.cpp:121
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition UserInterface.h:169
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition UserInterface.h:150
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
Definition UserInterface.cpp:72
bool GetInfoFlag()
This method returns the flag state of info.
Definition UserInterface.cpp:132
QString GetParamPreference()
Get the the preference path passed in by the user.
Definition UserInterface.h:194
QString BuildNewCommandLineFromPvl(Pvl temp)
Definition UserInterface.cpp:547
int BatchListSize()
Returns the size of the batchlist.
Definition UserInterface.h:160
Gui * TheGui()
Definition UserInterface.h:185
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
Definition UserInterface.cpp:236
void SaveHistory()
Saves the user parameter information in the history of the program for later use.
Definition UserInterface.cpp:263
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters.
Definition UserInterface.cpp:145
~UserInterface()
Destroys the UserInterface object.
Definition UserInterface.cpp:107
QString name
Definition IsisAmlData.h:126
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