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/mGui/mGuiPlot/ZxSegmentInfo.h

93 lines
2.5 KiB
C

#pragma once
#include "Defines.h"
#include "ZxBaseUtil.h"
#include "IxSerDes.h"
#include "ZxXpf.h"
#include "ZxSerializer.h"
#include "mGuiPlot_global.h"
class ZxDataGaugeP;
class ZxDataGaugeF;
// 选定的流动段对应的信息
class M_GUI_PLOT_EXPORT ZxSegmentInfo : public QObject,
virtual public IxSerDes
{
Q_OBJECT
public:
ZxSegmentInfo();
void copyFrom(ZxSegmentInfo* p);
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
void on_cbxUseSmoothing_clicked();
void on_cbxUseThinning_clicked();
QString getSegTypeCH();
QString getBaseDesc();
int fuzzyThinLoop();
bool singleSegDataPF(QVector<QPointF>& vecP, QVector<QPointF>& vecF);
bool isSwapMode(QVector<QPointF>& vecF);
// 尾部效应比例0-1之间
float getTailorOffset();
/// @brief 确定了流动段、压降/压恢之后,对前一流量进行调整确认
/// @param vecPoss (in) 流量曲线屏幕坐标信息 (该参数废弃 TODO 20240919
/// @param vecValuesF (in) 流量曲线实际数值点信息
/// @note 两个数组大小很可能不一致
bool verifyPrevValueF(/*QVector<QPointF>& vecPoss, */QVector<QPointF>& vecValuesF);
public:
int m_nIndexStartP; //流动段在压力曲线数据的位置索引第几个点从0开始
int m_nIndexEndP;
float m_fValueStartP; //流动段两点对应的压力曲线数据
float m_fValueEndP;
int m_nIndexF; //流动段在流量曲线中索引,其实就是鼠标点中位置
float m_fPrevValueF; //流动段的前一个 流量数据值(非零)
int m_nPrevValueIndex; //前一个值在数据Valuenot pos的索引
// 是否启用光滑和抽稀
bool m_bSmoothing; //是否启用光滑
float m_fSmoothFactor;
bool m_bThinning; //是否启用抽稀
int m_nThinLoop;
bool m_bBuildUp; //是否压恢(上升)
QString m_sSegName;
// 序列化用
float m_fTimeS; //时间域
float m_fTimeE;
QString m_sCurveNameP;
QString m_sCurveNameF;
VVecFloat m_vvecMpData;
bool m_bMultiPhase;
bool m_bTrimmed; //是否裁剪的模式
// 临时,不涉及序列化
// 一旦流动段多于该数则仅仅对当前段进行处理。如果为0则处理所有段
int m_nSegMaxToTrim;
// 临时,不涉及序列化
// int m_nSegThinRatio;
// 临时,不涉及序列化,范围0-50%,末端效应
float m_fTailorOffset;
};