1、属性界面部分 timemode

feature/struct-menu-20241023
mzh 3 weeks ago
parent 4911079fc0
commit c260581c9d

@ -0,0 +1,100 @@
#include "CFDOperatorsBasicModelManager.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
#include "CFDStruct/CUIProperty/CUI.h"
#include "CUIProperty/CUIConfig.h"
#include <QLabel>
#include <QDebug>
namespace ModelOper
{
CFDOperatorsBasicModelManager::CFDOperatorsBasicModelManager()
{
qDebug()<<"build Time Mode Manager";
}
CFDOperatorsBasicModelManager::~CFDOperatorsBasicModelManager()
{
}
bool CFDOperatorsBasicModelManager::execGUI()
{
QWidget* widget = nullptr;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
if (mainWindow == nullptr)return false;
GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget();
if (propertyWidget == nullptr)return false;
// switch (_operType){
// case ModelOper::OperManagerBase::Edit:
// {
// widget = new GUI::BasicModelWidget(this);
// break;
// }
// }
qDebug()<<"Time Mode Manager11111111111";
widget = new QLabel("Time Mode Manager11111");
CUI* cui = new CUI(new CUIConfig({
{"type","Widget"}
},{
new CUIConfig({
{"type","LineEidt"},
{"name","Solver type"}
}),
new CUIConfig({
{"type","ComboBox"},
{"name","flow model"}
},{}),
new CUIConfig({
{"type","PushButton"},
{"name","flow model"}
}),
new CUIConfig({
{"type","GroupBox"},
{"name","Fluid properties"}
},{
new CUIConfig({
{"type","LineEdit"},
{"name","Gas composition"}
}),
new CUIConfig({
{"type","LineEdit"},
{"name","Gas constant (R)"}
}),
new CUIConfig({
{"type","LineEdit"},
{"name","Heat ratio"}
}),
new CUIConfig({
{"type","LineEdit"},
{"name","Laminar Prandtl number"}
}),
new CUIConfig({
{"type","LineEdit"},
{"name","Turbulent Prandtl number"}
}),
})
}));
widget = cui->getUI();
// if (mainWindow->getPropertyWidget() && widget) {
propertyWidget->setWidget(widget);
// }
return false;
}
bool CFDOperatorsBasicModelManager::execProfession()
{
return true;
}
}

@ -0,0 +1,41 @@
#ifndef _CFDOperatorsBasicModelManager_H
#define _CFDOperatorsBasicModelManager_H
//#include "OperManagerBase.h"
#include "CFDOperatorsModelAPI.h"
#include "OperatorsModel/OperManagerBase.h"
namespace ModelOper
{
class CFDOperatorsBasicModelManager :public OperManagerBase
{
Q_OBJECT;
public:
/**
* @brief Construct a new Operators Mesh Base Manager object
*/
CFDOperatorsBasicModelManager();
/**
* @brief Destroy the Operators Mesh Base Manager object
*/
~CFDOperatorsBasicModelManager();
/**
* @brief
* @return true
* @return false
*/
virtual bool execGUI();
/**
* @brief
* @return true
* @return false
*/
virtual bool execProfession();
};
// 按钮注册相关操作
Register2FITKOPeratorRepo(actionBasicModelEdit, CFDOperatorsBasicModelManager);
}
#endif

@ -0,0 +1,9 @@
HEADERS += \
$$PWD/CFDOperatorsModelAPI.h \
$$PWD/CFDOperatorsBasicModelManager.h \
$$PWD/CFDOperatorsTimeModeManager.h \
SOURCES += \
$$PWD/CFDOperatorsTimeModeManager.cpp \
$$PWD/CFDOperatorsBasicModelManager.cpp \

