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/CFDStructDataManager/CFDStructDataManagerBase.h

39 lines
1.2 KiB
C++

#ifndef CFDSTRUCTDATAMANAGERBASE_H
#define CFDSTRUCTDATAMANAGERBASE_H
#include "CFDStructDataManager_global.h"
#include "CUIProperty/CUIConfig.h"
#include "CUIProperty/CUIDefine.h"
#include "CUIProperty/CUISigsCenter.h"
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#include <QObject>
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataManagerBase : public QObject {
Q_OBJECT
public:
explicit CFDStructDataManagerBase(QObject *parent = nullptr);
~CFDStructDataManagerBase();
// 获取参数界面的配置
virtual CUIConfig *getParamUIConfig();
// 将数据存入dom
virtual void saveDataToDom(rapidjson::Document &dom) = 0;
// 将数据从dom中读出
virtual void readDataFromDom(rapidjson::Document &dom) = 0;
signals:
protected:
CUIConfig *m_uiConfig = nullptr;
CUISigsCenter *m_cuiSigsCenter = nullptr;
protected:
// json的写入
void jsonAdd(rapidjson::Document &document, QVariant value, QVector<QVariant> path);
// 读json
void jsonRead(rapidjson::Document &document, QVariant &value, QVector<QVariant> path);
};
#endif // CFDSTRUCTDATAMANAGERBASE_H