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++

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 "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之间
double 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;
double m_fValueStartP; //流动段两点对应的压力曲线数据
double m_fValueEndP;
int m_nIndexF; //流动段在流量曲线中索引,其实就是鼠标点中位置
double m_fPrevValueF; //流动段的前一个 流量数据值(非零)
int m_nPrevValueIndex; //前一个值在数据Valuenot pos的索引
// 是否启用光滑和抽稀
bool m_bSmoothing; //是否启用光滑
double m_fSmoothFactor;
bool m_bThinning; //是否启用抽稀
int m_nThinLoop;
bool m_bBuildUp; //是否压恢(上升)
QString m_sSegName;
// 序列化用
double m_fTimeS; //时间域
double m_fTimeE;
QString m_sCurveNameP;
QString m_sCurveNameF;
VVecDouble m_vvecMpData;
bool m_bMultiPhase;
bool m_bTrimmed; //是否裁剪的模式
// 临时,不涉及序列化
// 一旦流动段多于该数则仅仅对当前段进行处理。如果为0则处理所有段
int m_nSegMaxToTrim;
// 临时,不涉及序列化
// int m_nSegThinRatio;
// 临时,不涉及序列化,范围0-50%,末端效应
double m_fTailorOffset;
};