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.
60 lines
1.7 KiB
C
60 lines
1.7 KiB
C
|
3 weeks ago
|
#ifndef NMDATARECTOUTLINE_H
|
||
|
|
#define NMDATARECTOUTLINE_H
|
||
|
|
|
||
|
|
#include "nmData_global.h"
|
||
|
|
|
||
|
|
#include "nmDefines.h"
|
||
|
|
#include "nmDataBase.h"
|
||
|
|
|
||
|
|
|
||
|
|
class NM_DATA_EXPORT nmDataOutline : public nmDataBase {
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
nmDataOutline();
|
||
|
|
nmDataOutline(const nmDataOutline& other); // 拷贝构造函数
|
||
|
|
nmDataOutline& operator=(const nmDataOutline& other); // 赋值运算符
|
||
|
|
~nmDataOutline();
|
||
|
|
|
||
|
|
// 实现 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;
|
||
|
|
|
||
|
|
QString getName();
|
||
|
|
void setName(const QString& sName);
|
||
|
|
|
||
|
|
QVector<QPointF> getOutlinePoints();
|
||
|
|
void setOutlinePoints(const QVector<QPointF>& vecPts);
|
||
|
|
|
||
|
|
QVector<int> getFlowTypeList() const;
|
||
|
|
void setFlowTypeList(const QVector<int>& vecFlowTypeList);
|
||
|
|
|
||
|
|
NM_Data_Outline_Type getOutlineType() const;
|
||
|
|
void setOutlineType(NM_Data_Outline_Type eOutlineType);
|
||
|
|
|
||
|
|
QPointF getCenter() const;
|
||
|
|
void setCenter(const QPointF& ptCenter);
|
||
|
|
|
||
|
|
double getRadius() const;
|
||
|
|
void setRadius(double dRadius);
|
||
|
|
|
||
|
|
bool getPlotVisible() const;
|
||
|
|
void setPlotVisible(const bool newState);
|
||
|
|
|
||
|
|
private:
|
||
|
|
QString m_sName;// 边界名称
|
||
|
|
QVector<QPointF> m_vecPts; // 边界点的数据;
|
||
|
|
QVector<int> m_vFlowTypeList; //边界压力类型
|
||
|
|
|
||
|
|
NM_Data_Outline_Type m_eOutlineType; // 边界类型
|
||
|
|
|
||
|
|
// 对于圆形边界,特殊处理
|
||
|
|
QPointF m_ptCenter; // 圆心
|
||
|
|
double m_dRadius; // 半径
|
||
|
|
|
||
|
|
bool m_bPlotVisible; // 图元是否可见
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // NMDATARECTOUTLINE_H
|