|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef UserInterface_h
2 #define UserInterface_h
142 UserInterface(
const QString &xmlfile,
int &argc,
char *argv[]);
153 return p_abortOnError;
163 return p_batchList.size();
172 return p_gui != NULL;
200 void loadBatchList(
const QString file);
203 void loadCommandLine(
int argc,
char *argv[]);
204 void loadHistory(
const QString file);
206 void evaluateOption(
const QString
name,
const QString value);
207 void getNextParameter(
unsigned int &curPos,
208 QString &unresolvedParam,
209 std::vector<QString> &value);
210 void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
211 std::vector<QString> readArray(QString arrayString);
212 QString resolveParameter(QString &
name,
213 std::vector<QString> &reservedParams,
214 bool handleNoMatches =
true);
219 std::vector<std::vector<QString> > p_batchList;
221 std::vector<char *> p_cmdline;
229 QString p_infoFileName;
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition: UserInterface.h:171
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used.
Definition: UserInterface.cpp:119
void PutAsString(const QString ¶mName, const QString &value)
Allows the insertion of a value for any parameter.
Definition: IsisAml.cpp:65
int ParamListSize(const int &group, const int ¶m) const
Returns the number of options in the specified parameter's list.
Definition: IsisAml.cpp:1601
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
static void RunSystemCommand(QString commandLine)
This runs arbitrary system commands.
Definition: ProgramLauncher.cpp:207
QString ParamListValue(const int &group, const int ¶m, const int &option) const
Returns the option value for a specific option to a parameter.
Definition: IsisAml.cpp:1615
int NumGroups() const
Returns the number of groups found in the XML.
Definition: IsisAml.cpp:1087
QString ParamMinimumInclusive(const int &group, const int ¶m) const
Returns whether the minimum value is inclusive or not.
Definition: IsisAml.cpp:1284
File name manipulation and expansion.
Definition: FileName.h:100
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
Definition: UserInterface.cpp:234
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
QString ParamBrief(const int &group, const int ¶m) const
Returns the brief description of a parameter in a specified group.
Definition: IsisAml.cpp:1232
QString ParamGreaterThanOrEqual(const int &group, const int ¶m, const int &great) const
Returns the name of the specified greaterThanOrEqual parameter.
Definition: IsisAml.cpp:1402
Definition: IsisAmlData.h:53
int ParentId()
Returns the parent id.
Definition: UserInterface.h:180
Provides access to sequential ASCII stream I/O.
Definition: TextFile.h:38
QString ParamMaximum(const int &group, const int ¶m) const
Returns the maximum value of a parameter in a specified group.
Definition: IsisAml.cpp:1271
Container for cube-like labels.
Definition: Pvl.h:119
bool GetLine(QString &line, const bool skipComments=true)
Gets next line from file.
Definition: TextFile.cpp:411
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:130
bool GetInfoFlag()
This method returns the flag state of info.
Definition: UserInterface.cpp:130
QString ParamGreaterThan(const int &group, const int ¶m, const int &great) const
Returns the name of the specified greaterThan parameter.
Definition: IsisAml.cpp:1387
Gui for Isis Applications.
Definition: Gui.h:73
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
QString ParamDefault(const int &group, const int ¶m) const
Returns the default for a parameter in a specified group.
Definition: IsisAml.cpp:1505
QString ParamListBrief(const int &group, const int ¶m, const int &option) const
Returns the brief description for a specific option to a parameter.
Definition: IsisAml.cpp:1630
int ParamIncludeSize(const int &group, const int ¶m) const
Returns the number of parameters included in this parameter's inclusions.
Definition: IsisAml.cpp:1731
QString ParamType(const int &group, const int ¶m) const
Returns the parameter type of a parameter in a specified group.
Definition: IsisAml.cpp:1492
int BatchListSize()
Returns the size of the batchlist.
Definition: UserInterface.h:162
QString ParamInternalDefault(const int &group, const int ¶m) const
Returns the internal default for a parameter in a specified group.
Definition: IsisAml.cpp:1524
int ParamListExcludeSize(const int &group, const int ¶m, const int &option) const
Returns the number of items in a parameters list exclude section.
Definition: IsisAml.cpp:1660
~UserInterface()
Destroys the UserInterface object.
Definition: UserInterface.cpp:105
@ Traverse
Search child objects.
Definition: PvlObject.h:158
void Open(const QString &filename, const char *openmode="input", const char *extension="")
Opens a text file.
Definition: TextFile.cpp:217
void VerifyAll()
Verify all parameters.
Definition: IsisAml.cpp:2387
int LineCount(const int &maxLinesToRead=0)
Counts number of lines in file.
Definition: TextFile.cpp:607
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
int ParamNotEqualSize(const int &group, const int ¶m) const
Returns the number of values in the not equal list.
Definition: IsisAml.cpp:1374
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
QDir dir() const
Returns the path of the file's parent directory as a QDir object.
Definition: FileName.cpp:465
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:90
std::vector< QString > defaultValues
Definition: IsisAmlData.h:60
bool isNamed(const QString &match) const
Returns whether the given string is equal to the container name or not.
Definition: PvlContainer.h:72
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
Application program XML file parameter manager.
Definition: IsisAml.h:138
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
QString name
Definition: IsisAmlData.h:126
QString ParamExclude(const int &group, const int ¶m, const int &exclude) const
Returns the name of the specified excluded parameter.
Definition: IsisAml.cpp:1462
QString ParamNotEqual(const int &group, const int ¶m, const int ¬Eq) const
Returns the name of the specified notEqual parameter.
Definition: IsisAml.cpp:1447
QString ParamListInclude(const int &group, const int ¶m, const int &option, const int &include) const
Returns the parameter name to be included if this option is selected.
Definition: IsisAml.cpp:1705
QString ParamMinimum(const int &group, const int ¶m) const
Returns the minimum value of a parameter in a specified group.
Definition: IsisAml.cpp:1258
int ParamExcludeSize(const int &group, const int ¶m) const
Returns the number of parameters excluded in this parameter's exclusions.
Definition: IsisAml.cpp:1719
QString ParamListExclude(const int &group, const int ¶m, const int &option, const int &exclude) const
Returns the parameter name to be excluded if this option is selected.
Definition: IsisAml.cpp:1675
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition: UserInterface.h:152
Reads user preferences from a data file.
Definition: Preference.h:60
QString ParamInclude(const int &group, const int ¶m, const int &include) const
Returns the name of the specified included parameter.
Definition: IsisAml.cpp:1477
const IsisParameterData * ReturnParam(const QString ¶mName) const
Returns a pointer to a parameter whose name starts with paramName.
Definition: IsisAml.cpp:1965
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis exception class.
Definition: IException.h:91
QString PixelType(const int &group, const int ¶m) const
Returns the default pixel type from the XML.
Definition: IsisAml.cpp:1743
int ParamGreaterThanOrEqualSize(const int &group, const int ¶m) const
Returns the number of values in the parameters greater than or equal list.
Definition: IsisAml.cpp:1336
int ParamGreaterThanSize(const int &group, const int ¶m) const
Returns the number of values in the parameters greater than list.
Definition: IsisAml.cpp:1324
QString ParamLessThan(const int &group, const int ¶m, const int &great) const
Returns the name of the specified lessThan parameter.
Definition: IsisAml.cpp:1417
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
int ParamListIncludeSize(const int &group, const int ¶m, const int &option) const
Returns the number of items in a parameters list include section.
Definition: IsisAml.cpp:1690
void Clear(const QString ¶mName)
Clears the value(s) in the named parameter.
Definition: IsisAml.cpp:1852
Gui * TheGui()
Definition: UserInterface.h:187
int ParamLessThanSize(const int &group, const int ¶m) const
Returns the number of values in the parameters less than list.
Definition: IsisAml.cpp:1349
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Namespace for the standard library.
void SaveHistory()
Saves the user parameter information in the history of the program for later use.
Definition: UserInterface.cpp:261
int ParamLessThanOrEqualSize(const int &group, const int ¶m) const
Returns the number of values in the parameters less than or equal list.
Definition: IsisAml.cpp:1361
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:140
void CommandLine(Isis::Pvl &lab) const
Creates a QString which could be used as a command line.
Definition: IsisAml.cpp:2910
QString internalDefault
Definition: IsisAmlData.h:61
IString Token(const IString &separator)
Returns the first token in the IString.
Definition: IString.cpp:897
QString ParamLessThanOrEqual(const int &group, const int ¶m, const int &les) const
Returns the name of the specified lessThanOrEqual parameter.
Definition: IsisAml.cpp:1432
static void checkX11()
check to see if X is available
Definition: Gui.cpp:55
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
Definition: UserInterface.cpp:71
Adds specific functionality to C++ strings.
Definition: IString.h:165
static Preference & Preferences(bool unitTest=false)
Definition: Preference.cpp:86
QString ParamMaximumInclusive(const int &group, const int ¶m) const
Returns whether the maximum value is inclusive or not.
Definition: IsisAml.cpp:1297
void deleteGroup(const QString &name)
Remove a group from the current PvlObject.
Definition: PvlObject.cpp:408
QString ProgramName() const
Returns the Program name.
Definition: IsisAml.cpp:1057
QString ParamOdd(const int &group, const int ¶m) const
Returns whether the selected parameter has a restriction on odd values or not.
Definition: IsisAml.cpp:1311
QString ParamName(const int &group, const int ¶m) const
Returns the parameter name.
Definition: IsisAml.cpp:1219
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869
static Gui * Create(Isis::UserInterface &ui, int &argc, char *argv[])
Definition: Gui.cpp:84
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
int NumParams(const int &) const
Returns the number of parameters in a group.
Definition: IsisAml.cpp:1207