|
@@ -90,7 +90,7 @@ namespace MainWidget
|
|
|
connect(this, SIGNAL(disPlayProp(DataProperty::DataBase *)), _mainWindow, SIGNAL(updateProperty(DataProperty::DataBase *)));
|
|
|
connect(this, SIGNAL(dispalyParaWidget(QWidget *)), _mainWindow, SIGNAL(updateParaWidget(QWidget *)));
|
|
|
// connect(this, SIGNAL(startMesherPySig(QString)), this, SLOT(startMesher(QString)));
|
|
|
-
|
|
|
+ connect(this, SIGNAL(importModel()), _mainWindow, SLOT(on_importGeometry()));
|
|
|
|
|
|
}
|
|
|
|
|
@@ -110,8 +110,6 @@ namespace MainWidget
|
|
|
_modelRoot->setText(0,"几何模型");
|
|
|
_modelRoot->setExpanded(true);
|
|
|
// _modelRoot->setIcon(0, QIcon(":/QUI/icon/geometry.png"));
|
|
|
- //设置根节点背景色
|
|
|
- // _modelRoot->setBackground(0, QBrush(QColor(238, 238, 238)));
|
|
|
this->addTopLevelItem(_modelRoot);
|
|
|
|
|
|
|
|
@@ -124,11 +122,14 @@ namespace MainWidget
|
|
|
this->addTopLevelItem(_gridRoot);
|
|
|
_gridRoot->setExpanded(true);
|
|
|
_meshRoot = new QTreeWidgetItem(_gridRoot, TreeItemType::MeshRoot);
|
|
|
- _meshRoot->setText(0, tr("网格"));
|
|
|
+ _meshRoot->setText(0, tr("流体网格"));
|
|
|
_meshRoot->setIcon(0, QIcon(":/QUI/icon/mesh.png"));
|
|
|
// _setRoot = new QTreeWidgetItem(_gridRoot, TreeItemType::MeshSetRoot);
|
|
|
// _setRoot->setText(0, tr("分组"));
|
|
|
// _setRoot->setIcon(0, QIcon(":/QUI/icon/mesh.png"));
|
|
|
+ _IRmeshRoot = new QTreeWidgetItem(_gridRoot, TreeItemType::MeshRoot);
|
|
|
+ _IRmeshRoot->setText(0, tr("红外网格"));
|
|
|
+ _IRmeshRoot->setIcon(0, QIcon(":/QUI/icon/mesh.png"));
|
|
|
|
|
|
//CFD计算
|
|
|
_cfdItem = new QTreeWidgetItem(this);
|
|
@@ -249,13 +250,6 @@ namespace MainWidget
|
|
|
// _modelRoot->setText(0, tr("几何模型"));
|
|
|
// _modelRoot->setExpanded(true);
|
|
|
|
|
|
-// QFileInfo fileInfo(Setting::BusAPI::instance()->getGeoFile());
|
|
|
-// QString fileNameFull = fileInfo.fileName();
|
|
|
-// int index = fileNameFull.lastIndexOf('.');
|
|
|
-// QString fileName = fileNameFull.left(index);
|
|
|
-// QTreeWidgetItem* fileItem = new QTreeWidgetItem(_modelRoot,TreeItemType::GeoComponentRoot);
|
|
|
-// fileItem->setText(0,fileName);
|
|
|
-
|
|
|
_geoData->sort();
|
|
|
blockSignals(true);
|
|
|
const int n = _geoData->getGeometrySetCount();
|
|
@@ -288,7 +282,11 @@ namespace MainWidget
|
|
|
// qDebug() << "component id:" << id;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ if(_modelRoot->childCount() == 0)
|
|
|
+ {
|
|
|
+ _modelTempItem = new QTreeWidgetItem(_modelRoot, TreeItemType::modelTemp);
|
|
|
+ _modelTempItem->setText(0, tr("单击添加模型"));
|
|
|
}
|
|
|
blockSignals(false);
|
|
|
|
|
@@ -319,7 +317,7 @@ namespace MainWidget
|
|
|
{
|
|
|
_meshRoot->takeChildren();
|
|
|
|
|
|
- _meshRoot->setText(0, "网格");
|
|
|
+ // _meshRoot->setText(0, "网格");
|
|
|
const int n = _MeshData->getKernalCount();
|
|
|
blockSignals(true);
|
|
|
for (int i = 0; i < n; ++i)
|
|
@@ -461,6 +459,10 @@ namespace MainWidget
|
|
|
IR::IRComponentDialog dlg ;
|
|
|
dlg.exec();
|
|
|
}
|
|
|
+ case modelTemp:
|
|
|
+ {
|
|
|
+ emit importModel();
|
|
|
+ }
|
|
|
// case IRcalc:
|
|
|
// {
|
|
|
// IR::IRCalcDialog dlg ;
|