本文整理汇总了C++中DBIndexItem::getFuturesType方法的典型用法代码示例。如果您正苦于以下问题:C++ DBIndexItem::getFuturesType方法的具体用法?C++ DBIndexItem::getFuturesType怎么用?C++ DBIndexItem::getFuturesType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBIndexItem
的用法示例。
在下文中一共展示了DBIndexItem::getFuturesType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createDetailsPage
void FuturesDialog::createDetailsPage ()
{
QWidget *w = new QWidget(this);
Q3VBoxLayout *vbox = new Q3VBoxLayout(w);
vbox->setMargin(5);
vbox->setSpacing(0);
Q3GridLayout *grid = new Q3GridLayout(vbox);
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("Futures Type"), w);
grid->addWidget(label, 4, 0);
QString s2;
item.getFuturesType(s2);
label = new QLabel(s2, w);
label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
grid->addWidget(label, 4, 1);
label = new QLabel(tr("Futures Month"), w);
grid->addWidget(label, 5, 0);
item.getFuturesMonth(s2);
label = new QLabel(s2, w);
label->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
grid->addWidget(label, 5, 1);
label = new QLabel(tr("First Date"), w);
grid->addWidget(label, 6, 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, 6, 1);
}
label = new QLabel(tr("Last Date"), w);
grid->addWidget(label, 7, 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, 7, 1);
}
grid->setColStretch(1, 1);
vbox->insertStretch(-1, 0);
addTab(w, tr("Details"));
}