当前位置: 首页>>代码示例>>C++>>正文


C++ PrefDialog::getText方法代码示例

本文整理汇总了C++中PrefDialog::getText方法的典型用法代码示例。如果您正苦于以下问题:C++ PrefDialog::getText方法的具体用法?C++ PrefDialog::getText怎么用?C++ PrefDialog::getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PrefDialog的用法示例。


在下文中一共展示了PrefDialog::getText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: indicatorPrefDialog

int PP::indicatorPrefDialog (QWidget *w)
{
  QString pl = QObject::tr("Support");
  QString scl = QObject::tr("Support Color");
  QString lfsl = QObject::tr("Label First Support");
  QString lssl = QObject::tr("Label Second Support");
  QString ltsl = QObject::tr("Label Third Support");
  QString pl2 = QObject::tr("Resistance");
  QString rcl = QObject::tr("Resistance Color");
  QString lfrl = QObject::tr("Label First Resistance");
  QString lsrl = QObject::tr("Label Second Resistance");
  QString ltrl = QObject::tr("Label Third Resistance");

  PrefDialog *dialog = new PrefDialog(w);
  dialog->setCaption(QObject::tr("PP Indicator"));
  dialog->setHelpFile(helpFile);

  dialog->createPage (pl);
  dialog->addColorItem(scl, pl, supColor);
  dialog->addTextItem(lfsl, pl, supLabel);
  dialog->addTextItem(lssl, pl, supLabel2);
  dialog->addTextItem(ltsl, pl, supLabel3);
  
  dialog->createPage (pl2);
  dialog->addColorItem(rcl, pl2, resColor);
  dialog->addTextItem(lfrl, pl2, resLabel);
  dialog->addTextItem(lsrl, pl2, resLabel2);
  dialog->addTextItem(ltrl, pl2, resLabel3);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(scl, supColor);
    dialog->getColor(rcl, resColor);
    dialog->getText(lfsl, supLabel);
    dialog->getText(lssl, supLabel2);
    dialog->getText(ltsl, supLabel3);
    dialog->getText(lfrl, resLabel);
    dialog->getText(lsrl, resLabel2);
    dialog->getText(ltrl, resLabel3);
    rc = TRUE;
  }
  else
    rc = FALSE;
  
  delete dialog;
  return rc;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:49,代码来源:PP.cpp

示例2: 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;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:28,代码来源:SYMBOL.cpp

示例3: formatDialog