@ -0,0 +1,106 @@
TEMPLATE = lib
CONFIG += c++11
CONFIG += qt
CONFIG += staticlib
TARGET = CFDOperatorsModel
QT += core widgets gui
DEFINES += CFDOperatorsModel_API
unix:!mac{ QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/\'" }
include(./CFDOperatorsModel.pri)
win32{
INCLUDEPATH += ./ \
../ \
../../ \
Release:DESTDIR = ../../output/bin
Release:MOC_DIR = ../../generate/CFDOperatorsModel/release/moc
Release:RCC_DIR = ../../generate/CFDOperatorsModel/release/rcc
Release:UI_DIR = ../../generate/CFDOperatorsModel/release/qui
Release:OBJECTS_DIR = ../../generate/CFDOperatorsModel/release/obj
Release:LIBS += \
-L../../output/bin \
-lFITKAppFramework \
-lFITKCore \
-lFITKOFDictWriter \
-lGUIFrame \
-lGUIWidget \
-lOperatorsInterface \
-lGUIGeometryDialog \
-lGUIMeshDialog \
-lGUICalculateDialog \
-lFITKOFDriver \
-lFITKInterfaceIO \
-lFITKInterfaceMesh \
-lFITKOFMeshIO \
-lFITKInterfaceMeshGen \
-lFITKGeoCompOCC \
-lFITKInterfaceModel \
-lFITKInterfaceGeometry \
-lFITKWidget \
-lFITKInterfaceFlowOF \
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
Debug:CONFIG += console
Debug:DESTDIR = ../../output/bin_d
Debug:MOC_DIR = ../../generate/CFDOperatorsModel/debug/moc
Debug:RCC_DIR = ../../generate/CFDOperatorsModel/debug/rcc
Debug:UI_DIR = ../../generate/CFDOperatorsModel/debug/qui
Debug:OBJECTS_DIR = ../../generate/CFDOperatorsModel/debug/obj
Debug:LIBS += \
-L../../output/bin_d \
-lFITKAppFramework \
-lFITKCore \
-lFITKOFDictWriter \
-lGUIFrame \
-lGUIWidget \
-lOperatorsInterface \
-lGUIGeometryDialog \
-lGUIMeshDialog \
-lGUICalculateDialog \
-lFITKOFDriver \
-lFITKInterfaceIO \
-lFITKInterfaceMesh \
-lFITKOFMeshIO \
-lFITKInterfaceMeshGen \
-lFITKGeoCompOCC \
-lFITKInterfaceModel \
-lFITKInterfaceGeometry \
-lFITKWidget \
-lFITKInterfaceFlowOF \
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
-lCFDStructDataManager \
message("Windows CFDOperatorsModel generated")
}
unix{
INCLUDEPATH += ./ \
../ \
../../ \
CONFIG += console
CONFIG += plugin
DESTDIR = ../../output/bin
MOC_DIR = ../../generate/CFDOperatorsModel/release/moc
UI_DIR = ../../generate/CFDOperatorsModel/release/qui
RCC_DIR = ../../generate/CFDOperatorsModel/release/rcc
OBJECTS_DIR = ../../generate/CFDOperatorsModel/release/obj
LIBS += \
-L../../output/bin \
message("Linux CFDOperatorsModel generated")
}

@ -0,0 +1,14 @@
#ifndef CFDOperatorsModelAPI_H
#define CFDOperatorsModelAPI_H
#include <QtCore/QtGlobal>
#include <QDebug>
#if defined(CFDOperatorsModel_API)
#define CFDOperatorsModelAPI Q_DECL_EXPORT
#else
#define CFDOperatorsModelAPI Q_DECL_IMPORT
#endif
#endif // CFDOperatorsModelAPI_H

@ -0,0 +1,79 @@
#include "CFDOperatorsTimeModeManager.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
#include "CFDStruct/CUIProperty/CUI.h"
#include "CUIProperty/CUIConfig.h"
#include <QLabel>
#include <QDebug>
namespace ModelOper
{
CFDOperatorsTimeModeManager::CFDOperatorsTimeModeManager()
{
qDebug()<<"build Time Mode Manager";
}
CFDOperatorsTimeModeManager::~CFDOperatorsTimeModeManager()
{
}
bool CFDOperatorsTimeModeManager::execGUI()
{
QWidget* widget = nullptr;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
if (mainWindow == nullptr)return false;
GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget();
if (propertyWidget == nullptr)return false;
// switch (_operType){
// case ModelOper::OperManagerBase::Edit:
// {
// widget = new GUI::TimeModeWidget(this);
// break;
// }
// }
qDebug()<<"Time Mode Manager11111111111";
widget = new QLabel("Time Mode Manager11111");
CUI* cui = new CUI(new CUIConfig({
{"type","Widget"}
},{
new CUIConfig({
{"type","ComboBox"},
{"name","Time Mode"}
},{
new CUIConfig({
{"type","Item"},
{"name","steady"}
}),
new CUIConfig({
{"type","Item"},
{"name","unsteady"}
})
}),
new CUIConfig({
{"type","LineEdit"},
{"name","iteration count"}
},{})
}));
widget = cui->getUI();
// if (mainWindow->getPropertyWidget() && widget) {
propertyWidget->setWidget(widget);
// }
return false;
}
bool CFDOperatorsTimeModeManager::execProfession()
{
return true;
}
}

@ -0,0 +1,41 @@
#ifndef _CFDOperatorsTimeModeManager_H
#define _CFDOperatorsTimeModeManager_H
//#include "OperManagerBase.h"
#include "OperatorsModel/OperManagerBase.h"
#include "CFDStructDataManager/CFDStructDataManager.h"
namespace ModelOper
{
class CFDOperatorsTimeModeManager :public OperManagerBase
{
Q_OBJECT;
public:
/**
* @brief Construct a new Operators Mesh Base Manager object
*/
CFDOperatorsTimeModeManager();
/**
* @brief Destroy the Operators Mesh Base Manager object
*/
~CFDOperatorsTimeModeManager();
/**
* @brief
* @return true
* @return false
*/
virtual bool execGUI();
/**
* @brief
* @return true
* @return false
*/
virtual bool execProfession();
};
// 按钮注册相关操作
Register2FITKOPeratorRepo(actionTimeModeEdit, CFDOperatorsTimeModeManager);
}
#endif

@ -3,3 +3,5 @@ TEMPLATE = subdirs
SUBDIRS += \
$$PWD/CFDStructGUI \
$$PWD/CUIProperty \
$$PWD/CFDOperatorsModel \ \
CFDStructDataManager

@ -1,6 +1,7 @@
QT -= gui
TEMPLATE = lib
TARGET = CFDStructDataManager
DEFINES += CFDSTRUCTDATAMANAGER_LIBRARY
CONFIG += c++11

@ -11,6 +11,10 @@ namespace GUI{
this->m_PropertyWidget = prowidget;
// this->setWidget(_treeWidget);
if(this->m_PropertyWidget == NULL)
qDebug()<<"?????";
init();
}
@ -52,7 +56,4 @@ namespace GUI{
_treePostprocessing->updateTree("Postprocessing");
}
}

