Merge branch 'feature/struct-menu-20241023' of http://1.92.128.200:3000/YXS/AppFlow into feature/struct-menu-20241023

# Conflicts:
#	CFDStruct/CFDStructGUI/CFDStructGUI.pro
#	CFDStruct/CFDStructGUI/CFDTreeWidget.cpp
feature/struct-menu-20241023
mzh 3 weeks ago
commit 1cf3d9974d

@ -31,20 +31,8 @@ win32{
-lGUIFrame \
-lCUIProperty \
-lGUIWidget \
-lFITKAppFramework \
-lFITKPython \
-lFITKCore \
-lOperatorsInterface \
-lFITKFluidVTKGraphAdaptor \
-lFITKVTKAlgorithm \
-lFITKInterfaceGeometry \
-lFITKInterfaceFlowOF \
-lFITKInterfaceModel \
-lFITKGeoCompOCC \
-lFITKInterfaceMeshGen \
-lFITKInterfaceMesh \
-lCFDOperatorsModel \
-lOperatorsModel \
-lFITKCore \
Debug:CONFIG += console
@ -58,20 +46,8 @@ win32{
-lGUIFrame \
-lCUIProperty \
-lGUIWidget \
-lFITKAppFramework \
-lFITKPython \
-lFITKCore \
-lOperatorsInterface \
-lFITKFluidVTKGraphAdaptor \
-lFITKVTKAlgorithm \
-lFITKInterfaceGeometry \
-lFITKInterfaceFlowOF \
-lFITKInterfaceModel \
-lFITKGeoCompOCC \
-lFITKInterfaceMeshGen \
-lFITKInterfaceMesh \
-lCFDOperatorsModel \
-lOperatorsModel \
-lFITKCore \
Debug:LIBS += -L$$PWD/../../Tools/Win64/SARibbon/libd/ \
-lSARibbonBard \

@ -29,14 +29,14 @@
#include <GUIFrame/PropertyWidget.h>
#include <QLabel>
#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):
TreeWidget(parent)
{
TreeWidget(parent) {
this->m_PropertyWidget = m_PropertyWidget;
//右键 不可少否则右键无反应
setContextMenuPolicy(Qt::CustomContextMenu);
disconnect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)), nullptr, nullptr);
@ -44,69 +44,78 @@ namespace GUI{
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onModelCustomContextMenu(QPoint)));
}
void CFDTreeWidget::updateTree(QString s){
void CFDTreeWidget::updateTree(QString s) {
this->clear();
if(s == "SolutionAnalysis")
if (s == "SolutionAnalysis") {
addTreeSolutionAnalysis();
else if(s == "Postprocessing")
} else if (s == "Postprocessing") {
addTreePostprocessing();
else if(s == "Preprocessing")
} else if (s == "Preprocessing") {
addTreePreprocessing();
}
setItemsExpandable(true);
expandAll();
}
void CFDTreeWidget::addTreePreprocessing(){
void CFDTreeWidget::addTreePreprocessing() {
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
GeometryAndMeshingItem->setText(0,tr("Preprocessing"));
GeometryAndMeshingItem->setData(1,0,-1);
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
this->addTopLevelItem(GeometryAndMeshingItem);
}
void CFDTreeWidget::addTreeSolutionAnalysis()
{
void CFDTreeWidget::addTreeSolutionAnalysis() {
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
GeometryAndMeshingItem->setText(0,tr("Geometry and Meshing"));
GeometryAndMeshingItem->setData(1,0,-1);
GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
this->addTopLevelItem(GeometryAndMeshingItem);
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);
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);
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);
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);
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);
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));
@ -120,60 +129,57 @@ namespace GUI{
NumericalMethodsItem->setText(0,tr("Numerical Methods"));
NumericalMethodsItem->setData(1,0,-1);
NumericalMethodsItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverNumericalMethods));
SolverItem->addChild(NumericalMethodsItem);
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);
ComputationalDomainItem->addChild(MotionPropertiesItem);
QTreeWidgetItem* motion1Item = new QTreeWidgetItem();
motion1Item->setText(0,tr("motion-1"));
motion1Item->setData(1,0,-1);
motion1Item->setText(0, tr("motion-1"));
motion1Item->setData(1, 0, -1);
MotionPropertiesItem->addChild(motion1Item);
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);
ComputationalDomainItem->addChild(BoundaryConditionsItem);
QTreeWidgetItem* pressureinletItem = new QTreeWidgetItem();
pressureinletItem->setText(0,tr("Pressure-Inlet"));
pressureinletItem->setData(1,0,-1);
pressureinletItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet));
BoundaryConditionsItem->addChild(pressureinletItem);
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);
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);
ComputationalDomainItem->addChild(ComputationalControlItem);
QTreeWidgetItem* ReferenceQuantityItem = new QTreeWidgetItem();
ReferenceQuantityItem->setText(0,tr("Reference Quantity"));
ReferenceQuantityItem->setData(1,0,-1);
ReferenceQuantityItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControlReferenceQuantity));
ComputationalControlItem->addChild(ReferenceQuantityItem);
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);
@ -189,62 +195,48 @@ namespace GUI{
TurbomachineryPerformanceItem->setData(1,0,-1);
TurbomachineryPerformanceItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsTurbomachineryPerformance));
MonitorsItem->addChild(TurbomachineryPerformanceItem);
}
void CFDTreeWidget::addTreePostprocessing()
{
void CFDTreeWidget::addTreePostprocessing() {
// _treePostprocessing = new TreeWidget(this);
// tabWidget->addTab(_treePostprocessing,tr("Postprocessing"));
// qDebug()<<"!!!";
QTreeWidgetItem* PostProcessingItem = new QTreeWidgetItem();
PostProcessingItem->setText(0,tr("Post-processing"));
PostProcessingItem->setData(1,0,-1);
PostProcessingItem->setText(0, tr("Post-processing"));
PostProcessingItem->setData(1, 0, -1);
this->addTopLevelItem(PostProcessingItem);
QTreeWidgetItem* MeshItem = new QTreeWidgetItem();
MeshItem->setText(0,tr("Mesh"));
MeshItem->setData(1,0,-1);
MeshItem->setText(0, tr("Mesh"));
MeshItem->setData(1, 0, -1);
PostProcessingItem->addChild(MeshItem);
QTreeWidgetItem* Mesh1Item = new QTreeWidgetItem();
Mesh1Item->setText(0,tr("Mesh 1"));
Mesh1Item->setData(1,0,-1);
Mesh1Item->setText(0, tr("Mesh 1"));
Mesh1Item->setData(1, 0, -1);
MeshItem->addChild(Mesh1Item);
QTreeWidgetItem* Interface1Item = new QTreeWidgetItem();
Interface1Item->setText(0,tr("Interface 1"));
Interface1Item->setData(1,0,-1);
Interface1Item->setText(0, tr("Interface 1"));
Interface1Item->setData(1, 0, -1);
MeshItem->addChild(Interface1Item);
QTreeWidgetItem* CuttingPlaneItem = new QTreeWidgetItem();
CuttingPlaneItem->setText(0,tr("Cutting Plane"));
CuttingPlaneItem->setData(1,0,-1);
CuttingPlaneItem->setText(0, tr("Cutting Plane"));
CuttingPlaneItem->setData(1, 0, -1);
PostProcessingItem->addChild(CuttingPlaneItem);
QTreeWidgetItem* IsosurfaceItem = new QTreeWidgetItem();
IsosurfaceItem->setText(0,tr("Isosurface"));
IsosurfaceItem->setData(1,0,-1);
IsosurfaceItem->setText(0, tr("Isosurface"));
IsosurfaceItem->setData(1, 0, -1);
PostProcessingItem->addChild(IsosurfaceItem);
QTreeWidgetItem* StreamlineItem = new QTreeWidgetItem();
StreamlineItem->setText(0,tr("Streamline"));
StreamlineItem->setData(1,0,-1);
StreamlineItem->setText(0, tr("Streamline"));
StreamlineItem->setData(1, 0, -1);
PostProcessingItem->addChild(StreamlineItem);
QTreeWidgetItem* DataStatisticsItem = new QTreeWidgetItem();
DataStatisticsItem->setText(0,tr("Data Statistics"));
DataStatisticsItem->setData(1,0,-1);
DataStatisticsItem->setText(0, tr("Data Statistics"));
DataStatisticsItem->setData(1, 0, -1);
PostProcessingItem->addChild(DataStatisticsItem);
QTreeWidgetItem* ForceAndMomentItem = new QTreeWidgetItem();
ForceAndMomentItem->setText(0,tr("Force and Moment"));
ForceAndMomentItem->setData(1,0,-1);
ForceAndMomentItem->setText(0, tr("Force and Moment"));
ForceAndMomentItem->setData(1, 0, -1);
DataStatisticsItem->addChild(ForceAndMomentItem);
}
void CFDTreeWidget::onItemClicked(QTreeWidgetItem *item, int column)
@ -287,10 +279,6 @@ namespace GUI{
treeOper->moveProcessToStep(0);
}
// if(name == "actionTimeModeEdit"){
// ModelOper::CFDOperatorsTimeModeManager* manage = new ModelOper::CFDOperatorsTimeModeManager();
// manage->execGUI();
// }
}

