本文整理汇总了C++中DateRange::list方法的典型用法代码示例。如果您正苦于以下问题:C++ DateRange::list方法的具体用法?C++ DateRange::list怎么用?C++ DateRange::list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateRange
的用法示例。
在下文中一共展示了DateRange::list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QTimer
void
GUIWidget::createGUI ()
{
_timer = new QTimer(this);
connect(_timer, SIGNAL(timeout()), this, SLOT(updateGUI()));
QVBoxLayout *vbox = new QVBoxLayout;
vbox->setSpacing(2);
vbox->setMargin(5);
setLayout(vbox);
QFormLayout *form = new QFormLayout;
form->setSpacing(2);
form->setMargin(0);
vbox->addLayout(form);
// templates
_templates = new QComboBox;
form->addRow (tr("Templates"), _templates);
// range
DateRange dr;
_range = new QComboBox;
_range->addItems(dr.list());
_range->setCurrentIndex(5);
form->addRow (tr("Range"), _range);
// symbol file
_symbolButton = new FileButton(0);
connect(_symbolButton, SIGNAL(signalSelectionChanged(QStringList)), this, SLOT(buttonStatus()));
_symbolButton->setFiles(QStringList() << "/tmp/yahoo_symbols");
form->addRow (tr("Symbol File"), _symbolButton);
// log
QGroupBox *gbox = new QGroupBox;
gbox->setTitle(tr("Log"));
vbox->addWidget(gbox);
QVBoxLayout *tvbox = new QVBoxLayout;
gbox->setLayout(tvbox);
_log = new QTextEdit;
_log->setReadOnly(TRUE);
tvbox->addWidget(_log);
// buttonbox
QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Help);
vbox->addWidget(bb);
// ok button
_okButton = bb->addButton(QDialogButtonBox::Ok);
_okButton->setText(tr("&OK"));
connect(_okButton, SIGNAL(clicked()), this, SLOT(downloadHistory()));
// cancel button
_cancelButton = bb->addButton(QDialogButtonBox::Cancel);
_cancelButton->setText(tr("&Cancel"));
_cancelButton->setDefault(TRUE);
_cancelButton->setFocus();
_cancelButton->setEnabled(FALSE);
// help button
QPushButton *b = bb->button(QDialogButtonBox::Help);
b->setText(tr("&Help"));
connect(b, SIGNAL(clicked()), this, SIGNAL(signalHelp()));
}