@ -0,0 +1,2 @@
#include "CFDPropertyWidget.h"

@ -0,0 +1,30 @@
#ifndef CFDPropertyWidget_h
#define CFDPropertyWidget_h
#include <QtCore/QtGlobal>
#include <QDebug>
//#include <GUIFrame/MainTreeWidget.h>
#include <CFDStructGUIAPI.h>
namespace GUI{
class PropertyWidget;
class QTreeWidgetItem;
class CFDStructGUIAPI CFDPropertyWidget : public QObject{
Q_OBJECT
// public:
// CFDPropertyWidget(PropertyWidget* m_PropertyWidget);
// public slots:
// void changePropertyWidget(QTreeWidgetItem *item, int column);
// private:
// PropertyWidget* m_PropertyWidget;
};
}
#endif

@ -3,8 +3,10 @@ HEADERS += \
$$PWD/CFDStructMainWindow.h \
$$PWD/CFDMainTreeWidget.h \
$$PWD/CFDTreeWidget.h \
$$PWD/CFDPropertyWidget.h \
SOURCES += \
$$PWD/CFDStructMainWindow.cpp \
$$PWD/CFDMainTreeWidget.cpp \
$$PWD/CFDTreeWidget.cpp \
$$PWD/CFDPropertyWidget.cpp

