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/mData/mProjectManager/DataModels/ZxDataOther.h

94 lines
2.6 KiB
C

#pragma once
#include "ZxDataObjectBin.h"
#include "zxDataOtherItem.h"
// 这是针对新疆 试井之星 软件的特殊处理数据对象
// 从新疆 试井之星 后台mdb文件的两张表加载数据时
// 把部分MPA/WTAI需要的数据加载分发至MPA/WTAI的数据表中
// 把MPA/WTAI未涉及的数据放在本数据对象中进行处理
class M_PROJECTMANAGER_EXPORT ZxDataOther
: public ZxDataObjectBin
{
ZX_DECLARE_DYNAMIC
public:
ZxDataOther();
ZxDataOther(const ZxDataOther &other);
virtual ~ZxDataOther();
ZxDataOther &operator = (const ZxDataOther &other);
bool operator == (const ZxDataOther &other) const;
bool operator != (const ZxDataOther &other) const;
public:
// 组织为一行数据包括Obj头
bool setRowInfos(VecVariant& vec);
bool getRowInfos(VecVariant& vec);
bool getBaseInfos(QStringList& listNames, \
QStringList& listUnits, \
QStringList& listAlias);
/// @brief 准备好数据后填入Obj仅仅是具体数据不包括头
/// @param vec:数据
bool setParasData(const QVector<zxDataOtherItem>& vec);
bool getParasData(QVector<zxDataOtherItem>& vec);
/// @brief 从大字段里面解析出来具体的参数数据
/// @param sPara:传入的参数,
/// 以英文方式,比如"h" "Ct"等,大小写不敏感
/// @param f:返回值,如果有
bool getValueOfPara(QString s, double& d);
bool getValueOfPara(QString s, QVariant& o);
// 接口
virtual ZxDataObject* clone();
virtual QString type() const;
// 加载保存
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:
virtual void setCode(const QString &sCode);
virtual void setName(const QString &sName);
void setWellCode(const QString& sWellCode);
QString getWellCode() const;
void setDataTestDate(const QString& s);
QString getDataTestDate() const;
void setOtherWellData(const QByteArray& v);
QByteArray getOtherWellData() const;
void setOtherBlockData(const QByteArray& v);
QByteArray getOtherBlockData() const;
protected:
//QString m_sID; //ID号
QString m_sWellCode; //井号
QString m_sDataTestDate;
QByteArray m_byteOtherWellData;
QByteArray m_byteOtherBlockData;
QVector<zxDataOtherItem> m_vecItems;//对应WellData+BlockData
};