From 727b9b29bc92aac5da44b533d4d60d2eeb77faec Mon Sep 17 00:00:00 2001 From: simonyan <315082291@qq.com> Date: Wed, 30 Oct 2024 11:02:01 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=BB=93=E6=9E=84=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81=E9=87=8D=E5=91=BD=E5=90=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CFDOperatorsModel/CFDOperatorsModel.pri | 9 --- .../CFDOperatorsModel/CFDOperatorsModelAPI.h | 14 ---- CFDStruct/CFDStruct.pro | 6 +- .../CFDStructDataDefine.h | 17 ---- .../CFDStructDataManager.pri | 7 +- .../CFDStructDataSolverTimeModeManager.cpp | 2 +- CFDStruct/CFDStructGUI/CFDMainTreeWidget.h | 44 ----------- CFDStruct/CFDStructGUI/CFDStructGUIAPI.h | 14 ---- CFDStruct/CFDStructGUI/CFDTreeWidget.h | 78 ------------------- .../CFDMainTreeWidget.cpp | 0 CFDStruct/CFDStructMain/CFDMainTreeWidget.h | 46 +++++++++++ .../CFDPropertyWidget.cpp | 0 .../CFDPropertyWidget.h | 10 +-- CFDStruct/CFDStructMain/CFDStructDefine.h | 51 ++++++++++++ .../CFDStructMain.pri} | 5 +- .../CFDStructMain.pro} | 24 +++--- CFDStruct/CFDStructMain/CFDStructMainAPI.h | 13 ++++ .../CFDStructMainWindow.cpp | 0 .../CFDStructMainWindow.h | 11 +-- .../CFDTreeWidget.cpp | 46 +++++------ CFDStruct/CFDStructMain/CFDTreeWidget.h | 49 ++++++++++++ .../CFDStructOperatorsBasicModelManager.cpp} | 10 +-- .../CFDStructOperatorsBasicModelManager.h} | 15 ++-- .../CFDStructOperatorsModel.pri | 9 +++ .../CFDStructOperatorsModel.pro} | 41 +++++----- .../CFDStructOperatorsModelAPI.h | 13 ++++ .../CFDStructOperatorsTimeModeManager.cpp} | 10 +-- .../CFDStructOperatorsTimeModeManager.h} | 17 ++-- CFDStruct/CUIProperty/CUIComboBox.cpp | 1 - CFDStruct/CUIProperty/CUIConfig.cpp | 6 +- CFDStruct/CUIProperty/CUIPropertyAPI.h | 13 +++- FlowApp/FlowApp.pro | 4 +- FlowApp/MainWindowGenerator.cpp | 8 +- FlowApp/main.cpp | 9 +-- 34 files changed, 306 insertions(+), 296 deletions(-) delete mode 100644 CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pri delete mode 100644 CFDStruct/CFDOperatorsModel/CFDOperatorsModelAPI.h delete mode 100644 CFDStruct/CFDStructDataManager/CFDStructDataDefine.h delete mode 100644 CFDStruct/CFDStructGUI/CFDMainTreeWidget.h delete mode 100644 CFDStruct/CFDStructGUI/CFDStructGUIAPI.h delete mode 100644 CFDStruct/CFDStructGUI/CFDTreeWidget.h rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDMainTreeWidget.cpp (100%) create mode 100644 CFDStruct/CFDStructMain/CFDMainTreeWidget.h rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDPropertyWidget.cpp (100%) rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDPropertyWidget.h (75%) create mode 100644 CFDStruct/CFDStructMain/CFDStructDefine.h rename CFDStruct/{CFDStructGUI/CFDStructGUI.pri => CFDStructMain/CFDStructMain.pri} (78%) rename CFDStruct/{CFDStructGUI/CFDStructGUI.pro => CFDStructMain/CFDStructMain.pro} (65%) create mode 100644 CFDStruct/CFDStructMain/CFDStructMainAPI.h rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDStructMainWindow.cpp (100%) rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDStructMainWindow.h (90%) rename CFDStruct/{CFDStructGUI => CFDStructMain}/CFDTreeWidget.cpp (82%) create mode 100644 CFDStruct/CFDStructMain/CFDTreeWidget.h rename CFDStruct/{CFDOperatorsModel/CFDOperatorsBasicModelManager.cpp => CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.cpp} (92%) rename CFDStruct/{CFDOperatorsModel/CFDOperatorsBasicModelManager.h => CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.h} (60%) create mode 100644 CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pri rename CFDStruct/{CFDOperatorsModel/CFDOperatorsModel.pro => CFDStructOperatorsModel/CFDStructOperatorsModel.pro} (60%) create mode 100644 CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModelAPI.h rename CFDStruct/{CFDOperatorsModel/CFDOperatorsTimeModeManager.cpp => CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.cpp} (84%) rename CFDStruct/{CFDOperatorsModel/CFDOperatorsTimeModeManager.h => CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.h} (56%) diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pri b/CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pri deleted file mode 100644 index 354a0ce..0000000 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pri +++ /dev/null @@ -1,9 +0,0 @@ -HEADERS += \ - $$PWD/CFDOperatorsModelAPI.h \ - $$PWD/CFDOperatorsBasicModelManager.h \ - $$PWD/CFDOperatorsTimeModeManager.h - -SOURCES += \ - $$PWD/CFDOperatorsBasicModelManager.cpp \ - $$PWD/CFDOperatorsTimeModeManager.cpp - diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsModelAPI.h b/CFDStruct/CFDOperatorsModel/CFDOperatorsModelAPI.h deleted file mode 100644 index 7699fc1..0000000 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsModelAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CFDOperatorsModelAPI_H -#define CFDOperatorsModelAPI_H - -#include - -#include - -#if defined(CFDOperatorsModel_API) -#define CFDOperatorsModelAPI Q_DECL_EXPORT -#else -#define CFDOperatorsModelAPI Q_DECL_IMPORT -#endif - -#endif // CFDOperatorsModelAPI_H diff --git a/CFDStruct/CFDStruct.pro b/CFDStruct/CFDStruct.pro index 0a41f06..4783173 100644 --- a/CFDStruct/CFDStruct.pro +++ b/CFDStruct/CFDStruct.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs SUBDIRS += \ - $$PWD/CFDStructGUI \ + $$PWD/CFDStructMain \ + $$PWD/CFDStructOperatorsModel \ + $$PWD/CFDStructDataManager \ $$PWD/CUIProperty \ - $$PWD/CFDOperatorsModel \ - $$PWD/CFDStructDataManager diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataDefine.h b/CFDStruct/CFDStructDataManager/CFDStructDataDefine.h deleted file mode 100644 index 4628371..0000000 --- a/CFDStruct/CFDStructDataManager/CFDStructDataDefine.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef CFDSTRUCTDATADEFINE_H -#define CFDSTRUCTDATADEFINE_H - -#include - -#define QVA_GLOBAL(x) QVariant::fromValue(x) -#define QVA_QS(x) QVariant::fromValue(QString(x)) -#define QVA_FROM_QS(x) qvariant_cast(x) - -Q_DECLARE_METATYPE(int*) -Q_DECLARE_METATYPE(bool*) -Q_DECLARE_METATYPE(double*) -Q_DECLARE_METATYPE(QString*) -Q_DECLARE_METATYPE(QString) - -#endif // CFDSTRUCTDATADEFINE_H - diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri b/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri index 560a44a..655cca8 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri +++ b/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri @@ -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 diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp index d4bfe25..7ae05df 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp @@ -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 diff --git a/CFDStruct/CFDStructGUI/CFDMainTreeWidget.h b/CFDStruct/CFDStructGUI/CFDMainTreeWidget.h deleted file mode 100644 index d8dbc14..0000000 --- a/CFDStruct/CFDStructGUI/CFDMainTreeWidget.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef CFDMainTreeWidget_h -#define CFDMainTreeWidget_h - -#include -#include -#include -#include - -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 diff --git a/CFDStruct/CFDStructGUI/CFDStructGUIAPI.h b/CFDStruct/CFDStructGUI/CFDStructGUIAPI.h deleted file mode 100644 index ba7ad6b..0000000 --- a/CFDStruct/CFDStructGUI/CFDStructGUIAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CFDSTRUCTGUIAPI_H -#define CFDSTRUCTGUIAPI_H - -#include - -#include - -#if defined(CFDStructGUI_API) -#define CFDStructGUIAPI Q_DECL_EXPORT -#else -#define CFDStructGUIAPI Q_DECL_IMPORT -#endif - -#endif // CFDSTRUCTGUIAPI_H diff --git a/CFDStruct/CFDStructGUI/CFDTreeWidget.h b/CFDStruct/CFDStructGUI/CFDTreeWidget.h deleted file mode 100644 index d350803..0000000 --- a/CFDStruct/CFDStructGUI/CFDTreeWidget.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef CFDTreeWidget_h -#define CFDTreeWidget_h - -#include -#include -//#include -#include -#include - -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 diff --git a/CFDStruct/CFDStructGUI/CFDMainTreeWidget.cpp b/CFDStruct/CFDStructMain/CFDMainTreeWidget.cpp similarity index 100% rename from CFDStruct/CFDStructGUI/CFDMainTreeWidget.cpp rename to CFDStruct/CFDStructMain/CFDMainTreeWidget.cpp diff --git a/CFDStruct/CFDStructMain/CFDMainTreeWidget.h b/CFDStruct/CFDStructMain/CFDMainTreeWidget.h new file mode 100644 index 0000000..8d02f0d --- /dev/null +++ b/CFDStruct/CFDStructMain/CFDMainTreeWidget.h @@ -0,0 +1,46 @@ +#ifndef CFDMainTreeWidget_h +#define CFDMainTreeWidget_h + +#include +#include +#include +#include + +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 diff --git a/CFDStruct/CFDStructGUI/CFDPropertyWidget.cpp b/CFDStruct/CFDStructMain/CFDPropertyWidget.cpp similarity index 100% rename from CFDStruct/CFDStructGUI/CFDPropertyWidget.cpp rename to CFDStruct/CFDStructMain/CFDPropertyWidget.cpp diff --git a/CFDStruct/CFDStructGUI/CFDPropertyWidget.h b/CFDStruct/CFDStructMain/CFDPropertyWidget.h similarity index 75% rename from CFDStruct/CFDStructGUI/CFDPropertyWidget.h rename to CFDStruct/CFDStructMain/CFDPropertyWidget.h index 11086d8..80cc030 100644 --- a/CFDStruct/CFDStructGUI/CFDPropertyWidget.h +++ b/CFDStruct/CFDStructMain/CFDPropertyWidget.h @@ -3,16 +3,16 @@ #include #include -//#include -#include +#include - -namespace GUI{ +namespace GUI +{ class PropertyWidget; class QTreeWidgetItem; - class CFDStructGUIAPI CFDPropertyWidget : public QObject{ + class CFDStructMAINAPI CFDPropertyWidget : public QObject + { Q_OBJECT // public: diff --git a/CFDStruct/CFDStructMain/CFDStructDefine.h b/CFDStruct/CFDStructMain/CFDStructDefine.h new file mode 100644 index 0000000..970f49f --- /dev/null +++ b/CFDStruct/CFDStructMain/CFDStructDefine.h @@ -0,0 +1,51 @@ +#ifndef CFDSTRUCTDEFINE_H +#define CFDSTRUCTDEFINE_H + +#include + +#define QVA_GLOBAL(x) QVariant::fromValue(x) +#define QVA_QS(x) QVariant::fromValue(QString(x)) +#define QVA_FROM_QS(x) qvariant_cast(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 + diff --git a/CFDStruct/CFDStructGUI/CFDStructGUI.pri b/CFDStruct/CFDStructMain/CFDStructMain.pri similarity index 78% rename from CFDStruct/CFDStructGUI/CFDStructGUI.pri rename to CFDStruct/CFDStructMain/CFDStructMain.pri index 9d1ea0a..8e1b254 100644 --- a/CFDStruct/CFDStructGUI/CFDStructGUI.pri +++ b/CFDStruct/CFDStructMain/CFDStructMain.pri @@ -1,6 +1,7 @@ -HEADERS += \ - $$PWD/CFDStructGUIAPI.h \ +HEADERS += \ + $$PWD/CFDStructMainAPI.h \ $$PWD/CFDStructMainWindow.h \ + $$PWD/CFDStructDefine.h \ $$PWD/CFDMainTreeWidget.h \ $$PWD/CFDTreeWidget.h \ $$PWD/CFDPropertyWidget.h \ diff --git a/CFDStruct/CFDStructGUI/CFDStructGUI.pro b/CFDStruct/CFDStructMain/CFDStructMain.pro similarity index 65% rename from CFDStruct/CFDStructGUI/CFDStructGUI.pro rename to CFDStruct/CFDStructMain/CFDStructMain.pro index 5c5f95c..4d99a7e 100644 --- a/CFDStruct/CFDStructGUI/CFDStructGUI.pro +++ b/CFDStruct/CFDStructMain/CFDStructMain.pro @@ -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") } diff --git a/CFDStruct/CFDStructMain/CFDStructMainAPI.h b/CFDStruct/CFDStructMain/CFDStructMainAPI.h new file mode 100644 index 0000000..cdc8a44 --- /dev/null +++ b/CFDStruct/CFDStructMain/CFDStructMainAPI.h @@ -0,0 +1,13 @@ +#ifndef CFDSTRUCTMAINAPI_H +#define CFDSTRUCTMAINAPI_H + +#include +#include + +#if defined(CFDStructMAIN_API) + #define CFDStructMAINAPI Q_DECL_EXPORT +#else + #define CFDStructMAINAPI Q_DECL_IMPORT +#endif + +#endif // CFDSTRUCTMAINAPI_H diff --git a/CFDStruct/CFDStructGUI/CFDStructMainWindow.cpp b/CFDStruct/CFDStructMain/CFDStructMainWindow.cpp similarity index 100% rename from CFDStruct/CFDStructGUI/CFDStructMainWindow.cpp rename to CFDStruct/CFDStructMain/CFDStructMainWindow.cpp diff --git a/CFDStruct/CFDStructGUI/CFDStructMainWindow.h b/CFDStruct/CFDStructMain/CFDStructMainWindow.h similarity index 90% rename from CFDStruct/CFDStructGUI/CFDStructMainWindow.h rename to CFDStruct/CFDStructMain/CFDStructMainWindow.h index 03ac878..5b3993f 100644 --- a/CFDStruct/CFDStructGUI/CFDStructMainWindow.h +++ b/CFDStruct/CFDStructMain/CFDStructMainWindow.h @@ -10,19 +10,20 @@ #define CFDSTRUCTMAINWINDOW_H #include -#include"CFDStructGUIAPI.h" +#include"CFDStructMainAPI.h" #include -class CFDStructGUIAPI CFDStructMainWindow : public GUI::MainWindow { +class CFDStructMAINAPI CFDStructMainWindow : public GUI::MainWindow +{ Q_OBJECT -class QTreeWidgetItem; + class QTreeWidgetItem; - public: +public: CFDStructMainWindow(); - private: +private: /** * @brief Ⱦͼ diff --git a/CFDStruct/CFDStructGUI/CFDTreeWidget.cpp b/CFDStruct/CFDStructMain/CFDTreeWidget.cpp similarity index 82% rename from CFDStruct/CFDStructGUI/CFDTreeWidget.cpp rename to CFDStruct/CFDStructMain/CFDTreeWidget.cpp index 078f433..a5220d6 100644 --- a/CFDStruct/CFDStructGUI/CFDTreeWidget.cpp +++ b/CFDStruct/CFDStructMain/CFDTreeWidget.cpp @@ -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(); + SolutionAnalysisTreeEnum treeType = item->data(2, 0).value(); Interface::FITKGeoEnum::FITKGeometryComType geometryType = item->data(3, 0).value(); 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: diff --git a/CFDStruct/CFDStructMain/CFDTreeWidget.h b/CFDStruct/CFDStructMain/CFDTreeWidget.h new file mode 100644 index 0000000..b01bbd6 --- /dev/null +++ b/CFDStruct/CFDStructMain/CFDTreeWidget.h @@ -0,0 +1,49 @@ +#ifndef CFDTreeWidget_h +#define CFDTreeWidget_h + +#include +#include +#include "CFDStructDefine.h" +#include +#include + +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 diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.cpp b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.cpp similarity index 92% rename from CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.cpp rename to CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.cpp index bf08dd7..3277f0a 100644 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.cpp +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.cpp @@ -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(FITKAPP->getGlobalData()->getMainWindow()); @@ -90,7 +90,7 @@ namespace ModelOper return false; } - bool CFDOperatorsBasicModelManager::execProfession() + bool CFDStructOperatorsBasicModelManager::execProfession() { return true; } diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.h b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.h similarity index 60% rename from CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.h rename to CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.h index a988600..042e4c2 100644 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsBasicModelManager.h +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsBasicModelManager.h @@ -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 diff --git a/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pri b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pri new file mode 100644 index 0000000..70aa64b --- /dev/null +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pri @@ -0,0 +1,9 @@ +HEADERS += \ + $$PWD/CFDStructOperatorsModelAPI.h \ + $$PWD/CFDStructOperatorsBasicModelManager.h \ + $$PWD/CFDStructOperatorsTimeModeManager.h + +SOURCES += \ + $$PWD/CFDStructOperatorsBasicModelManager.cpp \ + $$PWD/CFDStructOperatorsTimeModeManager.cpp + diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pro b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pro similarity index 60% rename from CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pro rename to CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pro index a328b7c..040340d 100644 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsModel.pro +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModel.pro @@ -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") } diff --git a/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModelAPI.h b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModelAPI.h new file mode 100644 index 0000000..49c60e8 --- /dev/null +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsModelAPI.h @@ -0,0 +1,13 @@ +#ifndef CFDStructOperatorsModelAPI_H +#define CFDStructOperatorsModelAPI_H + +#include +#include + +#if defined(CFDStructOperatorsModel_API) + #define CFDStructOperatorsModelAPI Q_DECL_EXPORT +#else + #define CFDStructOperatorsModelAPI Q_DECL_IMPORT +#endif + +#endif // CFDStructOperatorsModelAPI_H diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.cpp b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.cpp similarity index 84% rename from CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.cpp rename to CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.cpp index ccfc478..1662b4b 100644 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.cpp +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.cpp @@ -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(FITKAPP->getGlobalData()->getMainWindow()); @@ -54,7 +54,7 @@ namespace ModelOper return false; } - bool CFDOperatorsTimeModeManager::execProfession() + bool CFDStructOperatorsTimeModeManager::execProfession() { return true; } diff --git a/CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.h b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.h similarity index 56% rename from CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.h rename to CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.h index 37ad131..fe04290 100644 --- a/CFDStruct/CFDOperatorsModel/CFDOperatorsTimeModeManager.h +++ b/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.h @@ -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 diff --git a/CFDStruct/CUIProperty/CUIComboBox.cpp b/CFDStruct/CUIProperty/CUIComboBox.cpp index 53f5e76..2d70545 100644 --- a/CFDStruct/CUIProperty/CUIComboBox.cpp +++ b/CFDStruct/CUIProperty/CUIComboBox.cpp @@ -6,7 +6,6 @@ #include #include #include -#include "CFDStructDataManager/CFDStructDataDefine.h" /** * @brief CUIComboBox::CUIComboBox 构造函数 diff --git a/CFDStruct/CUIProperty/CUIConfig.cpp b/CFDStruct/CUIProperty/CUIConfig.cpp index cd13d91..a25f119 100644 --- a/CFDStruct/CUIProperty/CUIConfig.cpp +++ b/CFDStruct/CUIProperty/CUIConfig.cpp @@ -1,8 +1,6 @@ #include "CUIConfig.h" #include "CUISigsCenter.h" #include -#include "CFDStructDataManager/CFDStructDataDefine.h" -#include "CFDStructDataManager/CFDStructSigsCenter.h" #include /** @@ -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(property[key]); } return QString(); } @@ -151,7 +149,7 @@ QVector CUIConfig::getSub() */ void CUIConfig::setDefault() { - QString type = QVA_FROM_QS(property["type"]); + QString type = qvariant_cast(property["type"]); if(type == "LineEdit") { setDefault("name", ""); setDefault("data_type", "string"); //数据类型 diff --git a/CFDStruct/CUIProperty/CUIPropertyAPI.h b/CFDStruct/CUIProperty/CUIPropertyAPI.h index 5a52efa..23e6f47 100644 --- a/CFDStruct/CUIProperty/CUIPropertyAPI.h +++ b/CFDStruct/CUIProperty/CUIPropertyAPI.h @@ -5,10 +5,19 @@ #include +#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 diff --git a/FlowApp/FlowApp.pro b/FlowApp/FlowApp.pro index 827a97c..5f1c1cb 100644 --- a/FlowApp/FlowApp.pro +++ b/FlowApp/FlowApp.pro @@ -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 \ diff --git a/FlowApp/MainWindowGenerator.cpp b/FlowApp/MainWindowGenerator.cpp index 92b7c0a..7044fb9 100644 --- a/FlowApp/MainWindowGenerator.cpp +++ b/FlowApp/MainWindowGenerator.cpp @@ -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; } diff --git a/FlowApp/main.cpp b/FlowApp/main.cpp index 872e3d3..7ac3bed 100644 --- a/FlowApp/main.cpp +++ b/FlowApp/main.cpp @@ -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 + #include #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"; @@ -47,7 +44,7 @@ int main(int argc, char *argv[]) qputenv("PYTHONPATH", pythonPaths.join(":").toUtf8()); #endif app.checkSystem(new SystemChecker); - // 注册程序的主要组件和设置 + // 注册程序的主要组件和设置 app.regMainWindowGenerator(new MainWindowGenerator); // 注册主窗口生成器 app.regGlobalDataFactory(new GlobalDataFactory); // 注册全局数据工厂 app.regComponentsFactory(new ComponentFactory); // 注册组件工厂