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


C++ DBIndexItem::getTitle方法代码示例

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


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

示例1: indexPref

int DbPlugin::indexPref ()
{
  int rc = 0;
  QString nam, il;
  DBIndexItem item;
  chartIndex->getIndexItem(indexKey, item);
  item.getTitle(nam);

  QString s = "List";
  getData(s, il);

  IndexDialog *dialog = new IndexDialog(nam, il);
  int trc = dialog->exec();
  if (trc == QDialog::Accepted)
  {
    dialog->getName(nam);
    item.setTitle(nam);
    dialog->getList(il);
    setData(s, il);
    chartIndex->setIndexItem(indexKey, item);
    rc = TRUE;
  }
  delete dialog;
  return rc;
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:25,代码来源:DbPlugin.cpp

示例2: createDetailsPage

void StocksDialog::createDetailsPage ()
{
    QWidget *w = new QWidget(this);

    Q3VBoxLayout *vbox = new Q3VBoxLayout(w);
    vbox->setMargin(5);
    vbox->setSpacing(5);

    Q3GridLayout *grid = new Q3GridLayout(vbox);
    grid->setMargin(0);
    grid->setSpacing(5);

    QLabel *label = new QLabel(tr("Symbol"), w);
    grid->addWidget(label, 0, 0);

    QString s;
    DBIndexItem item;
    index->getIndexItem(symbol, item);
    item.getSymbol(s);
    label = new QLabel(s, w);
    label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
    grid->addWidget(label, 0, 1);

    label = new QLabel(tr("Name"), w);
    grid->addWidget(label, 1, 0);

    item.getTitle(s);
    title = new QLineEdit(s, w);
    grid->addWidget(title, 1, 1);

    label = new QLabel(tr("Exchange"), w);
    grid->addWidget(label, 2, 0);

    item.getExchange(s);
    Exchange ex;
    ex.getExchange(s.toInt(), s);
    label = new QLabel(s, w);
    label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
    grid->addWidget(label, 2, 1);

    label = new QLabel(tr("Type"), w);
    grid->addWidget(label, 3, 0);

    item.getType(s);
    label = new QLabel(s, w);
    label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
    grid->addWidget(label, 3, 1);

    label = new QLabel(tr("First Date"), w);
    grid->addWidget(label, 4, 0);

    Bar bar;
    db->getFirstBar(bar);
    if (! bar.getEmptyFlag())
    {
        bar.getDateTimeString(TRUE, s);
        label = new QLabel(s, w);
        label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
        grid->addWidget(label, 4, 1);
    }

    label = new QLabel(tr("Last Date"), w);
    grid->addWidget(label, 5, 0);

    Bar bar2;
    db->getLastBar(bar2);
    if (! bar2.getEmptyFlag())
    {
        bar2.getDateTimeString(TRUE, s);
        label = new QLabel(s, w);
        label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
        grid->addWidget(label, 5, 1);
    }

    grid->expand(grid->numRows() + 1, grid->numCols());
    grid->setColStretch(1, 1);

    vbox->addStretch(1);

    addTab(w, tr("Details"));
}
开发者ID:redrhino,项目名称:qtstalker-qt4,代码行数:81,代码来源:StocksDialog.cpp

示例3: parseFundamental


//.........这里部分代码省略.........
    s.append("US");
  s.append("/");
  s.append(ts2);

  if (plug.open(s, chartIndex))
  {
    QString ss(tr("Could not open db"));
    printStatusLogMessage(ss);
    return;
  }

  QString fn = ts2;

  // verify if this chart can be updated by this plugin
  DBIndexItem item;
  chartIndex->getIndexItem(fn, item);
  item.getSymbol(s);
  if (! s.length())
  {
    if(plug.createNewStock())
    {
      plug.close();
      return;
    }

    chartIndex->getIndexItem(fn, item);

    item.setQuotePlugin(pluginName);
    item.setSymbol(ts2);
    QString title = ts2;
    int p = data.find("yfnc_leftnav1", 0, TRUE);
    if (p != -1)
    {
      p = data.find("b>", p, TRUE);
      if (p != -1)
      {
        p = p + 2;
        int p2 = data.find("<", p, TRUE);
        if (p2 != -1)
	{
	  s = data.mid(p, p2 - p);
	  if (s.length())
            title = s;
	}
      }
    }
    item.setTitle(title);

    chartIndex->setIndexItem(fn, item);
  }
  else
  {
    QString s2;
    item.getTitle(s2);
    if (! s.compare(s2))
    {
      int p = data.find("yfnc_leftnav1", 0, TRUE);
      if (p != -1)
      {
        p = data.find("b>", p, TRUE);
        if (p != -1)
        {
          p = p + 2;
          int p2 = data.find("<", p, TRUE);
          if (p2 != -1)
	  {
            s = data.mid(p, p2 - p);
	    if (s.length())
            {
              item.setTitle(s);
              chartIndex->setIndexItem(fn, item);
            }
	  }
	}
      }
    }
  }

//  item.getQuotePlugin(s);
//  if (s.compare(pluginName))
//  {
//    s = ts2 + " - " + tr("skipping update. Source does not match destination");
//    printStatusLogMessage(s);
//    plug.close();
//    return;
//  }

  // include date of this update
  QDate dt = QDate::currentDate();
  ts = "updateDate";
  ts2 = dt.toString("yyyy-MM-dd");
  fund.setData(ts, ts2);
  fund.getString(ts2);
  ts = "Fundamentals";
  chartIndex->setFundamentals(fn, ts2);

  plug.close();

  emit signalWakeup();
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:101,代码来源:Yahoo.cpp


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