本文整理汇总了C++中PrefDialog::getSymbol方法的典型用法代码示例。如果您正苦于以下问题:C++ PrefDialog::getSymbol方法的具体用法?C++ PrefDialog::getSymbol怎么用?C++ PrefDialog::getSymbol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrefDialog
的用法示例。
在下文中一共展示了PrefDialog::getSymbol方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: formatDialog
void SYMBOL::formatDialog (QStringList &, QString &rv, QString &rs)
{
rs.truncate(0);
rv.truncate(0);
QString pl = QObject::tr("Parms");
QString vnl = QObject::tr("Variable Name");
QString sl = QObject::tr("Symbol");
PrefDialog *dialog = new PrefDialog(0);
dialog->setCaption(QObject::tr("SYMBOL Format"));
dialog->createPage (pl);
dialog->setHelpFile(helpFile);
QString s;
Config config;
dialog->addTextItem(vnl, pl, s);
config.getData(Config::DataPath, s);
dialog->addSymbolItem(sl, pl, s, symbol);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getText(vnl, rv);
dialog->getSymbol(sl, rs);
}
delete dialog;
}
示例2: prefDialog
bool Spread::prefDialog (QString &fs, QString &ss)
{
QString pl = QObject::tr("Parms");
QString fsl = QObject::tr("First Symbol");
QString ssl = QObject::tr("Second Symbol");
PrefDialog *dialog = new PrefDialog(0);
dialog->setCaption(QObject::tr("Edit Spread"));
dialog->createPage (pl);
dialog->setHelpFile(helpFile);
Config config;
QString s;
config.getData(Config::DataPath, s);
dialog->addSymbolItem(fsl, pl, s, fs);
dialog->addSymbolItem(ssl, pl, s, ss);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getSymbol(fsl, fs);
dialog->getSymbol(ssl, ss);
delete dialog;
return TRUE;
}
delete dialog;
return FALSE;
}
示例3: spreadPref
int DbPlugin::spreadPref ()
{
int rc = 0;
QString pl = QObject::tr("Parms");
QString fsl = QObject::tr("First Symbol");
QString ssl = QObject::tr("Second Symbol");
PrefDialog *dialog = new PrefDialog(0);
dialog->setCaption(QObject::tr("Edit Spread"));
dialog->createPage (pl);
dialog->setHelpFile(helpFile);
Config config;
QString s, s3;
config.getData(Config::DataPath, s);
QString s2 = "FirstSymbol";
getData(s2, s3);
dialog->addSymbolItem(fsl, pl, s, s3);
s2 = "SecondSymbol";
getData(s2, s3);
dialog->addSymbolItem(ssl, pl, s, s3);
int trc = dialog->exec();
if (trc == QDialog::Accepted)
{
dialog->getSymbol(fsl, s);
s2 = "FirstSymbol";
setData(s2, s);
dialog->getSymbol(ssl, s);
s2 = "SecondSymbol";
setData(s2, s);
rc = TRUE;
}
delete dialog;
return rc;
}
示例4: editItem
void IndexDialog::editItem ()
{
QListViewItem *item = list->selectedItem();
if (! item)
return;
QString s = item->text(0);
double weight = item->text(1).toFloat();
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Edit Index Item"));
QString pl = tr("Details");
dialog->createPage (pl);
QString t = tr("Symbol");
Config config;
QString t2;
config.getData(Config::DataPath, t2);
dialog->addSymbolItem(t, pl, t2, s);
t = tr("Weight");
dialog->addDoubleItem(t, pl, weight);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
t = tr("Symbol");
dialog->getSymbol(t, s);
if (! s.length())
{
delete dialog;
return;
}
t = tr("Weight");
weight = dialog->getDouble(t);
symbolDict.remove(item->text(0));
QStringList l = QStringList::split("/", s, FALSE);
symbolDict.insert(l[l.count() - 1], new QString(s));
item->setText(0, l[l.count() - 1]);
item->setText(1, QString::number(weight));
buttonStatus();
}
delete dialog;
}
示例5: addItem
void IndexDialog::addItem ()
{
double weight = 1;
QString s;
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Add Index Item"));
QString pl = tr("Details");
dialog->createPage (pl);
QString t = tr("Symbol");
Config config;
QString t2;
config.getData(Config::DataPath, t2);
dialog->addSymbolItem(t, pl, t2, s);
t = tr("Weight");
dialog->addDoubleItem(t, pl, weight);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
t = tr("Symbol");
dialog->getSymbol(t, s);
if (! s.length())
{
delete dialog;
return;
}
t = tr("Weight");
weight = dialog->getDouble(t);
QStringList l = QStringList::split("/", s, FALSE);
symbolDict.insert(l[l.count() - 1], new QString(s));
new QListViewItem(list, l[l.count() - 1], QString::number(weight));
buttonStatus();
}
delete dialog;
}