void PP::formatDialog (QStringList &, QString &rv, QString &rs)
{
  rs.truncate(0);
  rv.truncate(0);
  QString pl = QObject::tr("Parms");
  QString vnl = QObject::tr("Variable Name");
  QString ppl = QObject::tr("PP Level");
  PrefDialog *dialog = new PrefDialog(0);
  dialog->setCaption(QObject::tr("PP Format"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);

  QString s;
  dialog->addTextItem(vnl, pl, s);
  dialog->addComboItem(ppl, pl, ppList, 0);

  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getText(vnl, rv);
    dialog->getCombo(ppl, rs);
  }

  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:26,代码来源:PP.cpp

示例4: editPlotItem

void FormulaEdit::editPlotItem ()
{
  QString s = plot->currentText();
  if (! s.length())
    return;
  s.remove(0, s.find("(", 0, TRUE) + 1);
  s.truncate(s.find(")", -1, TRUE));
  QStringList l = QStringList::split(",", s, FALSE);
  int loop;
  for (loop = 0; loop < (int) l.count(); loop++)
    l[loop] = l[loop].stripWhiteSpace();

  QString pl = tr("Plot");
  QString cl = tr("Color");
  QString ll = tr("Label");
  QString ltl = tr("Line Type");
  QString vl = tr("Variable");

  PrefDialog *dialog = new PrefDialog(this);
  dialog->setCaption(tr("Edit Plot"));
  dialog->createPage (pl);

  s = "Var";
  QStringList l2;
  getVariableList(l2, FALSE);
  dialog->addComboItem(vl, pl, l2, l[0]);

  QColor c(l[1]);
  dialog->addColorItem(cl, pl, c);

  dialog->addTextItem(ll, pl, l[2]);

  l2 = lineTypes;
  dialog->addComboItem(ltl, pl, l2, l[3]);

  int rc = dialog->exec();
  if (rc != QDialog::Accepted)
  {
    delete dialog;
    return;
  }

  QString ts;
  s = "plot (";
  dialog->getCombo(vl, ts);
  s.append(ts + ",");
  dialog->getColor(cl, c);
  s.append(c.name() + ",");
  dialog->getText(ll, ts);
  if (! ts.length())
    ts = " ";
  s.append(ts + ",");
  dialog->getCombo(ltl, ts);
  s.append(ts + ")");
  plot->changeItem(s, plot->currentItem());

  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:58,代码来源:FormulaEdit.cpp

示例5: formatDialog

void BARS::formatDialog (QStringList &, QString &rv, QString &rs)
{
  rs.truncate(0);
  rv.truncate(0);

  bool ok;
  method = QInputDialog::getItem(QObject::tr("BARS Method Selection"),
                                 QObject::tr("Select a method:"),
                                 methodList,
                                 0,
                                 TRUE,
                                 &ok,
                                 0);
  if (! ok)
    return;

  QString pl = QObject::tr("Parms");
  QString vnl = QObject::tr("Variable Name");
  QString cl = QObject::tr("Color");
  QString rl = QObject::tr("Reversal");
  PrefDialog *dialog = new PrefDialog(0);
  dialog->setCaption(QObject::tr("BARS Format"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);

  QString s;
  dialog->addTextItem(vnl, pl, s);

  if (! method.compare("HACandle"))
    dialog->addColorItem(cl, pl, candleColor);

  if (! method.compare("PF"))
    dialog->addIntItem(rl, pl, pfReversal);

  int rc = dialog->exec();

  if (rc == QDialog::Accepted)
  {
    dialog->getText(vnl, rv);
    rs = method;

    if (! method.compare("HACandle"))
    {
      dialog->getColor(cl, candleColor);
      rs.append("," + candleColor.name());
    }

    if (! method.compare("PF"))
    {
      pfReversal = dialog->getInt(rl);
      rs.append("," + QString::number(pfReversal));
    }
  }

  delete dialog;
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:56,代码来源:BARS.cpp

示例6: prefDialog

void SellArrow::prefDialog ()
{
  QString pl = tr("Details");
  QString cl = tr("Color");
  QString vl = tr("Value");
  QString il = tr("Identifier");
  QString bl = tr("Price");
  QString sd = tr("Set Default");

  PrefDialog *dialog = new PrefDialog();
  dialog->setCaption(tr("Edit SellArrow"));
  dialog->createPage (pl);
  dialog->setHelpFile (helpFile);
  dialog->addColorPrefItem(cl, pl, color);
  dialog->addDoubleItem(vl, pl, getValue());
  dialog->addTextItem(il, pl, identifier);
  dialog->addTextItem(bl, pl, price);
  dialog->addCheckItem(sd, pl, FALSE);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cl, color);
    value = dialog->getDouble(vl);
    dialog->getText(il, identifier);
    dialog->getText(bl, price);
    
    setSaveFlag(TRUE);
    
    bool f = dialog->getCheck(sd);
    if (f)
    {
      defaultColor = color;
      saveDefaults();
    }
    
    emit signalDraw();
  }
  
  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:42,代码来源:SellArrow.cpp

示例7: indicatorPrefDialog

int LOWPASS::indicatorPrefDialog (QWidget *w)
{
  QString pl = QObject::tr("Parms");
  QString cl = QObject::tr("Color");
  QString ll = QObject::tr("Label");
  QString ltl = QObject::tr("Line Type");
  QString fl = QObject::tr("Freq");
  QString wl = QObject::tr("Width");
  QString il = QObject::tr("Input");
  
  PrefDialog *dialog = new PrefDialog(w);
  dialog->setCaption(QObject::tr("LOWPASS Indicator"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);

  dialog->addColorItem(cl, pl, color);
  dialog->addTextItem(ll, pl, label);
  dialog->addComboItem(ltl, pl, lineTypes, lineType);
  dialog->addComboItem(il, pl, inputTypeList, input);
  dialog->addDoubleItem(fl, pl, freq, 0, 0.5);
  dialog->addDoubleItem(wl, pl, width, 0.0001, 0.2);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cl, color);
    lineType = (PlotLine::LineType) dialog->getComboIndex(ltl);
    dialog->getText(ll, label);
    input = (BarData::InputType) dialog->getComboIndex(il);

    freq = dialog->getDouble(fl);
    if (freq < 0.0)
      freq = 0.0;
    if (freq > 0.5)
      freq = 0.5;

    width = dialog->getDouble(wl);
    if (width < 0.0001)
      width = 0.0001;
    if (width > 0.2)
      width = 0.2;

    rc = TRUE;
  }
  else
    rc = FALSE;
  
  delete dialog;
  return rc;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:51,代码来源:LOWPASS.cpp

示例8: formatDialog

void THERM::formatDialog (QStringList &, QString &rv, QString &rs)
{
  rs.truncate(0);
  rv.truncate(0);
  QString pl = QObject::tr("Parms");
  QString vnl = QObject::tr("Variable Name");
  QString tl = QObject::tr("Threshold");
  QString sl = QObject::tr("Smoothing");
  QString stl = QObject::tr("Smoothing Type");
  QString mpl = QObject::tr("MA Period");
  QString mtl = QObject::tr("MA Type");
  PrefDialog *dialog = new PrefDialog(0);
  dialog->setCaption(QObject::tr("THERM Format"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);

  QString s;
  QStringList l;
  getMATypes(l);
  dialog->addTextItem(vnl, pl, s);
  dialog->addComboItem(mtl, pl, l, maType);
  dialog->addIntItem(mpl, pl, maPeriod, 0, 99999999);
  dialog->addDoubleItem(tl, pl, threshold, 1, 99999999);
  dialog->addComboItem(stl, pl, l, smoothType);
  dialog->addIntItem(sl, pl, smoothing, 0, 99999999);

  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getText(vnl, rv);

    dialog->getCombo(mtl, rs);

    int t = dialog->getInt(mpl);
    rs.append("," + QString::number(t));

    double d = dialog->getDouble(tl);
    rs.append("," + QString::number(d));

    dialog->getCombo(stl, s);
    rs.append("," + s);

    t = dialog->getInt(sl);
    rs.append("," + QString::number(t));
  }

  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:49,代码来源:THERM.cpp

示例9: insertPlotItem

void FormulaEdit::insertPlotItem ()
{
  QString pl = tr("Plot");
  QString cl = tr("Color");
  QString ll = tr("Label");
  QString ltl = tr("Line Type");
  QString vl = tr("Variable");

  PrefDialog *dialog = new PrefDialog(this);
  dialog->setCaption(tr("Insert Plot"));
  dialog->createPage (pl);

  QString s("Var");
  QStringList l;
  getVariableList(l, FALSE);
  dialog->addComboItem(vl, pl, l, 0);

  QColor c("red");
  dialog->addColorItem(cl, pl, c);
  s = "Label";
  dialog->addTextItem(ll, pl, s);

  dialog->addComboItem(ltl, pl, lineTypes, 4);

  int rc = dialog->exec();
  if (rc != QDialog::Accepted)
  {
    delete dialog;
    return;
  }

  QString ts;
  s = "plot (";
  dialog->getCombo(vl, ts);
  s.append(ts + ",");
  dialog->getColor(cl, c);
  s.append(c.name() + ",");
  dialog->getText(ll, ts);
  if (! ts.length())
    ts = " ";
  s.append(ts + ",");
  dialog->getCombo(ltl, ts);
  s.append(ts + ")");
  plot->insertItem(s, plot->currentItem() + 1);

  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:47,代码来源:FormulaEdit.cpp

示例10: prefDialog

void Text::prefDialog ()
{
  QString pl = tr("Details");
  QString cl = tr("Color");
  QString sd = tr("Set Default");
  QString fl = tr("Font");
  QString ll = tr("Label");
  QString vl = tr("Value");

  PrefDialog *dialog = new PrefDialog();
  dialog->setCaption(tr("Edit Text"));
  dialog->createPage (pl);
  dialog->setHelpFile (helpFile);
  dialog->addColorPrefItem(cl, pl, color);
  dialog->addFontItem(fl, pl, font);
  dialog->addTextItem(ll, pl, label);
  dialog->addDoubleItem(vl, pl, getValue());
  dialog->addCheckItem(sd, pl, FALSE);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cl, color);
    dialog->getText(ll, label);
    dialog->getFont(fl, font);
    value = dialog->getDouble(vl);
    
    setSaveFlag(TRUE);
    
    bool f = dialog->getCheck(sd);
    if (f)
    {
      dialog->getColor(cl, defaultColor);
      dialog->getFont(fl, dfont);
      saveDefaults();
    }
    
    emit signalDraw();
  }
  
  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:43,代码来源:Text.cpp

示例11: prefDialog

void HorizontalLine::prefDialog ()
{
  QString pl = tr("Details");
  QString cl = tr("Color");
  QString sd = tr("Set Default");
  QString vl = tr("Value");
  QString tx = tr("Text");

  PrefDialog *dialog = new PrefDialog();
  dialog->setCaption(tr("Edit HorizontalLine"));
  dialog->createPage (pl);
  dialog->setHelpFile (helpFile);
  dialog->addColorPrefItem(cl, pl, color);
  dialog->addDoubleItem(vl, pl, getValue());
  dialog->addTextItem(tx, pl, text);  //cz odkazy na objekty definovane nahore
  dialog->addCheckItem(sd, pl, FALSE);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cl, color);
    value = dialog->getDouble(vl);
    dialog->getText(tx, text);
    setSaveFlag(TRUE);
    
    bool f = dialog->getCheck(sd);
    if (f)
    {
      defaultColor = color;
      saveDefaults();
    }
    
    emit signalDraw();
  }
  
  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:38,代码来源:HorizontalLine.cpp

示例12: formatDialog

void LOWPASS::formatDialog (QStringList &vl, QString &rv, QString &rs)
{
  rs.truncate(0);
  rv.truncate(0);
  QString pl = QObject::tr("Parms");
  QString vnl = QObject::tr("Variable Name");
  QString fl = QObject::tr("Freq");
  QString wl = QObject::tr("Width");
  QString il = QObject::tr("Input");
  PrefDialog *dialog = new PrefDialog(0);
  dialog->setCaption(QObject::tr("LOWPASS Format"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);

  QString s;
  dialog->addTextItem(vnl, pl, s);
  dialog->addComboItem(il, pl, vl, input);
  dialog->addDoubleItem(fl, pl, freq, 0, 0.5);
  dialog->addDoubleItem(wl, pl, width, 0.0001, 0.2);

  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getText(vnl, rv);

    dialog->getCombo(il, s);
    rs.append(s + ",");

    double t = dialog->getDouble(fl);
    rs.append(QString::number(t) + ",");

    t = dialog->getDouble(wl);
    rs.append(QString::number(t));
  }

  delete dialog;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:38,代码来源:LOWPASS.cpp

示例13: indicatorPrefDialog

int SINWAV::indicatorPrefDialog (QWidget *w)
{
  QString pl = QObject::tr("Parms");
  QString cl = QObject::tr("Sine Color");
  QString c2 = QObject::tr("Lead Color");
  QString ll = QObject::tr("Label");
  QString ltl = QObject::tr("Sine Line Type");
  QString lt2 = QObject::tr("Lead Line Type");

  PrefDialog *dialog = new PrefDialog(w);
  dialog->setCaption(QObject::tr("SINWAV Indicator"));
  dialog->createPage (pl);
  dialog->setHelpFile(helpFile);
  dialog->addColorItem(cl, pl, colorSin);
  dialog->addComboItem(ltl, pl, lineTypes, lineTypeSin);
  dialog->addColorItem(c2, pl, colorLead);
  dialog->addComboItem(lt2, pl, lineTypes, lineTypeLead);
  dialog->addTextItem(ll, pl, labelSin);

  int rc = dialog->exec();

  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cl, colorSin);
    dialog->getColor(c2, colorLead);
    lineTypeSin = (PlotLine::LineType) dialog->getComboIndex(ltl);
    lineTypeLead = (PlotLine::LineType) dialog->getComboIndex(lt2);
    dialog->getText(ll, labelSin);

    rc = TRUE;
  }
  else
    rc = FALSE;

  delete dialog;
  return rc;
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:37,代码来源:SINWAV.cpp

示例14: indicatorPrefDialog


//.........这里部分代码省略.........
    dialog->addComboItem(ma3il, pl4, inputTypeList, maInput3);

    dialog->createPage (pl5);
    dialog->addColorItem(ma4cl, pl5, maColor4);
    dialog->addTextItem(ma4ll, pl5, maLabel4);
    dialog->addComboItem(ma4ltl, pl5, lineTypes, maLineType4);
    dialog->addComboItem(ma4tl, pl5, mal, maType4);
    dialog->addIntItem(ma4pl, pl5, maPeriod4, 1, 999999);
    dialog->addComboItem(ma4il, pl5, inputTypeList, maInput4);
  }

  int rc = dialog->exec();

  if (rc == QDialog::Accepted)
  {
    if (! method.compare("OHLC"))
    {
      dialog->getColor(ucl, barUpColor);
      dialog->getColor(dcl, barDownColor);
      dialog->getColor(ncl, barNeutralColor);
      lineType = PlotLine::Bar;
    }

    if (! method.compare("Candle") || ! method.compare("HACandle"))
    {
      dialog->getColor(ucl, barUpColor);
      dialog->getColor(dcl, barDownColor);
      dialog->getColor(ncl, barNeutralColor);
      lineType = PlotLine::Candle;
    }

    if (! method.compare("PF"))
    {
      dialog->getCombo(pfml, pfMethod);
      dialog->getColor(pfxcl, pfXColor);
      dialog->getColor(pfocl, pfOColor);
      pfReversal = dialog->getInt(pfrl);

      if (! pfMethod.compare(QObject::tr("Custom")) && data)
      {
        double d = dialog->getDouble(pfbsl);
        QString s;
        Config config;
        config.getData(Config::CurrentChart, s);
        QFileInfo fi(s);
        s = fi.fileName();
        DBBase db;
        if (! db.open(dbPath))
        {
          QString s2 = QString::number(d) + "," + QString::number(pfReversal);
          db.setData(s, s2);
          db.close();
        }
      }

      lineType = PlotLine::PF;
    }

    dialog->getText(ll, label);

    if (! method.compare("OHLC") || ! method.compare("Candle") || ! method.compare("HACandle"))
    {
      dialog->getColor(macl, maColor);
      maLineType = (PlotLine::LineType) dialog->getComboIndex(maltl);
      maPeriod = dialog->getInt(mapl);
      dialog->getText(mall, maLabel);
      maType = dialog->getComboIndex(matl);
      maInput = (BarData::InputType) dialog->getComboIndex(mail);

      dialog->getColor(ma2cl, maColor2);
      maLineType2 = (PlotLine::LineType) dialog->getComboIndex(ma2ltl);
      maPeriod2 = dialog->getInt(ma2pl);
      dialog->getText(ma2ll, maLabel2);
      maType2 = dialog->getComboIndex(ma2tl);
      maInput2 = (BarData::InputType) dialog->getComboIndex(ma2il);


      dialog->getColor(ma3cl, maColor3);
      maLineType3 = (PlotLine::LineType) dialog->getComboIndex(ma3ltl);
      maPeriod3 = dialog->getInt(ma3pl);
      dialog->getText(ma3ll, maLabel3);
      maType3 = dialog->getComboIndex(ma3tl);
      maInput3 = (BarData::InputType) dialog->getComboIndex(ma3il);

      dialog->getColor(ma4cl, maColor4);
      maLineType4 = (PlotLine::LineType) dialog->getComboIndex(ma4ltl);
      maPeriod4 = dialog->getInt(ma4pl);
      dialog->getText(ma4ll, maLabel4);
      maType4 = dialog->getComboIndex(ma4tl);
      maInput4 = (BarData::InputType) dialog->getComboIndex(ma4il);
    }

    rc = TRUE;
  }
  else
    rc = FALSE;

  delete dialog;
  return rc;
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:101,代码来源:BARS.cpp

示例15: indicatorPrefDialog

int THERM::indicatorPrefDialog (QWidget *w)
{
  QString pl = QObject::tr("THERM Parms");
  QString pl2 = QObject::tr("MA Parms");
  QString cal = QObject::tr("Color Above MA");
  QString cbl = QObject::tr("Color Below MA");
  QString ctl = QObject::tr("Color Threshold");
  QString ll = QObject::tr("Label");
  QString tl = QObject::tr("Threshold");
  QString sl = QObject::tr("Smoothing");
  QString stl = QObject::tr("Smoothing Type");
  QString mcl = QObject::tr("MA Color");
  QString mltl = QObject::tr("MA Line Type");
  QString mll = QObject::tr("MA Label");
  QString mpl = QObject::tr("MA Period");
  QString mtl = QObject::tr("MA Type");

  PrefDialog *dialog = new PrefDialog(w);
  dialog->setCaption(QObject::tr("THERM Indicator"));
  dialog->setHelpFile(helpFile);

  dialog->createPage (pl);
  dialog->addColorItem(cal, pl, upColor);
  dialog->addColorItem(cbl, pl, downColor);
  dialog->addColorItem(ctl, pl, threshColor);
  dialog->addTextItem(ll, pl, label);
  dialog->addDoubleItem(tl, pl, threshold, 1, 99999999);
  dialog->addIntItem(sl, pl, smoothing, 0, 99999999);
  QStringList l;
  getMATypes(l);
  dialog->addComboItem(stl, pl, l, smoothType);
  
  dialog->createPage (pl2);
  dialog->addColorItem(mcl, pl2, maColor);
  dialog->addComboItem(mltl, pl2, lineTypes, maLineType);
  dialog->addTextItem(mll, pl2, maLabel);
  dialog->addIntItem(mpl, pl2, maPeriod, 0, 99999999);
  dialog->addComboItem(mtl, pl2, l, maType);
  
  int rc = dialog->exec();
  
  if (rc == QDialog::Accepted)
  {
    dialog->getColor(cal, upColor);
    dialog->getColor(cbl, downColor);
    dialog->getColor(ctl, threshColor);
    dialog->getText(ll, label);
    threshold = dialog->getDouble(tl);
    smoothing = dialog->getInt(sl);
    smoothType = dialog->getComboIndex(stl);
    
    dialog->getColor(mcl, maColor);
    maLineType = (PlotLine::LineType) dialog->getComboIndex(mltl);
    dialog->getText(mll, maLabel);
    maPeriod = dialog->getInt(mpl);
    maType = dialog->getComboIndex(mtl);
    rc = TRUE;
  }
  else
    rc = FALSE;
  
  delete dialog;
  return rc;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:64,代码来源:THERM.cpp


注:本文中的PrefDialog::getText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。