parent
9bf36406ba
commit
8af4d47713
@ -0,0 +1,111 @@
|
||||
#include "CFDMainTreeWidget.h"
|
||||
|
||||
#include "GUIWidget/TreeWidget.h"
|
||||
|
||||
namespace GUI{
|
||||
|
||||
CFDMainTreeWidget::CFDMainTreeWidget(MainWindow *parent) : MainTreeWidget(parent)
|
||||
{
|
||||
// this->setWidget(_treeWidget);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
void CFDMainTreeWidget::init()
|
||||
{
|
||||
QTabWidget* tabWidget = new QTabWidget;
|
||||
this->setWidget(tabWidget);
|
||||
|
||||
// tabWidget->addTab(_treeWidget,tr("Solution Analysis"));
|
||||
|
||||
addTreePreprocessing(tabWidget);
|
||||
addTreeSolutionAnalysis(tabWidget);
|
||||
addTreePostprocessing(tabWidget);
|
||||
}
|
||||
|
||||
void CFDMainTreeWidget::addTreePreprocessing(QTabWidget *tabWidget)
|
||||
{
|
||||
_treePreprocessing = new TreeWidget(this);
|
||||
tabWidget->addTab(_treePreprocessing,tr("Preprocessing"));
|
||||
|
||||
_treePreprocessing->updateTree();
|
||||
}
|
||||
|
||||
void CFDMainTreeWidget::addTreeSolutionAnalysis(QTabWidget *tabWidget)
|
||||
{
|
||||
_treeSolutionAnalysis = new TreeWidget(this);
|
||||
tabWidget->addTab(_treeSolutionAnalysis,tr("SolutionAnalysis"));
|
||||
|
||||
|
||||
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
|
||||
GeometryAndMeshingItem->setText(0,tr("Geometry and Meshing"));
|
||||
GeometryAndMeshingItem->setData(1,0,-1);
|
||||
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
|
||||
_treeSolutionAnalysis->addTopLevelItem(GeometryAndMeshingItem);
|
||||
|
||||
QTreeWidgetItem* mesh = new QTreeWidgetItem();
|
||||
mesh->setText(0,tr("Mesh001"));
|
||||
mesh->setData(1,0,-1);
|
||||
GeometryAndMeshingItem->addChild(mesh);
|
||||
|
||||
|
||||
QTreeWidgetItem* ComputationalSetupItem = new QTreeWidgetItem();
|
||||
ComputationalSetupItem->setText(0,tr("Computational Setup"));
|
||||
ComputationalSetupItem->setData(1,0,-1);
|
||||
_treeSolutionAnalysis->addTopLevelItem(ComputationalSetupItem);
|
||||
|
||||
QTreeWidgetItem* TimeModeItem = new QTreeWidgetItem();
|
||||
TimeModeItem->setText(0,tr("Time Mode"));
|
||||
TimeModeItem->setData(1,0,-1);
|
||||
ComputationalSetupItem->addChild(TimeModeItem);
|
||||
|
||||
QTreeWidgetItem* ComputationalDomainItem = new QTreeWidgetItem();
|
||||
ComputationalDomainItem->setText(0,tr("Computational Domain"));
|
||||
ComputationalDomainItem->setData(1,0,-1);
|
||||
ComputationalSetupItem->addChild(ComputationalDomainItem);
|
||||
|
||||
|
||||
QTreeWidgetItem* SolverItem = new QTreeWidgetItem();
|
||||
SolverItem->setText(0,tr("Solver"));
|
||||
SolverItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(SolverItem);
|
||||
|
||||
QTreeWidgetItem* MotionPropertiesItem = new QTreeWidgetItem();
|
||||
MotionPropertiesItem->setText(0,tr("Motion Properties"));
|
||||
MotionPropertiesItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(MotionPropertiesItem);
|
||||
|
||||
QTreeWidgetItem* BoundaryConditionsItem = new QTreeWidgetItem();
|
||||
BoundaryConditionsItem->setText(0,tr("Boundary Conditions"));
|
||||
BoundaryConditionsItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(BoundaryConditionsItem);
|
||||
|
||||
QTreeWidgetItem* InitializationItem = new QTreeWidgetItem();
|
||||
InitializationItem->setText(0,tr("Initialization"));
|
||||
InitializationItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(InitializationItem);
|
||||
|
||||
QTreeWidgetItem* ComputationalControlItem = new QTreeWidgetItem();
|
||||
ComputationalControlItem->setText(0,tr("Computational Control"));
|
||||
ComputationalControlItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(ComputationalControlItem);
|
||||
|
||||
QTreeWidgetItem* MonitorsItem = new QTreeWidgetItem();
|
||||
MonitorsItem->setText(0,tr("Monitors"));
|
||||
MonitorsItem->setData(1,0,-1);
|
||||
ComputationalDomainItem->addChild(MonitorsItem);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CFDMainTreeWidget::addTreePostprocessing(QTabWidget *tabWidget)
|
||||
{
|
||||
_treePostprocessing = new TreeWidget(this);
|
||||
tabWidget->addTab(_treePostprocessing,tr("Postprocessing"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
#ifndef CFDMainTreeWidget_h
|
||||
#define CFDMainTreeWidget_h
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
#include <QDebug>
|
||||
#include <GUIFrame/MainTreeWidget.h>
|
||||
#include <CFDStructGUIAPI.h>
|
||||
|
||||
class MainWindow;
|
||||
class QTabWidget;
|
||||
|
||||
namespace GUI{
|
||||
|
||||
class CFDStructGUIAPI CFDMainTreeWidget : public MainTreeWidget{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CFDMainTreeWidget(MainWindow* parent);
|
||||
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
void addTreePreprocessing(QTabWidget* tabWidget);
|
||||
|
||||
void addTreeSolutionAnalysis(QTabWidget* tabWidget);
|
||||
|
||||
void addTreePostprocessing(QTabWidget* tabWidget);
|
||||
|
||||
|
||||
TreeWidget* _treePreprocessing;
|
||||
TreeWidget* _treeSolutionAnalysis;
|
||||
TreeWidget* _treePostprocessing;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -1,6 +1,9 @@
|
||||
HEADERS += \
|
||||
$$PWD/CFDStructGUIAPI.h \
|
||||
$$PWD/CFDStructMainWindow.h \
|
||||
$$PWD/CFDMainTreeWidget.h \
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/CFDStructMainWindow.cpp \
|
||||
$$PWD/CFDMainTreeWidget.cpp \
|
||||
|
||||
|
Loading…
Reference in New Issue