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 "FileName.h"
10#include "Gui.h"
11#include "IsisAml.h"
12#include "PvlTokenizer.h"
13
14class Gui;
15
16namespace Isis {
140 class UserInterface : public IsisAml {
141 public:
142 UserInterface(const QString &xmlfile, int &argc, char *argv[]);
143 UserInterface(const QString &xmlfile, QVector<QString> &args);
145
153 return p_abortOnError;
154 };
155
163 return p_batchList.size();
164 };
165
172 return p_gui != NULL;
173 };
174
180 int ParentId() {
181 return p_parentId;
182 };
183
188 return p_gui;
189 };
190
191 QString GetInfoFileName();
192 bool GetInfoFlag();
193
194 QString BuildNewCommandLineFromPvl(Pvl temp);
195
196 void SetBatchList(int i);
197 void SetErrorList(int i);
198
199 void SaveHistory();
200
201
202 private:
203 void loadBatchList(const QString file);
204 void loadCommandLine(QVector<QString> &args, bool ignoreAppName=true);
205
206 void loadCommandLine(int argc, char *argv[]);
207 void loadHistory(const QString file);
208
209 void evaluateOption(const QString name, const QString value);
210 void getNextParameter(unsigned int &curPos,
211 QString &unresolvedParam,
212 std::vector<QString> &value);
213 void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
214 std::vector<QString> readArray(QString arrayString);
215 QString resolveParameter(QString &name,
216 std::vector<QString> &reservedParams,
217 bool handleNoMatches = true);
218
220 bool p_abortOnError;
222 std::vector<std::vector<QString> > p_batchList;
224 std::vector<char *> p_cmdline;
226 QString p_errList;
228 Gui *p_gui;
230 bool p_info;
232 QString p_infoFileName;
234 bool p_interactive;
236 int p_parentId;
238 QString p_progName;
240 QString p_saveFile;
241 };
242};
243
244#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:140
int ParentId()
Returns the parent id.
Definition: UserInterface.h:180
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used.
Definition: UserInterface.cpp:119
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition: UserInterface.h:171
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition: UserInterface.h:152
bool GetInfoFlag()
This method returns the flag state of info.
Definition: UserInterface.cpp:130
QString BuildNewCommandLineFromPvl(Pvl temp)
Definition: UserInterface.cpp:543
int BatchListSize()
Returns the size of the batchlist.
Definition: UserInterface.h:162
Gui * TheGui()
Definition: UserInterface.h:187
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
Definition: UserInterface.cpp:234
void SaveHistory()
Saves the user parameter information in the history of the program for later use.
Definition: UserInterface.cpp:261
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters.
Definition: UserInterface.cpp:143
~UserInterface()
Destroys the UserInterface object.
Definition: UserInterface.cpp:105
QString name
Definition: IsisAmlData.h:126
Application program XML file parameter manager.
Definition: IsisAml.h:138
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16