1、结构化部分代码重命名;

feature/struct-menu-20241023
simonyan 2 weeks ago
parent ebc8e4e79b
commit 727b9b29bc

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

@ -1,14 +0,0 @@
#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

@ -1,7 +1,7 @@
TEMPLATE = subdirs
SUBDIRS += \
$$PWD/CFDStructGUI \
$$PWD/CFDStructMain \
$$PWD/CFDStructOperatorsModel \
$$PWD/CFDStructDataManager \
$$PWD/CUIProperty \
$$PWD/CFDOperatorsModel \
$$PWD/CFDStructDataManager

@ -1,17 +0,0 @@
#ifndef CFDSTRUCTDATADEFINE_H
#define CFDSTRUCTDATADEFINE_H
#include <QObject>
#define QVA_GLOBAL(x) QVariant::fromValue(x)
#define QVA_QS(x) QVariant::fromValue(QString(x))
#define QVA_FROM_QS(x) qvariant_cast<QString>(x)
Q_DECLARE_METATYPE(int*)
Q_DECLARE_METATYPE(bool*)
Q_DECLARE_METATYPE(double*)
Q_DECLARE_METATYPE(QString*)
Q_DECLARE_METATYPE(QString)
#endif // CFDSTRUCTDATADEFINE_H

@ -1,11 +1,10 @@
SOURCES += \
$$PWD/CFDStructDataSolverTimeModeManager.cpp \
$$PWD/CFDStructSigsCenter.cpp \
CFDStructDataManager.cpp \
$$PWD/CFDStructDataManager.cpp \
HEADERS += \
$$PWD/CFDStructDataDefine.h \
$$PWD/CFDStructDataSolverTimeModeManager.h \
$$PWD/CFDStructSigsCenter.h \
CFDStructDataManager_global.h \
CFDStructDataManager.h
$$PWD/CFDStructDataManager_global.h \
$$PWD/CFDStructDataManager.h

@ -1,6 +1,6 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructDataDefine.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>

@ -1,44 +0,0 @@
#ifndef CFDMainTreeWidget_h
#define CFDMainTreeWidget_h
#include <QtCore/QtGlobal>
#include <QDebug>
#include <GUIFrame/MainTreeWidget.h>
#include <CFDStructGUIAPI.h>
class QTabWidget;
namespace GUI{
class MainWindow;
class CFDTreeWidget;
class PropertyWidget;
class CFDStructGUIAPI CFDMainTreeWidget : public MainTreeWidget{
Q_OBJECT
public:
CFDMainTreeWidget(MainWindow* parent, PropertyWidget* prowidget);
private:
void init();
void addTreePreprocessing(QTabWidget* tabWidget);
void addTreeSolutionAnalysis(QTabWidget* tabWidget);
void addTreePostprocessing(QTabWidget* tabWidget);
TreeWidget* _treePreprocessing;
CFDTreeWidget* _treeSolutionAnalysis;
CFDTreeWidget* _treePostprocessing;
PropertyWidget* m_PropertyWidget;
};
}
#endif

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

@ -1,78 +0,0 @@
#ifndef CFDTreeWidget_h
#define CFDTreeWidget_h
#include <QtCore/QtGlobal>
#include <QDebug>
//#include <GUIFrame/MainTreeWidget.h>
#include <CFDStructGUIAPI.h>
#include <GUIWidget/TreeWidget.h>
class MainWindow;
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
public:
CFDTreeWidget(QWidget* parent, PropertyWidget* m_ProperWidget);
public:
void init();
void updateTree(QString s);
void addTreePreprocessing();
void addTreeSolutionAnalysis();
void addTreePostprocessing();
private slots:
void onItemClicked(QTreeWidgetItem *item, int column);
private:
PropertyWidget* m_PropertyWidget;
CFDPropertyWidget* m_PropertyOpt;
};
}
Q_DECLARE_METATYPE(GUI::SolutionAnalysisTreeEnum)
#endif

