本文整理汇总了C++中Global::getExtraField方法的典型用法代码示例。如果您正苦于以下问题:C++ Global::getExtraField方法的具体用法?C++ Global::getExtraField怎么用?C++ Global::getExtraField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Global
的用法示例。
在下文中一共展示了Global::getExtraField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
ScatterPlotWidget::ScatterPlotWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::ScatterPlotWidget),
selectedTrips(NULL),
selectionGraph(NULL)
{
ui->setupUi(this);
attrib1 = getAttrib(ui->comboBox->currentText());
attrib2 = getAttrib(ui->comboBox_2->currentText());
//
Global* global = Global::getInstance();
int numExtraFields = global->numExtraFields();
for(int i = 0 ; i < numExtraFields ; ++i){
ExtraField field = global->getExtraField(i);
if(field.active){
ui->comboBox->addItem(field.screenName);
ui->comboBox_2->addItem(field.screenName);
}
}
// connect slots that takes care that when an axis is selected, only that direction can be dragged and zoomed:
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress()));
connect(ui->customPlot, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheel()));
//
updatePlot();
}