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/nmNum/nmData/nmDataDemo.h

115 lines
3.3 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 "nmData_global.h"
#include "ZxDataObjectDbl.h"
#include "nmDefines.h"
// 这是数值试井数据对象的例子
// 对应的表结构参见
/* <Node Alias="n数值样例数据表" Name="N_DATA_DEMO">
<FieldInfo Alias="序号" bKey="1" FieldName="ID"/>
<FieldInfo Alias="井号" FieldName="WellCode"/>
<FieldInfo Alias="储层名称" FieldName="LayerName"/>
<FieldInfo eDataType="2" Alias="储层顶深" FieldName="TopDepth" sUnit="m"/>
<FieldInfo eDataType="2" Alias="储层底深" FieldName="BottomDepth" sUnit="m"/>
<FieldInfo Alias="备注" FieldName="Remark"/>
<FieldInfo Alias="扩展字段1" eDataType="2" FieldName="Ext1" Visible="0"/>
<FieldInfo Alias="扩展字段2" eDataType="2" FieldName="Ext2" Visible="0"/>
<FieldInfo Alias="扩展字段3" eDataType="2" FieldName="Ext3" Visible="0"/>
<FieldInfo Alias="扩展字段4" eDataType="2" FieldName="Ext4" Visible="0"/>
<FieldInfo Alias="扩展字段5" eDataType="2" FieldName="Ext5" Visible="0"/>
</Node> */
//class nmGuiPlot;
class NM_DATA_EXPORT nmDataDemo : public ZxDataObjectDbl
{
ZX_DECLARE_DYNAMIC
public:
nmDataDemo();
nmDataDemo(const nmDataDemo &other);
virtual ~nmDataDemo();
nmDataDemo &operator = (const nmDataDemo &other);
// 获取对象,单例模式
static nmDataDemo* getInstance();
public:
// 接口
virtual ZxDataObject* clone();
virtual QString type() const;
// 表名
virtual QString getTableName();
// 加载保存(数据库部分)
virtual bool _parseData(VecVariant vec, int& n);
virtual bool _sumUpData(VecVariant& vec);
// 序列化(统一序列化为大字段时的处理)
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
// Icon
virtual QIcon getIcon(bool expanded) const;
public:
// 对于参数的set和get处理主要是为了调用方便
void setWellCode(const QString& s);
QString getWellCode() const;
void setTopDepth(const double& d);
double getTopDepth() const;
void setBottomDepth(const double& d);
double getBottomDepth() const;
// 分析名称的Get和Set
void setAnalyzeName(const QString &newAnalyzeName);
const QString &analyzeName() const;
void setAnalyzePVTIndex(int newAnalyzePVTIndex);
int analyzePVTIndex() const;
int analyzeIIIndex() const;
void setAnalyzeIIIndex(int newAnalyzeIIIndex);
const QList<NM_PHASE_TYPE> &analyzeMultiphase() const;
void setAnalyzeMultiphase(const QList<NM_PHASE_TYPE> &newAnalyzeMultiphase);
void *getWxPlot() const;
void setWxPlot(void *newPWxPlot);
protected:
// 与数据库关联的数据,如果父类已经定义,则无需再次定义
//QString m_sID;
QString m_sWellCode;
//QString m_sName;
double m_dTopDepth;
double m_dBottomDepth;
// QDSZ
// 单例的指针
static nmDataDemo* s_instance;
// 绘图相关
void* m_pWxPlot;
// 分析名称
QString m_sAnalyzeName;
// 分析的多相流
QList<NM_PHASE_TYPE> m_analyzeMultiphase;
// 分析的PVT目前只支持选择已经存在的
int m_iAnalyzePVTIndex;
// 分析的相渗,目前只支持选择已经存在的
int m_iAnalyzeIIIndex;
};