本文整理汇总了C++中QString::addValue方法的典型用法代码示例。如果您正苦于以下问题:C++ QString::addValue方法的具体用法?C++ QString::addValue怎么用?C++ QString::addValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QString
的用法示例。
在下文中一共展示了QString::addValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EvaluateOption
/**
* This interprets the "-" options for reserved parameters
*
* @param name "-OPTIONNAME"
* @param value Value of the option, if supplied (-name=value)
*/
void UserInterface::EvaluateOption(const QString name,
const QString value) {
Preference &p = Preference::Preferences();
if(name == "-GUI") {
p_interactive = true;
}
else if(name == "-NOGUI") {
p_interactive = false;
}
else if(name == "-BATCHLIST") {
LoadBatchList(value);
}
else if(name == "-LAST") {
PvlGroup &grp = p.findGroup("UserInterface", Isis::Pvl::Traverse);
QString histFile = grp["HistoryPath"][0] + "/" + FileName(
p_progName).name() + ".par";
LoadHistory(histFile);
}
else if(name == "-RESTORE") {
LoadHistory(value);
}
else if(name == "-WEBHELP") {
Isis::PvlGroup &pref = Isis::Preference::Preferences().findGroup(
"UserInterface");
QString command = pref["GuiHelpBrowser"];
command += " $ISISROOT/doc/Application/presentation/Tabbed/";
command += FileName(p_progName).name() + "/" + FileName(
p_progName).name() + ".html";
ProgramLauncher::RunSystemCommand(command);
exit(0);
}
else if(name == "-INFO") {
p_info = true;
// check for filename and set value
if(value.size() != 0) {
p_infoFileName = value;
}
}
else if(name == "-HELP") {
if(value.size() == 0) {
Pvl params;
params.setTerminator("");
for(int k = 0; k < NumGroups(); k ++) {
for(int j = 0; j < NumParams(k); j ++) {
if(ParamListSize(k, j) == 0) {
params += PvlKeyword(ParamName(k, j),
ParamDefault(k, j));
}
else {
PvlKeyword key(ParamName(k, j));
QString def = ParamDefault(k, j);
for(int l = 0; l < ParamListSize(k, j); l ++) {
if(ParamListValue(k, j, l) == def)
key.addValue("*" + def);
else
key.addValue(ParamListValue(k, j, l));
}
params += key;
}
}
}
cout << params;
}
else {
Pvl param;
param.setTerminator("");
QString key = value;
for(int k = 0; k < NumGroups(); k ++) {
for(int j = 0; j < NumParams(k); j ++) {
if(ParamName(k, j) == key) {
param += PvlKeyword("ParameterName", key);
param += PvlKeyword("Brief", ParamBrief(k, j));
param += PvlKeyword("Type", ParamType(k, j));
if(PixelType(k, j) != "") {
param += PvlKeyword("PixelType", PixelType(k,
j));
}
if(ParamInternalDefault(k, j) != "") {
param += PvlKeyword("InternalDefault",
ParamInternalDefault(k, j));
}
else
param += PvlKeyword("Default", ParamDefault(
k, j));
if(ParamMinimum(k, j) != "") {
if(ParamMinimumInclusive(k, j) == "YES") {
param += PvlKeyword("GreaterThanOrEqual",
ParamMinimum(k, j));
}
else {
param += PvlKeyword("GreaterThan",
//.........这里部分代码省略.........