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/ZxDataProject.h

105 lines
2.6 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 "ZxDataObjectStrUser.h"
// 项目项目数据对象类
class M_PROJECTMANAGER_EXPORT ZxDataProject
: public ZxDataObjectStrUser
{
ZX_DECLARE_DYNAMIC
Q_OBJECT
public:
ZxDataProject();
ZxDataProject(const ZxDataProject &other);
virtual ~ZxDataProject();
ZxDataProject &operator = (const ZxDataProject &other);
bool operator == (const ZxDataProject &other) const;
bool operator != (const ZxDataProject &other) const;
public:
// 接口
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;
// 该函数是加载子类对象仅仅加载code之类的关键信息
// 比如在建立树时,创建该节点。
virtual bool createChildren();
virtual bool createChildrenWells();
virtual bool createChildrenJobs();
virtual bool createChildrenPVTs();//注意PVT与井无关此处只是借用
// 重新加载注意PVT与井无关此处只是借用
void reloadChildrenJobs();
void reloadChildrenPVTs();
// 加载数据
virtual bool loadData(VVecVariant& vvec, QString &sLog, bool bTopOneOnly = true);
signals:
// 允许在外部进行工区级别或井级别的孩子节点创建(比如数值试井涉及到的数据)
void sigExtDataObjChildren(ZxDataObject*);
public:
// 对象编码
virtual void setCode(const QString& s);
virtual void setName(const QString& s);
// 数据库类型
void setDbType(const QString& s);
QString getDbType() const;
// 数据库路径
void setDbUrl(const QString& s);
QString getDbUrl() const;
// 版本号
void setDbVer(const QString& s);
QString getDbVer() const;
// 项目描述
void setProjDesc(const QString& s);
QString getProjDesc() const;
// 油田名称
void setFieldName(const QString& s);
QString getFieldName() const;
// 油田编码
void setFieldCode(const QString& s);
QString getFieldCode() const;
protected:
// QString m_sProjName; //项目名称
QString m_sDbType; //数据库类型
QString m_sDbUrl; //数据库路径
QString m_sDbVer; //版本号
QString m_sFieldName; //油田名称
QString m_sFieldCode; //油田编码
QString m_sProjDesc; //项目描述
};