本文整理汇总了C++中PrefDialog::getFile方法的典型用法代码示例。如果您正苦于以下问题:C++ PrefDialog::getFile方法的具体用法?C++ PrefDialog::getFile怎么用?C++ PrefDialog::getFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrefDialog
的用法示例。
在下文中一共展示了PrefDialog::getFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: formatDialog
void ExScript::formatDialog (QStringList &, QString &rv, QString &rs)
{
rs.truncate(0);
rv.truncate(0);
QString pl = QObject::tr("Parms");
QString vnl = QObject::tr("Variable Name");
QString spl = QObject::tr("Script Path");
QString clsl = QObject::tr("Switches");
QString dl = QObject::tr("Date");
QString ol = QObject::tr("Open");
QString hl = QObject::tr("High");
QString lol = QObject::tr("Low");
QString cll = QObject::tr("Close");
QString vl = QObject::tr("Volume");
QString oil = QObject::tr("Open Interest");
PrefDialog *dialog = new PrefDialog(0);
dialog->setCaption(QObject::tr("ExScript Format"));
dialog->createPage (pl);
dialog->setHelpFile(helpFile);
QString s;
dialog->addTextItem(vnl, pl, s);
QStringList l;
dialog->addFileItem(spl, pl, l, scriptPath);
dialog->addTextItem(clsl, pl, comlineParms);
dialog->addCheckItem(dl, pl, dateFlag);
dialog->addCheckItem(ol, pl, openFlag);
dialog->addCheckItem(hl, pl, highFlag);
dialog->addCheckItem(lol, pl, lowFlag);
dialog->addCheckItem(cll, pl, closeFlag);
dialog->addCheckItem(vl, pl, volumeFlag);
dialog->addCheckItem(oil, pl, oiFlag);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getText(vnl, rv);
dialog->getFile(spl, l);
if (l.count())
rs = l[0];
dialog->getText(clsl, comlineParms);
rs.append("," + comlineParms);
bool t = dialog->getCheck(dl);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(ol);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(hl);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(lol);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(cll);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(vl);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
t = dialog->getCheck(oil);
if (t)
rs.append(",TRUE");
else
rs.append(",FALSE");
}
delete dialog;
}
示例2: indicatorPrefDialog
int ExScript::indicatorPrefDialog (QWidget *w)
{
QString pl2 = QObject::tr("Output");
QString cl = QObject::tr("Color");
QString ll = QObject::tr("Label");
QString ltl = QObject::tr("Line Type");
QString spl = QObject::tr("Script Path");
QString clsl = QObject::tr("Switches");
QString pl = QObject::tr("Input");
QString dl = QObject::tr("Date");
QString ol = QObject::tr("Open");
QString hl = QObject::tr("High");
QString lol = QObject::tr("Low");
QString cll = QObject::tr("Close");
QString vl = QObject::tr("Volume");
QString oil = QObject::tr("Open Interest");
QString tol = QObject::tr("Timeout Seconds");
PrefDialog *dialog = new PrefDialog(w);
dialog->setCaption(QObject::tr("ExScript Indicator"));
dialog->setHelpFile(helpFile);
dialog->createPage (pl);
QStringList l;
l.append(scriptPath);
dialog->addFileItem(spl, pl, l, scriptPath);
dialog->addTextItem(clsl, pl, comlineParms);
dialog->addIntItem(tol, pl, seconds, 1, 999);
dialog->addCheckItem(dl, pl, dateFlag);
dialog->addCheckItem(ol, pl, openFlag);
dialog->addCheckItem(hl, pl, highFlag);
dialog->addCheckItem(lol, pl, lowFlag);
dialog->addCheckItem(cll, pl, closeFlag);
dialog->addCheckItem(vl, pl, volumeFlag);
dialog->addCheckItem(oil, pl, oiFlag);
dialog->createPage(pl2);
dialog->addColorItem(cl, pl2, color);
dialog->addTextItem(ll, pl2, label);
dialog->addComboItem(ltl, pl2, lineTypes, lineType);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getFile(spl, l);
if (l.count())
scriptPath = l[0];
dialog->getText(clsl, comlineParms);
seconds = dialog->getInt(tol);
dateFlag = dialog->getCheck(dl);
openFlag = dialog->getCheck(ol);
highFlag = dialog->getCheck(hl);
lowFlag = dialog->getCheck(lol);
closeFlag = dialog->getCheck(cll);
volumeFlag = dialog->getCheck(vl);
oiFlag = dialog->getCheck(oil);
dialog->getColor(cl, color);
dialog->getText(ll, label);
lineType = (PlotLine::LineType) dialog->getComboIndex(ltl);
rc = TRUE;
}
else
rc = FALSE;
delete dialog;
return rc;
}