1、实现井的展示和多选;

feature/ribbon-menu-20240927
simonyan 3 weeks ago
parent fb03d39ac6
commit ee8fd00cc3

@ -703,16 +703,18 @@ void nmSubWndMain::selectWell()
int wellCount = zxCurProject->getChildrenCount(iDataModelType::sTypeWell);
ZxDataObjectList wellList = zxCurProject->getChildren(iDataModelType::sTypeWell);
nmDataLogFile::getInstance()->writeLog(QString(" %1 %2").arg(wellCount).arg(wellList.size()));
QStringList wellNames;
QList<QVariant> wellCodes;
for (int i = 0; i < wellList.size(); i++) {
ZxDataObject* wellObj = wellList[i];
nmDataLogFile::getInstance()->writeLog(wellObj->getName() + " " + wellObj->getCode());
wellNames.append(wellObj->getName());
wellCodes.append(wellObj->getCode());
}
nmWxSelectWellsDlg* dlg = new nmWxSelectWellsDlg(this);
nmWxSelectWellsWidget *comboBox = new nmWxSelectWellsWidget(this);
comboBox->addItem("Option 1", 1);
comboBox->addItem("Option 2", 2 );
comboBox->addItem("Option 3", 3);
dlg->setWidget(comboBox);
nmWxSelectWellsWidget *wellListWidget = new nmWxSelectWellsWidget(this);
wellListWidget->addItems(wellNames, wellCodes);
dlg->setWidget(wellListWidget);
if(dlg->exec() == QDialog::Accepted) {
// 用户点击了“确定”按钮
nmDataLogFile::getInstance()->writeLog(" OK ");

Loading…
Cancel
Save