本文整理汇总了C++中Airport::planeName方法的典型用法代码示例。如果您正苦于以下问题:C++ Airport::planeName方法的具体用法?C++ Airport::planeName怎么用?C++ Airport::planeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Airport
的用法示例。
在下文中一共展示了Airport::planeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAirportChanged
void WeatherParamSetupWidget::onAirportChanged(int index){
disconnect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
planeNameComboBox->clear();
Airport airport = airportList[index];
QStringList planeNameList = airport.planeName().split(",", QString::SkipEmptyParts);
planeNameComboBox->addItems(planeNameList);
connect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
this->onPlaneNameChanged(planeNameList[0]);
}
示例2: initUI
void WeatherParamSetupWidget::initUI(){
this->setWindowFlags(Qt::WindowCloseButtonHint);
this->setFixedWidth(440);
this->setFixedHeight(500);
this->setWindowIcon(QIcon(":/images/weather_setup.png"));
this->setWindowTitle("阀值设置");
//设置机场
airportComboBox = new QComboBox;
airportComboBox->addItems(apNameList);
//设置机型
planeNameComboBox = new QComboBox;
if(airportList.size() > 0){
Airport airport = airportList[airportComboBox->currentIndex()];
QStringList planeNameList = airport.planeName().split(",", QString::SkipEmptyParts);
planeNameComboBox->addItems(planeNameList);
}
//设置标签
tabWidget = new QTabWidget;
tabWidget->setContentsMargins(5, 5, 5, 5);
if(apNameList.size() > 0){
multiWeatherParamWidget = new MultiWeatherParamWidget;
multiWeatherParamWidget->onAirportChanged(apCodeList[airportComboBox->currentIndex()], planeNameComboBox->currentText());
tabWidget->addTab(multiWeatherParamWidget, "多要素");
singleWeatherParamWidget = new SingleWeatherParamWidget;
singleWeatherParamWidget->onAirportChanged(apCodeList[airportComboBox->currentIndex()], planeNameComboBox->currentText());
tabWidget->addTab(singleWeatherParamWidget, "单要素");
}
//布局
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(airportComboBox);
mainLayout->addWidget(planeNameComboBox);
mainLayout->addWidget(tabWidget);
//设置上一步下一步按钮
if(SharedMemory::isWelcome){
previousButton = new QPushButton;
previousButton->setText("上一步");
nextButton = new QPushButton;
nextButton->setText("下一步");
QHBoxLayout *hlayout = new QHBoxLayout;
hlayout->addWidget(previousButton);
hlayout->addStretch();
hlayout->addWidget(nextButton);
mainLayout->addLayout(hlayout);
}
this->setLayout(mainLayout);
}