Isis Developer Reference
UserInterface.h
Go to the documentation of this file.
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
228 bool p_abortOnError;
230 std::vector<std::vector<QString> > p_batchList;
232 std::vector<char *> p_cmdline;
234 QString p_errList;
236 Gui *p_gui;
238 bool p_info;
240 QString p_infoFileName;
242 bool p_interactive;
244 int p_parentId;
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.
Definition UserInterface.h:139
int ParentId()
Returns the parent id.
Definition UserInterface.h:179
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used.
Definition UserInterface.cpp:120
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition UserInterface.h:170
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition UserInterface.h:151
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
Definition UserInterface.cpp:71
bool GetInfoFlag()
This method returns the flag state of info.
Definition UserInterface.cpp:131
QString GetParamPreference()
Get the the preference path passed in by the user.
Definition UserInterface.h:195
QString BuildNewCommandLineFromPvl(Pvl temp)
Definition UserInterface.cpp:546
int BatchListSize()
Returns the size of the batchlist.
Definition UserInterface.h:161
Gui * TheGui()
Definition UserInterface.h:186
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
Definition UserInterface.cpp:235
void SaveHistory()
Saves the user parameter information in the history of the program for later use.
Definition UserInterface.cpp:262
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters.
Definition UserInterface.cpp:144
~UserInterface()
Destroys the UserInterface object.
Definition UserInterface.cpp:106
QString name
Definition IsisAmlData.h:126
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