|
|
|
|
#include "CFDStructMainWindow.h"
|
|
|
|
|
|
|
|
|
|
#include "GUIFrame/PropertyWidget.h"
|
|
|
|
|
|
|
|
|
|
#include "FITK_Kernel/FITKCore/FITKAbstractGUIObject.h"
|
|
|
|
|
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonMainWindow.h"
|
|
|
|
|
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonPannelItem.h"
|
|
|
|
|
|
|
|
|
|
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonBar.h"
|
|
|
|
|
#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonApplicationButton.h>
|
|
|
|
|
#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonQuickAccessBar.h>
|
|
|
|
|
#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonTabBar.h>
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
//CFDStructMainWindow::CFDStructMainWindow() : GUI::MainWindow()
|
|
|
|
|
//{
|
|
|
|
|
// qDebug()<<"new CFSStructMainWindow";
|
|
|
|
|
//}
|
|
|
|
|
//
|
|
|
|
|
//void CFDStructMainWindow::initCentralWidget() {
|
|
|
|
|
// qDebug() << "CFDStruct iniCentralWidget";
|
|
|
|
|
//
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
using namespace GUI;
|
|
|
|
|
|
|
|
|
|
CFDStructMainWindow::CFDStructMainWindow() {
|
|
|
|
|
qDebug() << "new Empty CFDStructMainWindow";
|
|
|
|
|
initMainWindowMenu();
|
|
|
|
|
initCentralWidget();
|
|
|
|
|
initPropertyWidget();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setWindowTitle("TF-CFlow");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::initPropertyWidget() {
|
|
|
|
|
//m_PropertyWidget->setWidget();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::initMainWindowMenu() {
|
|
|
|
|
|
|
|
|
|
initApplicationButton();
|
|
|
|
|
|
|
|
|
|
addSARibbonCategoryGeometry();
|
|
|
|
|
addSARibbonCategoryMesh();
|
|
|
|
|
addSARibbonCategoryCalculation();
|
|
|
|
|
addSARibbonCategoryPostProcessing();
|
|
|
|
|
addSARibbonCategoryTool();
|
|
|
|
|
addSARibbonCategoryCivilAircraftTemplateLibrary();
|
|
|
|
|
|
|
|
|
|
_ribbonBar->setCurrentIndex(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryGeometry() {
|
|
|
|
|
QString type = tr("Geometry");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryMesh() {
|
|
|
|
|
QString type = tr("Mesh");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryCalculation() {
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>µı<C2B5>ǩ
|
|
|
|
|
QString type = tr("Calculation");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QAction* action = nullptr;
|
|
|
|
|
|
|
|
|
|
//pannel <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
SARibbonPannel* pannel = gategory->addPannel(tr("Simulation Run"));
|
|
|
|
|
//action = getAction("actionImportGeometry");
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ͼ<EFBFBD><CDBC> "<22><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>"
|
|
|
|
|
action = createAction(tr("Start Calculation"), "actionStartCalculation", ":/icons/createbox.png", tr("Start Calculation"));
|
|
|
|
|
//<2F><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>С
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>"
|
|
|
|
|
pannel = gategory->addPannel(tr("Import and Export"));
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
action = createAction(tr("Mesh Import"), "actionMeshImport", ":/icons/createbox.png", tr("Mesh Import"));
|
|
|
|
|
//"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>"
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>"<22><><EFBFBD><EFBFBD>"
|
|
|
|
|
action = createAction(tr("Import"), "actionImport", ":/icons/createsphere.png", tr("Import"));
|
|
|
|
|
//"<22><><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>"
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
pannel = gategory->addPannel(tr("Solver Settings"));
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> ʱ<><CAB1>ģʽ
|
|
|
|
|
action = createAction(tr("Time Mode"), "actionTimeMode", ":/icons/BoolFause.png", tr("Time Mode"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
|
|
|
|
action = createAction(tr("Basic Model"), "actionBasicModel", ":/icons/BoolCut.png", tr("Basic Model"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> ճ<><D5B3>ģ<EFBFBD><C4A3>
|
|
|
|
|
action = createAction(tr("Viscosity Model"), "actionViscosityModel", ":/icons/BoolCommon.png", tr("Viscosity Model"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Numerical Method"), "actionNumericalMethod", ":/icons/BoolCommon.png", tr("Numerical Method"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20>˶<EFBFBD><CBB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Motion Properties"), "actionMotionProperties", ":/icons/BoolCommon.png", tr("Motion Properties"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22>߽<EFBFBD><DFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>"
|
|
|
|
|
pannel = gategory->addPannel(tr("Boundary Conditions and Initial Conditions"));
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20>߽<EFBFBD><DFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Boundary Conditions"), "actionBoundaryConditions", ":/icons/BoolCommon.png", tr("Boundary Conditions"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20>ο<EFBFBD><CEBF><EFBFBD>
|
|
|
|
|
action = createAction(tr("Reference Quantities"), "actionReferenceQuantities", ":/icons/BoolCommon.png", tr("Reference Quantities"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><>ʼ<EFBFBD><CABC>
|
|
|
|
|
action = createAction(tr("Initialization"), "actionInitialization", ":/icons/BoolCommon.png", tr("Initialization"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
pannel = gategory->addPannel(tr("Computational Control"));
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Computational Control"), "actionComputational Control", ":/icons/Computational Control.png", tr("Computational Control"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
pannel = gategory->addPannel(tr("Monitors"));
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20>в<EFBFBD>
|
|
|
|
|
action = createAction(tr("Residuals"), "actionResiduals", ":/icons/Residuals.png", tr("Residuals"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Aerodynamic Forces"), "actionAerodynamicForces", ":/icons/AerodynamicForces.png", tr("Aerodynamic Forces"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC> <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
action = createAction(tr("Summary"), "actionSummary", ":/icons/Summary.png", tr("Summary"));
|
|
|
|
|
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryPostProcessing() {
|
|
|
|
|
QString type = tr("Post Processing");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryTool() {
|
|
|
|
|
QString type = tr("Tool");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructMainWindow::addSARibbonCategoryCivilAircraftTemplateLibrary() {
|
|
|
|
|
QString type = tr("CivilAircraft Template sLibrary");
|
|
|
|
|
SARibbonCategory* gategory = _ribbonBar->addCategoryPage(type);
|
|
|
|
|
_ribbonBar->raiseCategory(gategory);
|
|
|
|
|
}
|