|
|
@ -4,210 +4,189 @@
|
|
|
|
#include <GUIFrame/PropertyWidget.h>
|
|
|
|
#include <GUIFrame/PropertyWidget.h>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include <FITK_Kernel/FITKCore/FITKOperatorRepo.h>
|
|
|
|
|
|
|
|
#include <FITK_Kernel/FITKCore/FITKActionOperator.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace GUI{
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
|
|
|
CFDTreeWidget::CFDTreeWidget(QWidget* parent, PropertyWidget* m_PropertyWidget):
|
|
|
|
CFDTreeWidget::CFDTreeWidget(QWidget* parent, PropertyWidget* m_PropertyWidget):
|
|
|
|
TreeWidget(parent)
|
|
|
|
TreeWidget(parent) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this->m_PropertyWidget = m_PropertyWidget;
|
|
|
|
this->m_PropertyWidget = m_PropertyWidget;
|
|
|
|
|
|
|
|
|
|
|
|
//右键 不可少否则右键无反应
|
|
|
|
//右键 不可少否则右键无反应
|
|
|
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
|
connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(onItemClicked(QTreeWidgetItem*, int)));
|
|
|
|
connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(onItemClicked(QTreeWidgetItem*, int)));
|
|
|
|
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onModelCustomContextMenu(QPoint)));
|
|
|
|
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onModelCustomContextMenu(QPoint)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::updateTree(QString s){
|
|
|
|
void CFDTreeWidget::updateTree(QString s) {
|
|
|
|
this->clear();
|
|
|
|
this->clear();
|
|
|
|
|
|
|
|
|
|
|
|
if(s == "SolutionAnalysis")
|
|
|
|
if (s == "SolutionAnalysis") {
|
|
|
|
addTreeSolutionAnalysis();
|
|
|
|
addTreeSolutionAnalysis();
|
|
|
|
else if(s == "Postprocessing")
|
|
|
|
|
|
|
|
|
|
|
|
} else if (s == "Postprocessing") {
|
|
|
|
addTreePostprocessing();
|
|
|
|
addTreePostprocessing();
|
|
|
|
else if(s == "Preprocessing")
|
|
|
|
|
|
|
|
|
|
|
|
} else if (s == "Preprocessing") {
|
|
|
|
addTreePreprocessing();
|
|
|
|
addTreePreprocessing();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setItemsExpandable(true);
|
|
|
|
setItemsExpandable(true);
|
|
|
|
expandAll();
|
|
|
|
expandAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::addTreePreprocessing(){
|
|
|
|
void CFDTreeWidget::addTreePreprocessing() {
|
|
|
|
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
|
|
|
|
GeometryAndMeshingItem->setText(0,tr("Preprocessing"));
|
|
|
|
GeometryAndMeshingItem->setText(0, tr("Preprocessing"));
|
|
|
|
GeometryAndMeshingItem->setData(1,0,-1);
|
|
|
|
GeometryAndMeshingItem->setData(1, 0, -1);
|
|
|
|
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
|
|
|
|
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
|
|
|
|
this->addTopLevelItem(GeometryAndMeshingItem);
|
|
|
|
this->addTopLevelItem(GeometryAndMeshingItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::addTreeSolutionAnalysis()
|
|
|
|
void CFDTreeWidget::addTreeSolutionAnalysis() {
|
|
|
|
{
|
|
|
|
|
|
|
|
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
|
|
|
|
GeometryAndMeshingItem->setText(0,tr("Geometry and Meshing"));
|
|
|
|
GeometryAndMeshingItem->setText(0, tr("Geometry and Meshing"));
|
|
|
|
GeometryAndMeshingItem->setData(1,0,-1);
|
|
|
|
GeometryAndMeshingItem->setData(1, 0, -1);
|
|
|
|
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
|
|
|
|
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
|
|
|
|
this->addTopLevelItem(GeometryAndMeshingItem);
|
|
|
|
this->addTopLevelItem(GeometryAndMeshingItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* mesh = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* mesh = new QTreeWidgetItem();
|
|
|
|
mesh->setText(0,tr("Mesh001"));
|
|
|
|
mesh->setText(0, tr("Mesh001"));
|
|
|
|
mesh->setData(1,0,-1);
|
|
|
|
mesh->setData(1, 0, -1);
|
|
|
|
GeometryAndMeshingItem->addChild(mesh);
|
|
|
|
GeometryAndMeshingItem->addChild(mesh);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ComputationalSetupItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ComputationalSetupItem = new QTreeWidgetItem();
|
|
|
|
ComputationalSetupItem->setText(0,tr("Computational Setup"));
|
|
|
|
ComputationalSetupItem->setText(0, tr("Computational Setup"));
|
|
|
|
ComputationalSetupItem->setData(1,0,-1);
|
|
|
|
ComputationalSetupItem->setData(1, 0, -1);
|
|
|
|
this->addTopLevelItem(ComputationalSetupItem);
|
|
|
|
this->addTopLevelItem(ComputationalSetupItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* TimeModeItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* TimeModeItem = new QTreeWidgetItem();
|
|
|
|
TimeModeItem->setText(0,tr("Time Mode"));
|
|
|
|
TimeModeItem->setText(0, tr("actionCFDTimeMode"));
|
|
|
|
TimeModeItem->setData(1,0,-1);
|
|
|
|
TimeModeItem->setData(1, 0, -1);
|
|
|
|
ComputationalSetupItem->addChild(TimeModeItem);
|
|
|
|
ComputationalSetupItem->addChild(TimeModeItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ComputationalDomainItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ComputationalDomainItem = new QTreeWidgetItem();
|
|
|
|
ComputationalDomainItem->setText(0,tr("Computational Domain"));
|
|
|
|
ComputationalDomainItem->setText(0, tr("Computational Domain"));
|
|
|
|
ComputationalDomainItem->setData(1,0,-1);
|
|
|
|
ComputationalDomainItem->setData(1, 0, -1);
|
|
|
|
ComputationalSetupItem->addChild(ComputationalDomainItem);
|
|
|
|
ComputationalSetupItem->addChild(ComputationalDomainItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* SolverItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* SolverItem = new QTreeWidgetItem();
|
|
|
|
SolverItem->setText(0,tr("Solver"));
|
|
|
|
SolverItem->setText(0, tr("Solver"));
|
|
|
|
SolverItem->setData(1,0,-1);
|
|
|
|
SolverItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(SolverItem);
|
|
|
|
ComputationalDomainItem->addChild(SolverItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* BasicModelItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* BasicModelItem = new QTreeWidgetItem();
|
|
|
|
BasicModelItem->setText(0,tr("Basic Model"));
|
|
|
|
BasicModelItem->setText(0, tr("Basic Model"));
|
|
|
|
BasicModelItem->setData(1,0,-1);
|
|
|
|
BasicModelItem->setData(1, 0, -1);
|
|
|
|
SolverItem->addChild(BasicModelItem);
|
|
|
|
SolverItem->addChild(BasicModelItem);
|
|
|
|
QTreeWidgetItem* ViscosityModelItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ViscosityModelItem = new QTreeWidgetItem();
|
|
|
|
ViscosityModelItem->setText(0,tr("Viscosity Model"));
|
|
|
|
ViscosityModelItem->setText(0, tr("Viscosity Model"));
|
|
|
|
ViscosityModelItem->setData(1,0,-1);
|
|
|
|
ViscosityModelItem->setData(1, 0, -1);
|
|
|
|
SolverItem->addChild(ViscosityModelItem);
|
|
|
|
SolverItem->addChild(ViscosityModelItem);
|
|
|
|
QTreeWidgetItem* NumericalMethodsItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* NumericalMethodsItem = new QTreeWidgetItem();
|
|
|
|
NumericalMethodsItem->setText(0,tr("Numerical Methods"));
|
|
|
|
NumericalMethodsItem->setText(0, tr("Numerical Methods"));
|
|
|
|
NumericalMethodsItem->setData(1,0,-1);
|
|
|
|
NumericalMethodsItem->setData(1, 0, -1);
|
|
|
|
SolverItem->addChild(NumericalMethodsItem);
|
|
|
|
SolverItem->addChild(NumericalMethodsItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* MotionPropertiesItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* MotionPropertiesItem = new QTreeWidgetItem();
|
|
|
|
MotionPropertiesItem->setText(0,tr("Motion Properties"));
|
|
|
|
MotionPropertiesItem->setText(0, tr("Motion Properties"));
|
|
|
|
MotionPropertiesItem->setData(1,0,-1);
|
|
|
|
MotionPropertiesItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(MotionPropertiesItem);
|
|
|
|
ComputationalDomainItem->addChild(MotionPropertiesItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* motion1Item = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* motion1Item = new QTreeWidgetItem();
|
|
|
|
motion1Item->setText(0,tr("motion-1"));
|
|
|
|
motion1Item->setText(0, tr("motion-1"));
|
|
|
|
motion1Item->setData(1,0,-1);
|
|
|
|
motion1Item->setData(1, 0, -1);
|
|
|
|
MotionPropertiesItem->addChild(motion1Item);
|
|
|
|
MotionPropertiesItem->addChild(motion1Item);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* BoundaryConditionsItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* BoundaryConditionsItem = new QTreeWidgetItem();
|
|
|
|
BoundaryConditionsItem->setText(0,tr("Boundary Conditions"));
|
|
|
|
BoundaryConditionsItem->setText(0, tr("Boundary Conditions"));
|
|
|
|
BoundaryConditionsItem->setData(1,0,-1);
|
|
|
|
BoundaryConditionsItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(BoundaryConditionsItem);
|
|
|
|
ComputationalDomainItem->addChild(BoundaryConditionsItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* pressureinletItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* pressureinletItem = new QTreeWidgetItem();
|
|
|
|
pressureinletItem->setText(0,tr("pressure-inlet"));
|
|
|
|
pressureinletItem->setText(0, tr("pressure-inlet"));
|
|
|
|
pressureinletItem->setData(1,0,-1);
|
|
|
|
pressureinletItem->setData(1, 0, -1);
|
|
|
|
BoundaryConditionsItem->addChild(pressureinletItem);
|
|
|
|
BoundaryConditionsItem->addChild(pressureinletItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* InitializationItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* InitializationItem = new QTreeWidgetItem();
|
|
|
|
InitializationItem->setText(0,tr("Initialization"));
|
|
|
|
InitializationItem->setText(0, tr("Initialization"));
|
|
|
|
InitializationItem->setData(1,0,-1);
|
|
|
|
InitializationItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(InitializationItem);
|
|
|
|
ComputationalDomainItem->addChild(InitializationItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ComputationalControlItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ComputationalControlItem = new QTreeWidgetItem();
|
|
|
|
ComputationalControlItem->setText(0,tr("Computational Control"));
|
|
|
|
ComputationalControlItem->setText(0, tr("Computational Control"));
|
|
|
|
ComputationalControlItem->setData(1,0,-1);
|
|
|
|
ComputationalControlItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(ComputationalControlItem);
|
|
|
|
ComputationalDomainItem->addChild(ComputationalControlItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ReferenceQuantityItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ReferenceQuantityItem = new QTreeWidgetItem();
|
|
|
|
ReferenceQuantityItem->setText(0,tr("reference quantity"));
|
|
|
|
ReferenceQuantityItem->setText(0, tr("reference quantity"));
|
|
|
|
ReferenceQuantityItem->setData(1,0,-1);
|
|
|
|
ReferenceQuantityItem->setData(1, 0, -1);
|
|
|
|
ComputationalControlItem->addChild(ReferenceQuantityItem);
|
|
|
|
ComputationalControlItem->addChild(ReferenceQuantityItem);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* MonitorsItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* MonitorsItem = new QTreeWidgetItem();
|
|
|
|
MonitorsItem->setText(0,tr("Monitors"));
|
|
|
|
MonitorsItem->setText(0, tr("Monitors"));
|
|
|
|
MonitorsItem->setData(1,0,-1);
|
|
|
|
MonitorsItem->setData(1, 0, -1);
|
|
|
|
ComputationalDomainItem->addChild(MonitorsItem);
|
|
|
|
ComputationalDomainItem->addChild(MonitorsItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ResidualItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ResidualItem = new QTreeWidgetItem();
|
|
|
|
ResidualItem->setText(0,tr("Residual"));
|
|
|
|
ResidualItem->setText(0, tr("Residual"));
|
|
|
|
ResidualItem->setData(1,0,-1);
|
|
|
|
ResidualItem->setData(1, 0, -1);
|
|
|
|
MonitorsItem->addChild(ResidualItem);
|
|
|
|
MonitorsItem->addChild(ResidualItem);
|
|
|
|
QTreeWidgetItem* AerodynamicForceItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* AerodynamicForceItem = new QTreeWidgetItem();
|
|
|
|
AerodynamicForceItem->setText(0,tr("Aerodynamic Force"));
|
|
|
|
AerodynamicForceItem->setText(0, tr("Aerodynamic Force"));
|
|
|
|
AerodynamicForceItem->setData(1,0,-1);
|
|
|
|
AerodynamicForceItem->setData(1, 0, -1);
|
|
|
|
MonitorsItem->addChild(AerodynamicForceItem);
|
|
|
|
MonitorsItem->addChild(AerodynamicForceItem);
|
|
|
|
QTreeWidgetItem* TurbomachineryPerformanceItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* TurbomachineryPerformanceItem = new QTreeWidgetItem();
|
|
|
|
TurbomachineryPerformanceItem->setText(0,tr("Turbomachinery Performance"));
|
|
|
|
TurbomachineryPerformanceItem->setText(0, tr("Turbomachinery Performance"));
|
|
|
|
TurbomachineryPerformanceItem->setData(1,0,-1);
|
|
|
|
TurbomachineryPerformanceItem->setData(1, 0, -1);
|
|
|
|
MonitorsItem->addChild(TurbomachineryPerformanceItem);
|
|
|
|
MonitorsItem->addChild(TurbomachineryPerformanceItem);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::addTreePostprocessing()
|
|
|
|
void CFDTreeWidget::addTreePostprocessing() {
|
|
|
|
{
|
|
|
|
|
|
|
|
// _treePostprocessing = new TreeWidget(this);
|
|
|
|
// _treePostprocessing = new TreeWidget(this);
|
|
|
|
// tabWidget->addTab(_treePostprocessing,tr("Postprocessing"));
|
|
|
|
// tabWidget->addTab(_treePostprocessing,tr("Postprocessing"));
|
|
|
|
// qDebug()<<"!!!";
|
|
|
|
// qDebug()<<"!!!";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* PostProcessingItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* PostProcessingItem = new QTreeWidgetItem();
|
|
|
|
PostProcessingItem->setText(0,tr("Post-processing"));
|
|
|
|
PostProcessingItem->setText(0, tr("Post-processing"));
|
|
|
|
PostProcessingItem->setData(1,0,-1);
|
|
|
|
PostProcessingItem->setData(1, 0, -1);
|
|
|
|
this->addTopLevelItem(PostProcessingItem);
|
|
|
|
this->addTopLevelItem(PostProcessingItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* MeshItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* MeshItem = new QTreeWidgetItem();
|
|
|
|
MeshItem->setText(0,tr("Mesh"));
|
|
|
|
MeshItem->setText(0, tr("Mesh"));
|
|
|
|
MeshItem->setData(1,0,-1);
|
|
|
|
MeshItem->setData(1, 0, -1);
|
|
|
|
PostProcessingItem->addChild(MeshItem);
|
|
|
|
PostProcessingItem->addChild(MeshItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* Mesh1Item = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* Mesh1Item = new QTreeWidgetItem();
|
|
|
|
Mesh1Item->setText(0,tr("Mesh 1"));
|
|
|
|
Mesh1Item->setText(0, tr("Mesh 1"));
|
|
|
|
Mesh1Item->setData(1,0,-1);
|
|
|
|
Mesh1Item->setData(1, 0, -1);
|
|
|
|
MeshItem->addChild(Mesh1Item);
|
|
|
|
MeshItem->addChild(Mesh1Item);
|
|
|
|
QTreeWidgetItem* Interface1Item = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* Interface1Item = new QTreeWidgetItem();
|
|
|
|
Interface1Item->setText(0,tr("Interface 1"));
|
|
|
|
Interface1Item->setText(0, tr("Interface 1"));
|
|
|
|
Interface1Item->setData(1,0,-1);
|
|
|
|
Interface1Item->setData(1, 0, -1);
|
|
|
|
MeshItem->addChild(Interface1Item);
|
|
|
|
MeshItem->addChild(Interface1Item);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* CuttingPlaneItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* CuttingPlaneItem = new QTreeWidgetItem();
|
|
|
|
CuttingPlaneItem->setText(0,tr("Cutting Plane"));
|
|
|
|
CuttingPlaneItem->setText(0, tr("Cutting Plane"));
|
|
|
|
CuttingPlaneItem->setData(1,0,-1);
|
|
|
|
CuttingPlaneItem->setData(1, 0, -1);
|
|
|
|
PostProcessingItem->addChild(CuttingPlaneItem);
|
|
|
|
PostProcessingItem->addChild(CuttingPlaneItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* IsosurfaceItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* IsosurfaceItem = new QTreeWidgetItem();
|
|
|
|
IsosurfaceItem->setText(0,tr("Isosurface"));
|
|
|
|
IsosurfaceItem->setText(0, tr("Isosurface"));
|
|
|
|
IsosurfaceItem->setData(1,0,-1);
|
|
|
|
IsosurfaceItem->setData(1, 0, -1);
|
|
|
|
PostProcessingItem->addChild(IsosurfaceItem);
|
|
|
|
PostProcessingItem->addChild(IsosurfaceItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* StreamlineItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* StreamlineItem = new QTreeWidgetItem();
|
|
|
|
StreamlineItem->setText(0,tr("Streamline"));
|
|
|
|
StreamlineItem->setText(0, tr("Streamline"));
|
|
|
|
StreamlineItem->setData(1,0,-1);
|
|
|
|
StreamlineItem->setData(1, 0, -1);
|
|
|
|
PostProcessingItem->addChild(StreamlineItem);
|
|
|
|
PostProcessingItem->addChild(StreamlineItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* DataStatisticsItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* DataStatisticsItem = new QTreeWidgetItem();
|
|
|
|
DataStatisticsItem->setText(0,tr("Data Statistics"));
|
|
|
|
DataStatisticsItem->setText(0, tr("Data Statistics"));
|
|
|
|
DataStatisticsItem->setData(1,0,-1);
|
|
|
|
DataStatisticsItem->setData(1, 0, -1);
|
|
|
|
PostProcessingItem->addChild(DataStatisticsItem);
|
|
|
|
PostProcessingItem->addChild(DataStatisticsItem);
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem* ForceAndMomentItem = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* ForceAndMomentItem = new QTreeWidgetItem();
|
|
|
|
ForceAndMomentItem->setText(0,tr("Force and Moment"));
|
|
|
|
ForceAndMomentItem->setText(0, tr("Force and Moment"));
|
|
|
|
ForceAndMomentItem->setData(1,0,-1);
|
|
|
|
ForceAndMomentItem->setData(1, 0, -1);
|
|
|
|
DataStatisticsItem->addChild(ForceAndMomentItem);
|
|
|
|
DataStatisticsItem->addChild(ForceAndMomentItem);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::onItemClicked(QTreeWidgetItem* item, int column) {
|
|
|
|
|
|
|
|
qDebug() << item->text(0);
|
|
|
|
|
|
|
|
int objID = item->data(1, 0).toInt();
|
|
|
|
|
|
|
|
QString name = item->text(0);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!name.isEmpty()) {
|
|
|
|
|
|
|
|
QObject sender;
|
|
|
|
|
|
|
|
sender.setObjectName(name);
|
|
|
|
|
|
|
|
auto acOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<Core::FITKActionOperator>(name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (acOper == nullptr) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFDTreeWidget::onItemClicked(QTreeWidgetItem *item, int column)
|
|
|
|
acOper->setEmitter(&sender);
|
|
|
|
{
|
|
|
|
acOper->setArgs("objID", objID);
|
|
|
|
qDebug()<<item->text(0);
|
|
|
|
acOper->actionTriggered();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|