@ -0,0 +1,46 @@
#ifndef CFDMainTreeWidget_h
#define CFDMainTreeWidget_h
#include <QtCore/QtGlobal>
#include <QDebug>
#include <GUIFrame/MainTreeWidget.h>
#include <CFDStructMainAPI.h>
class QTabWidget;
namespace GUI
{
class MainWindow;
class CFDTreeWidget;
class PropertyWidget;
class CFDStructMAINAPI CFDMainTreeWidget : public MainTreeWidget
{
Q_OBJECT
public:
CFDMainTreeWidget(MainWindow* parent, PropertyWidget* prowidget);
private:
void init();
void addTreePreprocessing(QTabWidget* tabWidget);
void addTreeSolutionAnalysis(QTabWidget* tabWidget);
void addTreePostprocessing(QTabWidget* tabWidget);
TreeWidget* _treePreprocessing;
CFDTreeWidget* _treeSolutionAnalysis;
CFDTreeWidget* _treePostprocessing;
PropertyWidget* m_PropertyWidget;
};
}
#endif

@ -3,16 +3,16 @@
#include <QtCore/QtGlobal>
#include <QDebug>
//#include <GUIFrame/MainTreeWidget.h>
#include <CFDStructGUIAPI.h>
#include <CFDStructMainAPI.h>
namespace GUI{
namespace GUI
{
class PropertyWidget;
class QTreeWidgetItem;
class CFDStructGUIAPI CFDPropertyWidget : public QObject{
class CFDStructMAINAPI CFDPropertyWidget : public QObject
{
Q_OBJECT
// public:

@ -0,0 +1,51 @@
#ifndef CFDSTRUCTDEFINE_H
#define CFDSTRUCTDEFINE_H
#include <QObject>
#define QVA_GLOBAL(x) QVariant::fromValue(x)
#define QVA_QS(x) QVariant::fromValue(QString(x))
#define QVA_FROM_QS(x) qvariant_cast<QString>(x)
#ifndef QVAR_DECLARE
#define QVAR_DECLARE
Q_DECLARE_METATYPE(int*)
Q_DECLARE_METATYPE(bool*)
Q_DECLARE_METATYPE(double*)
Q_DECLARE_METATYPE(QString*)
Q_DECLARE_METATYPE(QString)
#endif
// 结构树中节点
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,
};
Q_DECLARE_METATYPE(SolutionAnalysisTreeEnum)
#endif // CFDSTRUCTDEFINE_H

@ -1,6 +1,7 @@
HEADERS += \
$$PWD/CFDStructGUIAPI.h \
$$PWD/CFDStructMainAPI.h \
$$PWD/CFDStructMainWindow.h \
$$PWD/CFDStructDefine.h \
$$PWD/CFDMainTreeWidget.h \
$$PWD/CFDTreeWidget.h \
$$PWD/CFDPropertyWidget.h \

@ -1,16 +1,16 @@
TEMPLATE = lib
CONFIG += c++11
CONFIG += qt
TARGET = CFDStructGUI
TARGET = CFDStructMain
QT += core widgets gui
DEFINES += CFDStructGUI_API
DEFINES += CFDStructMAIN_API
INCLUDEPATH += \
./ \
../ \
../../ \
include(./CFDStructGUI.pri)
include(./CFDStructMain.pri)
win32{
@ -22,10 +22,10 @@ win32{
Release:CONFIG += console
Release:DESTDIR = ../../output/bin
Release:MOC_DIR = ../../generate/CFDStructGUI/release/moc
Release:RCC_DIR = ../../generate/CFDStructGUI/release/rcc
Release:UI_DIR = ../../generate/CFDStructGUI/release/qui
Release:OBJECTS_DIR = ../../generate/CFDStructGUI/release/obj
Release:MOC_DIR = ../../generate/CFDStructMain/release/moc
Release:RCC_DIR = ../../generate/CFDStructMain/release/rcc
Release:UI_DIR = ../../generate/CFDStructMain/release/qui
Release:OBJECTS_DIR = ../../generate/CFDStructMain/release/obj
Release:LIBS += \
-L../../output/bin \
-lGUIFrame \
@ -42,10 +42,10 @@ win32{
Debug:CONFIG += console
Debug:DESTDIR = ../../output/bin_d
Debug:MOC_DIR = ../../generate/CFDStructGUI/debug/moc
Debug:RCC_DIR = ../../generate/CFDStructGUI/debug/rcc
Debug:UI_DIR = ../../generate/CFDStructGUI/debug/qui
Debug:OBJECTS_DIR = ../../generate/CFDStructGUI/debug/obj
Debug:MOC_DIR = ../../generate/CFDStructMain/debug/moc
Debug:RCC_DIR = ../../generate/CFDStructMain/debug/rcc
Debug:UI_DIR = ../../generate/CFDStructMain/debug/qui
Debug:OBJECTS_DIR = ../../generate/CFDStructMain/debug/obj
Debug:LIBS += \
-L../../output/bin_d \
-lGUIFrame \
@ -64,5 +64,5 @@ Debug:LIBS += -L$$PWD/../../Tools/Win64/SARibbon/libd/ \
Release:LIBS += -L$$PWD/../../Tools/Win64/SARibbon/lib/ \
-lSARibbonBar \
message("Windows CFDStructGUI generated")
message("Windows CFDStructMain generated")
}

@ -0,0 +1,13 @@
#ifndef CFDSTRUCTMAINAPI_H
#define CFDSTRUCTMAINAPI_H
#include <QtCore/QtGlobal>
#include <QDebug>
#if defined(CFDStructMAIN_API)
#define CFDStructMAINAPI Q_DECL_EXPORT
#else
#define CFDStructMAINAPI Q_DECL_IMPORT
#endif
#endif // CFDSTRUCTMAINAPI_H

@ -10,19 +10,20 @@
#define CFDSTRUCTMAINWINDOW_H
#include<QDebug>
#include"CFDStructGUIAPI.h"
#include"CFDStructMainAPI.h"
#include<GUIFrame/MainWindow.h>
class CFDStructGUIAPI CFDStructMainWindow : public GUI::MainWindow {
class CFDStructMAINAPI CFDStructMainWindow : public GUI::MainWindow
{
Q_OBJECT
class QTreeWidgetItem;
class QTreeWidgetItem;
public:
public:
CFDStructMainWindow();
private:
private:
/**
* @brief äÖČžĘÓÍź

@ -65,7 +65,7 @@ namespace GUI
QTreeWidgetItem* GeometryAndMeshingItem = new QTreeWidgetItem();
GeometryAndMeshingItem->setText(0, tr("Preprocessing"));
GeometryAndMeshingItem->setData(1, 0, -1);
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(GUI::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
// GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
this->addTopLevelItem(GeometryAndMeshingItem);
}
@ -74,52 +74,52 @@ 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::SolutionAnalysisTreeEnum::SATree_GeometryandMeshing));
GeometryAndMeshingItem->setData(2, 0, QVariant::fromValue(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::))
// mesh->setdata(2,0,QVariant::fromValue(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));
ComputationalSetupItem->setData(2, 0, QVariant::fromValue(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));
TimeModeItem->setData(2, 0, QVariant::fromValue(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));
ComputationalDomainItem->setData(2, 0, QVariant::fromValue(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));
SolverItem->setData(2, 0, QVariant::fromValue(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));
BasicModelItem->setData(2, 0, QVariant::fromValue(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));
ViscosityModelItem->setData(2, 0, QVariant::fromValue(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));
NumericalMethodsItem->setData(2, 0, QVariant::fromValue(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));
MotionPropertiesItem->setData(2, 0, QVariant::fromValue(SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMotionProperties));
ComputationalDomainItem->addChild(MotionPropertiesItem);
QTreeWidgetItem* motion1Item = new QTreeWidgetItem();
motion1Item->setText(0, tr("motion-1"));
@ -128,47 +128,47 @@ 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));
BoundaryConditionsItem->setData(2, 0, QVariant::fromValue(SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditions));
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));
pressureinletItem->setData(2, 0, QVariant::fromValue(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));
InitializationItem->setData(2, 0, QVariant::fromValue(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));
ComputationalControlItem->setData(2, 0, QVariant::fromValue(SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControl));
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));
ReferenceQuantityItem->setData(2, 0, QVariant::fromValue(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));
MonitorsItem->setData(2, 0, QVariant::fromValue(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));
ResidualItem->setData(2, 0, QVariant::fromValue(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));
AerodynamicForceItem->setData(2, 0, QVariant::fromValue(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));
TurbomachineryPerformanceItem->setData(2, 0, QVariant::fromValue(SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsTurbomachineryPerformance));
MonitorsItem->addChild(TurbomachineryPerformanceItem);
}
@ -230,14 +230,14 @@ namespace GUI
return;
}
int objID = item->data(1, 0).toInt();
GUI::SolutionAnalysisTreeEnum treeType = item->data(2, 0).value<GUI::SolutionAnalysisTreeEnum>();
SolutionAnalysisTreeEnum treeType = item->data(2, 0).value<SolutionAnalysisTreeEnum>();
Interface::FITKGeoEnum::FITKGeometryComType geometryType = item->data(3, 0).value<Interface::FITKGeoEnum::FITKGeometryComType>();
QString name = "";
switch (treeType) {
case GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode:
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode:
name = "actionTimeModeEdit";
break;
case GUI::SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel:
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel:
name = "actionBasicModelEdit";
break;
default:

@ -0,0 +1,49 @@
#ifndef CFDTreeWidget_h
#define CFDTreeWidget_h
#include <QtCore/QtGlobal>
#include <QDebug>
#include "CFDStructDefine.h"
#include <CFDStructMainAPI.h>
#include <GUIWidget/TreeWidget.h>
class MainWindow;
class QTabWidget;
namespace GUI
{
class PropertyWidget;
class CFDPropertyWidget;
class CFDStructMAINAPI CFDTreeWidget : public TreeWidget
{
Q_OBJECT
public:
CFDTreeWidget(QWidget* parent, PropertyWidget* m_ProperWidget);
public:
void init();
void updateTree(QString s);
void addTreePreprocessing();
void addTreeSolutionAnalysis();
void addTreePostprocessing();
private slots:
void onItemClicked(QTreeWidgetItem *item, int column);
private:
PropertyWidget* m_PropertyWidget;
CFDPropertyWidget* m_PropertyOpt;
};
}
#endif

@ -1,4 +1,4 @@
#include "CFDOperatorsBasicModelManager.h"
#include "CFDStructOperatorsBasicModelManager.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
@ -13,16 +13,16 @@
namespace ModelOper
{
CFDOperatorsBasicModelManager::CFDOperatorsBasicModelManager()
CFDStructOperatorsBasicModelManager::CFDStructOperatorsBasicModelManager()
{
qDebug() << "build Time Mode Manager";
}
CFDOperatorsBasicModelManager::~CFDOperatorsBasicModelManager()
CFDStructOperatorsBasicModelManager::~CFDStructOperatorsBasicModelManager()
{
}
bool CFDOperatorsBasicModelManager::execGUI()
bool CFDStructOperatorsBasicModelManager::execGUI()
{
QWidget* widget = nullptr;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
@ -90,7 +90,7 @@ namespace ModelOper
return false;
}
bool CFDOperatorsBasicModelManager::execProfession()
bool CFDStructOperatorsBasicModelManager::execProfession()
{
return true;
}

@ -1,25 +1,24 @@
#ifndef _CFDOperatorsBasicModelManager_H
#define _CFDOperatorsBasicModelManager_H
#ifndef _CFDStructOperatorsBasicModelManager_H
#define _CFDStructOperatorsBasicModelManager_H
//#include "OperManagerBase.h"
#include "CFDOperatorsModelAPI.h"
#include "CFDStructOperatorsModelAPI.h"
#include "OperatorsModel/OperManagerBase.h"
namespace ModelOper
{
class CFDOperatorsBasicModelManager : public OperManagerBase
class CFDStructOperatorsModelAPI CFDStructOperatorsBasicModelManager : public OperManagerBase
{
Q_OBJECT;
public:
/**
* @brief Construct a new Operators Mesh Base Manager object
*/
CFDOperatorsBasicModelManager();
CFDStructOperatorsBasicModelManager();
/**
* @brief Destroy the Operators Mesh Base Manager object
*/
~CFDOperatorsBasicModelManager();
~CFDStructOperatorsBasicModelManager();
/**
* @brief
* @return true
@ -35,7 +34,7 @@ namespace ModelOper
};
// 按钮注册相关操作
Register2FITKOPeratorRepo(actionBasicModelEdit, CFDOperatorsBasicModelManager);
Register2FITKOPeratorRepo(actionBasicModelEdit, CFDStructOperatorsBasicModelManager);
}
#endif

@ -0,0 +1,9 @@
HEADERS += \
$$PWD/CFDStructOperatorsModelAPI.h \
$$PWD/CFDStructOperatorsBasicModelManager.h \
$$PWD/CFDStructOperatorsTimeModeManager.h
SOURCES += \
$$PWD/CFDStructOperatorsBasicModelManager.cpp \
$$PWD/CFDStructOperatorsTimeModeManager.cpp

@ -1,14 +1,13 @@
TEMPLATE = lib
CONFIG += c++11
CONFIG += qt
CONFIG += staticlib
TARGET = CFDOperatorsModel
TARGET = CFDStructOperatorsModel
QT += core widgets gui
DEFINES += CFDOperatorsModel_API
DEFINES += CFDStructOperatorsModel_API
unix:!mac{ QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/\'" }
include(./CFDOperatorsModel.pri)
include(./CFDStructOperatorsModel.pri)
win32{
@ -17,10 +16,10 @@ win32{
../../ \
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:MOC_DIR = ../../generate/CFDStructOperatorsModel/release/moc
Release:RCC_DIR = ../../generate/CFDStructOperatorsModel/release/rcc
Release:UI_DIR = ../../generate/CFDStructOperatorsModel/release/qui
Release:OBJECTS_DIR = ../../generate/CFDStructOperatorsModel/release/obj
Release:LIBS += \
-L../../output/bin \
-lFITKAppFramework \
@ -44,15 +43,16 @@ win32{
-lFITKInterfaceFlowOF \
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
# -lCFDStructDataManager \
-lCUIProperty \
-lCFDStructDataManager
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:MOC_DIR = ../../generate/CFDStructOperatorsModel/debug/moc
Debug:RCC_DIR = ../../generate/CFDStructOperatorsModel/debug/rcc
Debug:UI_DIR = ../../generate/CFDStructOperatorsModel/debug/qui
Debug:OBJECTS_DIR = ../../generate/CFDStructOperatorsModel/debug/obj
Debug:LIBS += \
-L../../output/bin_d \
-lFITKAppFramework \
@ -76,11 +76,12 @@ win32{
-lFITKInterfaceFlowOF \
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
# -lCFDStructDataManager \
-lCUIProperty \
-lCFDStructDataManager
message("Windows CFDOperatorsModel generated")
message("Windows CFDStructOperatorsModel generated")
}
unix{
@ -92,15 +93,15 @@ unix{
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
MOC_DIR = ../../generate/CFDStructOperatorsModel/release/moc
UI_DIR = ../../generate/CFDStructOperatorsModel/release/qui
RCC_DIR = ../../generate/CFDStructOperatorsModel/release/rcc
OBJECTS_DIR = ../../generate/CFDStructOperatorsModel/release/obj
LIBS += \
-L../../output/bin \
message("Linux CFDOperatorsModel generated")
message("Linux CFDStructOperatorsModel generated")
}

@ -0,0 +1,13 @@
#ifndef CFDStructOperatorsModelAPI_H
#define CFDStructOperatorsModelAPI_H
#include <QtCore/QtGlobal>
#include <QDebug>
#if defined(CFDStructOperatorsModel_API)
#define CFDStructOperatorsModelAPI Q_DECL_EXPORT
#else
#define CFDStructOperatorsModelAPI Q_DECL_IMPORT
#endif
#endif // CFDStructOperatorsModelAPI_H

@ -1,4 +1,4 @@
#include "CFDOperatorsTimeModeManager.h"
#include "CFDStructOperatorsTimeModeManager.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
@ -15,7 +15,7 @@
namespace ModelOper
{
CFDOperatorsTimeModeManager::CFDOperatorsTimeModeManager()
CFDStructOperatorsTimeModeManager::CFDStructOperatorsTimeModeManager()
{
qDebug() << "build Time Mode Manager";
CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance();
@ -27,11 +27,11 @@ namespace ModelOper
});
}
CFDOperatorsTimeModeManager::~CFDOperatorsTimeModeManager()
CFDStructOperatorsTimeModeManager::~CFDStructOperatorsTimeModeManager()
{
}
bool CFDOperatorsTimeModeManager::execGUI()
bool CFDStructOperatorsTimeModeManager::execGUI()
{
QWidget* widget = nullptr;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
@ -54,7 +54,7 @@ namespace ModelOper
return false;
}
bool CFDOperatorsTimeModeManager::execProfession()
bool CFDStructOperatorsTimeModeManager::execProfession()
{
return true;
}

@ -1,25 +1,24 @@
#ifndef _CFDOperatorsTimeModeManager_H
#define _CFDOperatorsTimeModeManager_H
#ifndef _CFDStructOperatorsTimeModeManager_H
#define _CFDStructOperatorsTimeModeManager_H
//#include "OperManagerBase.h"
#include "OperatorsModel/OperManagerBase.h"
//#include "CFDStructDataManager/CFDStructDataManager.h"
#include "CFDStructOperatorsModelAPI.h"
namespace ModelOper
{
class CFDOperatorsTimeModeManager : public OperManagerBase
class CFDStructOperatorsModelAPI CFDStructOperatorsTimeModeManager : public OperManagerBase
{
Q_OBJECT;
public:
/**
* @brief Construct a new Operators Mesh Base Manager object
*/
CFDOperatorsTimeModeManager();
CFDStructOperatorsTimeModeManager();
/**
* @brief Destroy the Operators Mesh Base Manager object
*/
~CFDOperatorsTimeModeManager();
~CFDStructOperatorsTimeModeManager();
/**
* @brief
* @return true
@ -35,8 +34,8 @@ namespace ModelOper
};
// 按钮注册相关操作
Register2FITKOPeratorRepo(actionTimeModeEdit, CFDOperatorsTimeModeManager);
Register2FITKOPeratorRepo(actionBasicModelEdit, CFDOperatorsTimeModeManager);
Register2FITKOPeratorRepo(actionTimeModeEdit, CFDStructOperatorsTimeModeManager);
Register2FITKOPeratorRepo(actionBasicModelEdit, CFDStructOperatorsTimeModeManager);
}
#endif

@ -6,7 +6,6 @@
#include<QLabel>
#include<QDebug>
#include<QAbstractItemView>
#include "CFDStructDataManager/CFDStructDataDefine.h"
/**
* @brief CUIComboBox::CUIComboBox

@ -1,8 +1,6 @@
#include "CUIConfig.h"
#include "CUISigsCenter.h"
#include <QDebug>
#include "CFDStructDataManager/CFDStructDataDefine.h"
#include "CFDStructDataManager/CFDStructSigsCenter.h"
#include <QTimer>
/**
@ -122,7 +120,7 @@ void CUIConfig::setValue(QVariant value)
QString CUIConfig::getPropertyValue(QString key)
{
if(property.contains(key)) {
return QVA_FROM_QS(property[key]);
return qvariant_cast<QString>(property[key]);
}
return QString();
}
@ -151,7 +149,7 @@ QVector<CUIConfig *> CUIConfig::getSub()
*/
void CUIConfig::setDefault()
{
QString type = QVA_FROM_QS(property["type"]);
QString type = qvariant_cast<QString>(property["type"]);
if(type == "LineEdit") {
setDefault("name", "");
setDefault("data_type", "string"); //数据类型

@ -5,10 +5,19 @@
#include <QDebug>
#ifndef QVAR_DECLARE
#define QVAR_DECLARE
Q_DECLARE_METATYPE(int*)
Q_DECLARE_METATYPE(bool*)
Q_DECLARE_METATYPE(double*)
Q_DECLARE_METATYPE(QString*)
Q_DECLARE_METATYPE(QString)
#endif
#if defined(CUIProperty_API)
#define CUIPropertyAPI Q_DECL_EXPORT
#define CUIPropertyAPI Q_DECL_EXPORT
#else
#define CUIPropertyAPI Q_DECL_IMPORT
#define CUIPropertyAPI Q_DECL_IMPORT
#endif
#endif // CUIPropertyAPI_H

@ -43,7 +43,7 @@ win32{
-lFITKOFMeshIO \
-lFITKFlowOFIOHDF5 \
-lFITKCGNSIO \
-lCFDStruct \
-lCFDStructMain \
Debug:CONFIG += console
Debug:DESTDIR = ../output/bin_d
@ -73,7 +73,7 @@ win32{
-lFITKOFMeshIO \
-lFITKFlowOFIOHDF5 \
-lFITKCGNSIO \
-lCFDStructGUI \
-lCFDStructMain \
Debug:LIBS += -L$$PWD/../Tools/Win64/SARibbon/libd/ \
-lSARibbonBard \

@ -1,13 +1,15 @@
#include "MainWindowGenerator.h"
#include "GUIFrame/MainWindow.h"
#include "CFDStruct/CFDStructGUI/CFDStructMainWindow.h"
#include "CFDStruct/CFDStructMain/CFDStructMainWindow.h"
MainWindowGenerator::MainWindowGenerator() {
MainWindowGenerator::MainWindowGenerator()
{
// this->setStyle("://Structural.qss");
// this->showMaximize(false);
}
QWidget* MainWindowGenerator::genMainWindow() {
QWidget* MainWindowGenerator::genMainWindow()
{
//return new GUI::MainWindow;
return new CFDStructMainWindow;
}

@ -2,14 +2,14 @@
#include "MainWindowGenerator.h"
#include "GlobalDataFactory.h"
#include "ComponentFactory.h"
#include "CommandLineHandler.h".
#include "CommandLineHandler.h"
#include "SignalProcessor.h"
#include "FlowAPPSettings.h"
#include "WorkBenchHandler.h"
#include "SystemChecker.h"
#ifdef Q_OS_WIN
#include <Windows.h>
#include <Windows.h>
#endif // Q_WIN
/**
* @brief
@ -31,13 +31,10 @@ int main(int argc, char *argv[])
//控制图片缩放质量
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
// 初始化应用框架
AppFrame::FITKApplication app(argc, argv);
#ifdef Q_OS_LINUX
qputenv("PYTHONHOME", app.applicationDirPath().toUtf8() + "/../Python37");
QStringList pythonPaths;
pythonPaths << app.applicationDirPath() + "/../Python37/bin";
pythonPaths << app.applicationDirPath() + "/../Python37/lib";

Loading…
Cancel
Save