|
|
|
@ -34,6 +34,7 @@ void nmWxTreeWidget::renderTree()
|
|
|
|
|
}
|
|
|
|
|
// 创建树形视图的根节点
|
|
|
|
|
m_treeRoot = new QTreeWidgetItem(m_treeWidget, QStringList(m_pAnalyzeData->analyzeName()));
|
|
|
|
|
// 一级节点
|
|
|
|
|
QMap<NM_TREE_TYPE, QString> nodeMap;
|
|
|
|
|
nodeMap.insert(TREE_OilReservoir, tr("Oil Reservoir"));
|
|
|
|
|
nodeMap.insert(TREE_Data, tr("Data"));
|
|
|
|
@ -44,7 +45,18 @@ void nmWxTreeWidget::renderTree()
|
|
|
|
|
// qDebug() << i.key() << i.value();
|
|
|
|
|
QTreeWidgetItem* item = new QTreeWidgetItem(m_treeRoot, i.key());
|
|
|
|
|
item->setText(0, i.value());
|
|
|
|
|
if (i.key() == TREE_OilReservoir) {
|
|
|
|
|
QMap<NM_TREE_OIL_RESERVOIR_TYPE, QString> oilNodeMap;
|
|
|
|
|
oilNodeMap.insert(TREE_Oil_Reservoir_Outline, tr("Outline"));
|
|
|
|
|
oilNodeMap.insert(TREE_Oil_Reservoir_Well, tr("Well"));
|
|
|
|
|
oilNodeMap.insert(TREE_Oil_Reservoir_Fault, tr("Fault"));
|
|
|
|
|
oilNodeMap.insert(TREE_Oil_Reservoir_Crack, tr("Crack"));
|
|
|
|
|
oilNodeMap.insert(TREE_Oil_Reservoir_Region, tr("Region"));
|
|
|
|
|
for (QMap<NM_TREE_OIL_RESERVOIR_TYPE, QString>::const_iterator j = oilNodeMap.constBegin(); j != oilNodeMap.constEnd(); ++j) {
|
|
|
|
|
QTreeWidgetItem* oilItem = new QTreeWidgetItem(item, j.key());
|
|
|
|
|
oilItem->setText(0, j.value());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
m_treeRoot->setExpanded(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|