You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/CFDStruct/CFDStructOperatorsModel/CFDStructOperatorsTimeModeM...

62 lines
2.0 KiB
C++

#include "CFDStructOperatorsTimeModeManager.h"
#include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
#include "CFDStruct/CUIProperty/CUI.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructDataManager/CFDStructDataManager.h"
#include "CFDStructDataManager/CFDStructSigsCenter.h"
#include <QLabel>
#include <QDebug>
namespace ModelOper
{
CFDStructOperatorsTimeModeManager::CFDStructOperatorsTimeModeManager()
{
qDebug() << "build Time Mode Manager";
CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance();
connect(sigsCenter, &CFDStructSigsCenter::sig_solverTimeModeDataChanged, this, [ = ]() {
QObject sender;
sender.setObjectName("actionTimeModeEdit");
this->setEmitter(&sender);
this->execGUI();
});
}
CFDStructOperatorsTimeModeManager::~CFDStructOperatorsTimeModeManager()
{
}
bool CFDStructOperatorsTimeModeManager::execGUI()
{
QWidget* widget = nullptr;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
if (mainWindow == nullptr) {
return false;
}
GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget();
if (propertyWidget == nullptr) {
return false;
}
qDebug() << " ---------------------- senderName: " << _senderName;
qDebug() << "Time Mode Manager11111111111";
widget = new QLabel("Time Mode Manager11111");
if (_senderName == "actionTimeModeEdit") {
CUIConfig* uiConfig = CFDStructDataManager::getInstance()->getActionParamUIConfig(1);
// uiConfig->printConfig();
widget = new CUI(nullptr, uiConfig);
}
propertyWidget->setWidget(widget);
return false;
}
bool CFDStructOperatorsTimeModeManager::execProfession()
{
return true;
}
}