|
|
|
@ -1,23 +1,20 @@
|
|
|
|
|
#include "CFDStructDataSolverSportsAttributesManager.h"
|
|
|
|
|
#include "CFDStructDataSolverTimeModeManager.h"
|
|
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
|
#include "CFDStructMain/CFDStructDefine.h"
|
|
|
|
|
#include "CFDStructSigsCenter.h"
|
|
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
|
#include "CUIProperty/CUISigsCenter.h"
|
|
|
|
|
#include <QVariant>
|
|
|
|
|
#include "CFDStructDataSolverSportsAttributesManager.h"
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverSportsAttributesItemManager::CFDStructDataSolverSportsAttributesItemManager(QObject *parent) : CFDStructDataManagerBase(parent)
|
|
|
|
|
{
|
|
|
|
|
CFDStructDataSolverSportsAttributesItemManager::CFDStructDataSolverSportsAttributesItemManager(QObject *parent) : CFDStructDataManagerBase(parent) {
|
|
|
|
|
m_uiConfig = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverSportsAttributesItemManager::~CFDStructDataSolverSportsAttributesItemManager()
|
|
|
|
|
{
|
|
|
|
|
CFDStructDataSolverSportsAttributesItemManager::~CFDStructDataSolverSportsAttributesItemManager() {
|
|
|
|
|
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::getParamUIConfig()
|
|
|
|
|
{
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::getParamUIConfig() {
|
|
|
|
|
|
|
|
|
|
if (m_MotionType == 0)
|
|
|
|
|
return genMovingFrameModeUIConfig();
|
|
|
|
@ -27,13 +24,16 @@ CUIConfig *CFDStructDataSolverSportsAttributesItemManager::getParamUIConfig()
|
|
|
|
|
return genMovingFrameModeUIConfig();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesItemManager::saveDataToDom(rapidjson::Document &dom)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesItemManager::saveDataToDom(rapidjson::Document &dom) {
|
|
|
|
|
jsonAdd(dom, m_id, {"region", 0, "motion", this->getId(), "id"});
|
|
|
|
|
jsonAdd(dom, m_MotionName, {"region", 0, "motion", this->getId(), "meshMotion", "name"});
|
|
|
|
|
jsonAdd(dom, m_MotionType, {"region", 0, "motion", this->getId(), "meshMotion", "MotionType"});
|
|
|
|
|
jsonAdd(dom, m_RotationAxisOrigin, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "origin"});
|
|
|
|
|
jsonAdd(dom, m_RotationAxisDirection, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "axial"});
|
|
|
|
|
jsonAdd(dom, m_RotationSpeed, {"region", 0, "motion", this->getId(), "meshMotion", "rigid", "speed"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genMovingFrameModeUIConfig()
|
|
|
|
|
{
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genMovingFrameModeUIConfig() {
|
|
|
|
|
return new CUIConfig({
|
|
|
|
|
{"type", "Widget"},
|
|
|
|
|
},
|
|
|
|
@ -102,8 +102,7 @@ CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genMovingFrameModeUIC
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genRigidBodyModeUIConfig()
|
|
|
|
|
{
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genRigidBodyModeUIConfig() {
|
|
|
|
|
return new CUIConfig({
|
|
|
|
|
{"type", "Widget"},
|
|
|
|
|
},
|
|
|
|
@ -159,25 +158,37 @@ CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genRigidBodyModeUICon
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverSportsAttributesManager::CFDStructDataSolverSportsAttributesManager(QObject *parent)
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataSolverSportsAttributesItemManager::setId(int id) {
|
|
|
|
|
m_id = id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int CFDStructDataSolverSportsAttributesItemManager::getId() {
|
|
|
|
|
return m_id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverSportsAttributesManager::CFDStructDataSolverSportsAttributesManager(QObject *parent) {
|
|
|
|
|
m_itemList.push_back(new CFDStructDataSolverSportsAttributesItemManager);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributesManager()
|
|
|
|
|
{
|
|
|
|
|
CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributesManager() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesManager::getParamUIConfig()
|
|
|
|
|
{
|
|
|
|
|
CUIConfig *CFDStructDataSolverSportsAttributesManager::getParamUIConfig() {
|
|
|
|
|
return m_itemList[0]->getParamUIConfig();
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesManager::addNewSportAttributesItem()
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataSolverSportsAttributesManager::saveDataToDom(rapidjson::Document &dom) {
|
|
|
|
|
for (auto item : m_itemList) {
|
|
|
|
|
item->saveDataToDom(dom);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesManager::deleteSportAttributesItem(int index)
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataSolverSportsAttributesManager::addNewSportAttributesItem() {
|
|
|
|
|
CFDStructDataSolverSportsAttributesItemManager *item = new CFDStructDataSolverSportsAttributesItemManager;
|
|
|
|
|
item->setId(m_itemList.size());
|
|
|
|
|
m_itemList.push_back(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverSportsAttributesManager::deleteSportAttributesItem(int index) {
|
|
|
|
|
}
|
|
|
|
|