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.
nmWTAI-Platform/Include/nmNum/nmData/nmDataPerforation.h

147 lines
5.2 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.

#ifndef NMDATAPERFORATION_H
#define NMDATAPERFORATION_H
#include "nmData_global.h"
#include "nmDataBase.h"
#include "nmDataAttribute.h"
#include <QList>
#include <QStringList>
#include <QDateTime>
// 流动段数据结构
struct NM_DATA_EXPORT FlowSegmentData {
nmDataAttribute startTime; // 开始时间
nmDataAttribute skinValue; // 表皮系数
nmDataAttribute segmentStart; // 流动段开始时间
nmDataAttribute segmentEnd; // 流动段结束时间
nmDataAttribute dSdQ; // dS/dq值流量段相关参数
bool isSelected; // 是否选中状态
FlowSegmentData();
FlowSegmentData(const nmDataAttribute& start, const nmDataAttribute& skin,
const nmDataAttribute& segStart, const nmDataAttribute& segEnd,
bool selected = false);
FlowSegmentData(const nmDataAttribute& start, const nmDataAttribute& skin,
const nmDataAttribute& segStart, const nmDataAttribute& segEnd,
const nmDataAttribute& dSdq, bool selected = false);
};
// 射孔段
class NM_DATA_EXPORT nmDataPerforation : public nmDataBase
{
Q_OBJECT
public:
nmDataPerforation();
nmDataPerforation(const nmDataPerforation& other); // 拷贝构造函数
nmDataPerforation& operator=(const nmDataPerforation& other); // 赋值运算符
~nmDataPerforation();
// 实现 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;
public:
// Getter and Setter for m_name (射孔名称)
nmDataAttribute& getName();
void setName(const nmDataAttribute& name);
// Getter and Setter for m_mdStart (测深起点)
nmDataAttribute& getMdStart();
void setMdStart(const nmDataAttribute& mdStart);
// Getter and Setter for m_mdEnd (测深终点)
nmDataAttribute& getMdEnd();
void setMdEnd(const nmDataAttribute& mdEnd);
// Getter and Setter for m_skin (表皮系数)
nmDataAttribute& getSkin();
void setSkin(const nmDataAttribute& skin);
// 表皮系数与流量关系
nmDataAttribute& getSkin0();
void setSkin0(const nmDataAttribute& skin0);
nmDataAttribute& getdSkindq();
void setdSkindq(const nmDataAttribute& dSkindq);
// 线条位置相关
nmDataAttribute& getLinePoint1X();
nmDataAttribute& getLinePoint1Y();
nmDataAttribute& getLinePoint2X();
nmDataAttribute& getLinePoint2Y();
void setLinePoint1X(const nmDataAttribute& value);
void setLinePoint1Y(const nmDataAttribute& value);
void setLinePoint2X(const nmDataAttribute& value);
void setLinePoint2Y(const nmDataAttribute& value);
void setLinePositions(double x1, double y1, double x2, double y2);
void getLinePositions(double& x1, double& y1, double& x2, double& y2) const;
// 流动段管理
const QVector<FlowSegmentData>& getFlowSegments() const;
void setFlowSegments(const QVector<FlowSegmentData>& segments);
int getSelectedSegmentIndex() const;
void setSelectedSegmentIndex(int index);
bool isSnapToRateChangesEnabled() const;
void setSnapToRateChangesEnabled(bool enabled);
bool isRateDependentEnabled() const;
void setRateDependentEnabled(bool enabled);
bool isShowDatesEnabled() const;
void setShowDatesEnabled(bool enabled);
QDateTime getStartDateTime() const;
void setStartDateTime(const QDateTime& dateTime);
// 射孔封堵管理
QList<double> getTimeValues() const;
void setTimeValues(const QList<double>& timeValues);
QStringList getTimeStates() const;
void setTimeStates(const QStringList& timeStates);
QDateTime getBaseTime() const;
void setBaseTime(const QDateTime& baseTime);
// 射孔段级别的流动段查询
int findFlowSegmentByTime(double timePoint) const;
private:
nmDataAttribute m_name; // 射孔名称
nmDataAttribute m_mdStart; // 测深起点
nmDataAttribute m_mdEnd; // 测深终点
nmDataAttribute m_skin; // 表皮系数
// 表皮系数与流量关系数据
nmDataAttribute m_skin0; // 基础表皮系数
nmDataAttribute m_dSkindq; // dSkin/dq值
// 线条位置数据
nmDataAttribute m_linePoint1X, m_linePoint1Y; // 线条第一点
nmDataAttribute m_linePoint2X, m_linePoint2Y; // 线条第二点
// 流动段数据
QVector<FlowSegmentData> m_flowSegments; // 流动段数据集合
int m_selectedSegmentIndex; // 当前选中的流动段索引
bool m_isSnapToRateChanges; // 对齐到流动段
bool m_isRateDependentEnabled; // 是否启用流量依赖选项
bool m_showDatesEnabled; // 是否显示日期
QDateTime m_startDateTime; // 开始时间
// 射孔封堵数据
QList<double> m_timeValues; // 时间值数组(以小时为基准单位)
QStringList m_timeStates; // 对应的状态数组
QDateTime m_baseTime; // 基准时间
};
#endif // NMDATAPERFORATION_H