@ -3,11 +3,9 @@
#include "GUIWidget/TreeWidget.h"
#include <QTreeWidgetItem>
namespace GUI
{
namespace GUI {
MainTreeWidget::MainTreeWidget(MainWindow* parent) :
PanelWidgetBase(parent)
{
PanelWidgetBase(parent) {
this->setTitle(tr("Tree"));
_treeWidget = new TreeWidget(this);
@ -16,18 +14,15 @@ namespace GUI
init();
}
MainTreeWidget::~MainTreeWidget()
{
if (_treeWidget)delete _treeWidget;
MainTreeWidget::~MainTreeWidget() {
//if (_treeWidget)delete _treeWidget;
}
void MainTreeWidget::init()
{
void MainTreeWidget::init() {
_treeWidget->updateTree();
}
TreeWidget * MainTreeWidget::getTreeWidget()
{
TreeWidget* MainTreeWidget::getTreeWidget() {
return _treeWidget;
}
}

@ -0,0 +1,40 @@
#include "OperatorsCFDTimeMode.h"
#include "GUIFrame/PropertyWidget.h"
#include "OperatorsInterface/TreeEventOperator.h"
#include "GUIDialog/GUICalculateDialog/SolutionWidget.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
namespace ModelOper
{
OperatorsCFDTimeMode::OperatorsCFDTimeMode()
{
}
OperatorsCFDTimeMode::~OperatorsCFDTimeMode()
{
}
bool OperatorsCFDTimeMode::execGUI()
{
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;
}
GUI::SolutionWidget* widget = new GUI::SolutionWidget(this, propertyWidget);
propertyWidget->setWidget(widget);
return true;
}
bool OperatorsCFDTimeMode::execProfession()
{
return true;
}
}

@ -0,0 +1,59 @@
/**
*
* @file OperatorsCFDTimeMode.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*
*/
#ifndef _OperatorsCFDTimeMode_H
#define _OperatorsCFDTimeMode_H
#include "OperManagerBase.h"
namespace ModelOper
{
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*/
class OperatorsCFDTimeMode : public OperManagerBase
{
Q_OBJECT;
public:
/**
* @brief Construct a new Operators Solution object
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*/
OperatorsCFDTimeMode();
/**
* @brief Destroy the Operators Solution object
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*/
~OperatorsCFDTimeMode();
/**
* @brief
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*/
virtual bool execGUI();
/**
* @brief
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-14
*/
virtual bool execProfession();
};
// 按钮注册相关操作
Register2FITKOPeratorRepo(actionCFDTimeMode, OperatorsCFDTimeMode);
}
#endif

@ -22,6 +22,7 @@ HEADERS += \
$$PWD/OperatorsDiscretization.h \
$$PWD/OperatorsSolution.h \
$$PWD/OperatorsBoundaryConditions.h \
OperatorsCFDTimeMode.h \
$$PWD/OperatorsInitial.h \
$$PWD/OperatorsRun.h \
$$PWD/OperatorsPost.h \
@ -52,6 +53,7 @@ SOURCES += \
$$PWD/OperatorsDiscretization.cpp \
$$PWD/OperatorsSolution.cpp \
$$PWD/OperatorsBoundaryConditions.cpp \
OperatorsCFDTimeMode.cpp \
$$PWD/OperatorsInitial.cpp \
$$PWD/OperatorsRun.cpp \
$$PWD/OperatorsPost.cpp \

Loading…
Cancel
Save