diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataManager.cpp index eeee5d4..cdb03df 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataManager.cpp @@ -127,5 +127,9 @@ void CFDStructDataManager::printJson() { Writer writer(buffer); m_dom.Accept(writer); - qDebug() << buffer.GetString(); + freopen(caseJSONPath.c_str(), "w", stdout); + + std::cout << buffer.GetString() << std::endl; + + fclose(stdout); } diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.h index 3665d66..a12eae0 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.h @@ -36,10 +36,10 @@ class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverSportsAttributesItemManager private: // 运动名称 - QString m_MotionName; // Motion Name + QString m_MotionName = ""; // Motion Name // 运动类型 - int m_MotionType; // Motion Type + int m_MotionType = 0; // Motion Type // 运动方式 // json中没有对应位置 diff --git a/CFDStruct/CFDStructMain/CFDStructDefine.h b/CFDStruct/CFDStructMain/CFDStructDefine.h index 764275c..49599df 100644 --- a/CFDStruct/CFDStructMain/CFDStructDefine.h +++ b/CFDStruct/CFDStructMain/CFDStructDefine.h @@ -1,19 +1,20 @@ #ifndef CFDSTRUCTDEFINE_H #define CFDSTRUCTDEFINE_H +#include #include #define QVA_GLOBAL(x) QVariant::fromValue(x) -#define QVA_QS(x) QVariant::fromValue(QString(x)) -#define QVA_FROM_QS(x) qvariant_cast(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) +#define QVAR_DECLARE +Q_DECLARE_METATYPE(int *) +Q_DECLARE_METATYPE(bool *) +Q_DECLARE_METATYPE(double *) +Q_DECLARE_METATYPE(QString *) +Q_DECLARE_METATYPE(QString) #endif // 结构树中节点 @@ -64,5 +65,9 @@ enum class SolutionAnalysisModuleProperty { UNKNOW, }; -#endif // CFDSTRUCTDEFINE_H +// 模板json文件路径 +const std::string templateJSONPath = QCoreApplication::applicationDirPath().toStdString() + "..\\Resources\\template.json"; +// 输出json文件路径 +const std::string caseJSONPath = QCoreApplication::applicationDirPath().toStdString() + "..\\Resources\\case-01.json"; +#endif // CFDSTRUCTDEFINE_H