@ -5,9 +5,6 @@ TARGET = CFDStructGUI
QT += core widgets gui
DEFINES += CFDStructGUI_API
SUBDIRS += \
$$PWD/CFDStructGUI \
INCLUDEPATH += \
./ \
../ \
@ -34,6 +31,20 @@ win32{
-lGUIFrame \
-lCUIProperty \
-lGUIWidget \
-lFITKAppFramework \
-lFITKPython \
-lFITKCore \
-lOperatorsInterface \
-lFITKFluidVTKGraphAdaptor \
-lFITKVTKAlgorithm \
-lFITKInterfaceGeometry \
-lFITKInterfaceFlowOF \
-lFITKInterfaceModel \
-lFITKGeoCompOCC \
-lFITKInterfaceMeshGen \
-lFITKInterfaceMesh \
-lCFDOperatorsModel \
-lOperatorsModel \
Debug:CONFIG += console
@ -47,6 +58,20 @@ win32{
-lGUIFrame \
-lCUIProperty \
-lGUIWidget \
-lFITKAppFramework \
-lFITKPython \
-lFITKCore \
-lOperatorsInterface \
-lFITKFluidVTKGraphAdaptor \
-lFITKVTKAlgorithm \
-lFITKInterfaceGeometry \
-lFITKInterfaceFlowOF \
-lFITKInterfaceModel \
-lFITKGeoCompOCC \
-lFITKInterfaceMeshGen \
-lFITKInterfaceMesh \
-lCFDOperatorsModel \
-lOperatorsModel \
Debug:LIBS += -L$$PWD/../../Tools/Win64/SARibbon/libd/ \
-lSARibbonBard \

@ -55,12 +55,13 @@ void CFDStructMainWindow::initCentralWidget()
int mainWindSize = QMainWindow::width();
// _treeWidget = new MainTreeWidget(this);
m_PropertyWidget = new PropertyWidget(this);
m_PropertyWidget->setMinimumWidth(mainWindSize * 0.65);
_treeWidget = new CFDMainTreeWidget(this,m_PropertyWidget);
_treeWidget->setMinimumWidth(mainWindSize * 0.4);
_treeWidget->setMaximumWidth(mainWindSize * 0.4);
m_PropertyWidget = new PropertyWidget(this);
m_PropertyWidget->setMinimumWidth(mainWindSize * 0.65);
m_RenderWidget = new RenderWidget(this);
_tabWidgete = new TabWidget(this);
//m_GroupPropertyWidget = new GroupPropertyWidget(this);

@ -1,5 +1,30 @@
#include "CFDTreeWidget.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
#include "GUIFrame/MainTreeWidget.h"
#include "OperatorsInterface/GraphEventOperator.h"
#include "OperatorsInterface/TreeEventOperator.h"
#include "CFDOperatorsModel/CFDOperatorsTimeModeManager.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"
#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Interface/FITKInterfaceFlowOF/FITKOFGeometryData.h"
#include "FITK_Interface/FITKInterfaceFlowOF/FITKOFEnum.hpp"
#include "FITK_Interface/FITKInterfaceFlowOF/FITKAbstractOFSolver.h"
#include "FITK_Interface/FITKInterfaceFlowOF/FITKOFPhysicsData.h"
#include "FITK_Interface/FITKInterfaceFlowOF/FITKOFBoundary.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractGeoModel.h"
#include "FITK_Interface/FITKInterfaceMeshGen/FITKMeshGenInterface.h"
#include "FITK_Interface/FITKInterfaceMeshGen/FITKAbstractGeometryMeshSizeGenerator.h"
#include "FITK_Interface/FITKInterfaceMeshGen/FITKGeometryMeshSize.h"
#include "FITK_Interface/FITKInterfaceMesh/FITKUnstructuredFluidMeshVTK.h"
#include <QWidget>
#include <GUIFrame/PropertyWidget.h>
#include <QLabel>
@ -14,10 +39,9 @@ namespace GUI{
//右键 不可少否则右键无反应
setContextMenuPolicy(Qt::CustomContextMenu);
disconnect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)), nullptr, nullptr);
connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(onItemClicked(QTreeWidgetItem*, int)));
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onModelCustomContextMenu(QPoint)));
}
void CFDTreeWidget::updateTree(QString s){
@ -38,7 +62,7 @@ namespace GUI{
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
GeometryAndMeshingItem->setText(0,tr("Preprocessing"));
GeometryAndMeshingItem->setData(1,0,-1);
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::MainTreeEnum::MainTree_Mesh));
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
this->addTopLevelItem(GeometryAndMeshingItem);
}
@ -47,53 +71,62 @@ namespace GUI{
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));
GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
this->addTopLevelItem(GeometryAndMeshingItem);
QTreeWidgetItem* mesh = new QTreeWidgetItem();
mesh->setText(0,tr("Mesh001"));
mesh->setData(1,0,-1);
// mesh->setdata(2,0,QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::))
GeometryAndMeshingItem->addChild(mesh);
QTreeWidgetItem* ComputationalSetupItem = new QTreeWidgetItem();
ComputationalSetupItem->setText(0,tr("Computational Setup"));
ComputationalSetupItem->setData(1,0,-1);
ComputationalSetupItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetup));
this->addTopLevelItem(ComputationalSetupItem);
QTreeWidgetItem* TimeModeItem = new QTreeWidgetItem();
TimeModeItem->setText(0,tr("Time Mode"));
TimeModeItem->setData(1,0,-1);
TimeModeItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode));
ComputationalSetupItem->addChild(TimeModeItem);
QTreeWidgetItem* ComputationalDomainItem = new QTreeWidgetItem();
ComputationalDomainItem->setText(0,tr("Computational Domain"));
ComputationalDomainItem->setData(1,0,-1);
ComputationalDomainItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomain));
ComputationalSetupItem->addChild(ComputationalDomainItem);
QTreeWidgetItem* SolverItem = new QTreeWidgetItem();
SolverItem->setText(0,tr("Solver"));
SolverItem->setData(1,0,-1);
SolverItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolver));
ComputationalDomainItem->addChild(SolverItem);
QTreeWidgetItem* BasicModelItem = new QTreeWidgetItem();
BasicModelItem->setText(0,tr("Basic Model"));
BasicModelItem->setData(1,0,-1);
BasicModelItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel));
SolverItem->addChild(BasicModelItem);
QTreeWidgetItem* ViscosityModelItem = new QTreeWidgetItem();
ViscosityModelItem->setText(0,tr("Viscosity Model"));
ViscosityModelItem->setData(1,0,-1);
ViscosityModelItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverViscosityModel));
SolverItem->addChild(ViscosityModelItem);
QTreeWidgetItem* NumericalMethodsItem = new QTreeWidgetItem();
NumericalMethodsItem->setText(0,tr("Numerical Methods"));
NumericalMethodsItem->setData(1,0,-1);
NumericalMethodsItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverNumericalMethods));
SolverItem->addChild(NumericalMethodsItem);
QTreeWidgetItem* MotionPropertiesItem = new QTreeWidgetItem();
MotionPropertiesItem->setText(0,tr("Motion Properties"));
MotionPropertiesItem->setData(1,0,-1);
MotionPropertiesItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMotionProperties));
ComputationalDomainItem->addChild(MotionPropertiesItem);
QTreeWidgetItem* motion1Item = new QTreeWidgetItem();
@ -104,28 +137,33 @@ namespace GUI{
QTreeWidgetItem* BoundaryConditionsItem = new QTreeWidgetItem();
BoundaryConditionsItem->setText(0,tr("Boundary Conditions"));
BoundaryConditionsItem->setData(1,0,-1);
BoundaryConditionsItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditions));
ComputationalDomainItem->addChild(BoundaryConditionsItem);
QTreeWidgetItem* pressureinletItem = new QTreeWidgetItem();
pressureinletItem->setText(0,tr("pressure-inlet"));
pressureinletItem->setText(0,tr("Pressure-Inlet"));
pressureinletItem->setData(1,0,-1);
pressureinletItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet));
BoundaryConditionsItem->addChild(pressureinletItem);
QTreeWidgetItem* InitializationItem = new QTreeWidgetItem();
InitializationItem->setText(0,tr("Initialization"));
InitializationItem->setData(1,0,-1);
InitializationItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverInitialization));
ComputationalDomainItem->addChild(InitializationItem);
QTreeWidgetItem* ComputationalControlItem = new QTreeWidgetItem();
ComputationalControlItem->setText(0,tr("Computational Control"));
ComputationalControlItem->setData(1,0,-1);
ComputationalControlItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControl));
ComputationalDomainItem->addChild(ComputationalControlItem);
QTreeWidgetItem* ReferenceQuantityItem = new QTreeWidgetItem();
ReferenceQuantityItem->setText(0,tr("reference quantity"));
ReferenceQuantityItem->setText(0,tr("Reference Quantity"));
ReferenceQuantityItem->setData(1,0,-1);
ReferenceQuantityItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControlReferenceQuantity));
ComputationalControlItem->addChild(ReferenceQuantityItem);
@ -133,19 +171,23 @@ namespace GUI{
QTreeWidgetItem* MonitorsItem = new QTreeWidgetItem();
MonitorsItem->setText(0,tr("Monitors"));
MonitorsItem->setData(1,0,-1);
MonitorsItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitors));
ComputationalDomainItem->addChild(MonitorsItem);
QTreeWidgetItem* ResidualItem = new QTreeWidgetItem();
ResidualItem->setText(0,tr("Residual"));
ResidualItem->setData(1,0,-1);
ResidualItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsResidual));
MonitorsItem->addChild(ResidualItem);
QTreeWidgetItem* AerodynamicForceItem = new QTreeWidgetItem();
AerodynamicForceItem->setText(0,tr("Aerodynamic Force"));
AerodynamicForceItem->setData(1,0,-1);
AerodynamicForceItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsAerodynamicForce));
MonitorsItem->addChild(AerodynamicForceItem);
QTreeWidgetItem* TurbomachineryPerformanceItem = new QTreeWidgetItem();
TurbomachineryPerformanceItem->setText(0,tr("Turbomachinery Performance"));
TurbomachineryPerformanceItem->setData(1,0,-1);
TurbomachineryPerformanceItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsTurbomachineryPerformance));
MonitorsItem->addChild(TurbomachineryPerformanceItem);
}
@ -207,7 +249,48 @@ namespace GUI{
void CFDTreeWidget::onItemClicked(QTreeWidgetItem *item, int column)
{
qDebug()<<item->text(0);
EventOper::TreeEventOperator* treeOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<EventOper::TreeEventOperator>("ModelTreeEvent");
if (treeOper == nullptr) return;
EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("GraphPreprocess");
if (graphOper == nullptr)return;
graphOper->clearHighlight();
if (item == nullptr)return;
int objID = item->data(1, 0).toInt();
GUI::SolutionAnalysisTreeEnum treeType = item->data(2, 0).value<GUI::SolutionAnalysisTreeEnum>();
Interface::FITKGeoEnum::FITKGeometryComType geometryType = item->data(3, 0).value<Interface::FITKGeoEnum::FITKGeometryComType>();
QString name = "";
switch (treeType) {
case GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode:name = "actionTimeModeEdit"; break;
case GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel:name = "actionBasicModelEdit"; break;
default:name = "";
}
qDebug()<<name;
if (!name.isEmpty()) {
QObject sender;
sender.setObjectName(name);
auto acOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<Core::FITKActionOperator>(name);
if (acOper == nullptr){
qDebug("acOper is nullptr");
return;
}
acOper->setEmitter(&sender);
acOper->setArgs("objID", objID);
acOper->actionTriggered();
}
else {
treeOper->moveProcessToStep(0);
}
// if(name == "actionTimeModeEdit"){
// ModelOper::CFDOperatorsTimeModeManager* manage = new ModelOper::CFDOperatorsTimeModeManager();
// manage->execGUI();
// }
}

@ -13,6 +13,37 @@ class QTabWidget;
namespace GUI{
class PropertyWidget;
class CFDPropertyWidget;
enum class SolutionAnalysisTreeEnum{
SATree_GeometryandMeshing,
SATree_ComputationalSetup,
SATree_ComputationalSetupTimeMode,
SATree_ComputationalSetupComputationalDomain,
SATree_ComputationalSetupComputationalDomainSolver,
SATree_ComputationalSetupComputationalDomainSolverBasicModel,
SATree_ComputationalSetupComputationalDomainSolverViscosityModel,
SATree_ComputationalSetupComputationalDomainSolverNumericalMethods,
SATree_ComputationalSetupComputationalDomainSolverMotionProperties,
SATree_ComputationalSetupComputationalDomainSolverBoundaryConditions,
SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet,
SATree_ComputationalSetupComputationalDomainSolverInitialization,
SATree_ComputationalSetupComputationalDomainSolverComputationalControl,
SATree_ComputationalSetupComputationalDomainSolverComputationalControlReferenceQuantity,
SATree_ComputationalSetupComputationalDomainSolverMonitors,
SATree_ComputationalSetupComputationalDomainSolverMonitorsResidual,
SATree_ComputationalSetupComputationalDomainSolverMonitorsAerodynamicForce,
SATree_ComputationalSetupComputationalDomainSolverMonitorsTurbomachineryPerformance,
};
class CFDStructGUIAPI CFDTreeWidget : public TreeWidget{
Q_OBJECT
@ -37,9 +68,11 @@ namespace GUI{
private:
PropertyWidget* m_PropertyWidget;
CFDPropertyWidget* m_PropertyOpt;
};
}
Q_DECLARE_METATYPE(GUI::SolutionAnalysisTreeEnum)
#endif

@ -1,7 +1,7 @@
TEMPLATE = lib
CONFIG += c++11
CONFIG += qt
CONFIG += staticlib
#CONFIG += staticlib
TARGET = CUIProperty
QT += core widgets gui
DEFINES += CUIProperty_API

Loading…
Cancel
Save