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.
67 lines
1.7 KiB
C++
67 lines
1.7 KiB
C++
#ifndef NMDATALAYER_H
|
|
#define NMDATALAYER_H
|
|
|
|
#include "nmData_global.h"
|
|
//#include "ZxDataObjectDbl.h"
|
|
#include "nmDefines.h"
|
|
#include "nmDataAttribute.h"
|
|
#include <QColor>
|
|
|
|
class NM_DATA_EXPORT nmDataLayer : public nmDataBase {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
nmDataLayer();
|
|
nmDataLayer(const nmDataLayer &other);
|
|
virtual ~nmDataLayer();
|
|
nmDataLayer &operator = (const nmDataLayer &other);
|
|
|
|
// 实现 nmDataBase 的抽象方法:将当前 C++ 对象序列化为 RapidJSON Value
|
|
virtual rapidjson::Value ToJsonValue(rapidjson::Document::AllocatorType& allocator) const override;
|
|
// 实现 nmDataBase 的抽象方法:从 RapidJSON Value 反序列化数据到当前 C++ 对象
|
|
virtual void FromJsonValue(const rapidjson::Value& jsonValue) override;
|
|
|
|
static nmDataLayer* getInstance();
|
|
public:
|
|
virtual QString getTableName();
|
|
//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);
|
|
|
|
//virtual QIcon getIcon(bool expanded) const;
|
|
|
|
public:
|
|
void setTop(double value);
|
|
double getTop() const;
|
|
|
|
void setBottom(double value);
|
|
double getBottom() const;
|
|
|
|
void setThickness(double value);
|
|
double getThickness() const;
|
|
|
|
void setIsChecked(bool value);
|
|
bool getIsChecked() const;
|
|
|
|
void setColor(const QColor& value);
|
|
QColor getColor() const;
|
|
|
|
private:
|
|
double m_top; // 储层顶深
|
|
double m_bottom; // 储层底深
|
|
double m_thickness; // 储层厚度
|
|
bool m_isChecked;
|
|
|
|
QColor m_color; // 储层颜色
|
|
|
|
// 单例的指针
|
|
static nmDataLayer* s_instance;
|
|
};
|
|
|
|
#endif // NMDATALAYER_H
|