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.
nmWATI/Include/iData/iXmlManager/Models/iModelInfoBase.h

72 lines
2.2 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Defines.h"
#include "iXmlBaseItem.h"
/// @brief 模型信息基础
class I_XMLMANAGER_EXPORT iModelInfoBase : public iXmlBaseItem
{
Q_OBJECT
public:
iModelInfoBase(QObject* parent = 0);
~iModelInfoBase();
// 把List分配到成员变量
// 输入开始的m_listValues中index并且返回下一个index
virtual int allocateInfo(int nIndex);
// 备份恢复
virtual bool saveBk();
virtual bool restoreBk();
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
// Super其实就是Parent只是QObject本身有了Parent接口
// 没有直接用QObject的parent接口原因是其child接口不太友好不方便应用
//virtual iModelInfoBase* getSuper();
//virtual void setSuper(iModelInfoBase* p);
protected:
virtual void initXmlTags();
public:
QString m_sAlias; //中文名称
QString m_sSimpleAlias;//由于可能分组,显示是简写,所以增加名称简称
QString m_sIcon; //图标
QString m_sFig; //图片
QString m_sTips; //备注
// 20171120添加
// m_listTags << "NotFitted" << "UseMode" << "ExtInfos";
bool m_bNotFitted; //不参与拟合,界面上灰色显示
ParaUseMode m_oUseMode;// 应用场合ParaUseMode
QStringList m_listExtInfos;//下拉内容
// 如: "封闭;气顶" "封闭;底水"
// 请注意 半角;分割
// 目前仅仅针对聚合物有效,
// 即聚合物中增加了 常规模型 的油藏类型
// 即 常规模型 对于 聚合物来讲属于Brother
bool m_bBrother;
// 与其它参数的关系验证,如 Alias="二区半径" ValidateStr="GT:R1"
QString m_sValidateStr;
// 20240814增加层级支持临时不涉及序列化
//QVector<iModelInfoBase*> m_vecChildren;
//iModelInfoBase* m_pParent;
// 20240930新增暂时不涉及xml文件节点的解析
QVariant m_oValue; //数值(支持类型不限,后续需要完善)
bool m_bValid; //是否有效
bool m_bVisible; //是否可见
};
typedef QVector<iModelInfoBase*> vecModelInfoBasesPtr;