|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iSubWndBaseFit.h"
|
|
|
|
|
|
|
|
|
|
class ZxDataGaugeBase;
|
|
|
|
|
class ZxDataObject;
|
|
|
|
|
class iGuiPlotPF;
|
|
|
|
|
class ZxObjBase;
|
|
|
|
|
class ZxObjPoint;
|
|
|
|
|
class ZxObjCurve;
|
|
|
|
|
class iWxRateInsert;
|
|
|
|
|
class iWxOptionSmooth;
|
|
|
|
|
class iWxOptionThinning;
|
|
|
|
|
class iWxPointSelPreview;
|
|
|
|
|
class iWxSwapPF;
|
|
|
|
|
class ZxObjPointEx;
|
|
|
|
|
//class iSubWndBaseFit;
|
|
|
|
|
class iCurveDesc;
|
|
|
|
|
class iWxRunOptionStd;
|
|
|
|
|
class iWxRunOption;
|
|
|
|
|
|
|
|
|
|
class M_SUB_WND_EXPORT iSubWndAnal : public iSubWndBaseFit
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iSubWndAnal(QWidget *parent = 0, QString sExt = "");
|
|
|
|
|
~iSubWndAnal();
|
|
|
|
|
|
|
|
|
|
// 配置窗体
|
|
|
|
|
virtual void configWnd();
|
|
|
|
|
|
|
|
|
|
virtual void loadData(QString sWell = ""); //加载数据
|
|
|
|
|
virtual void runUpdate(); //刷新
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialized();
|
|
|
|
|
|
|
|
|
|
// 保存加载
|
|
|
|
|
virtual bool loadRss();
|
|
|
|
|
virtual bool saveRss();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 命令是否Enabled的状态判断,通常来自Ribbon
|
|
|
|
|
/// @param b (out),true:Enabled false:disabled
|
|
|
|
|
/// @param sName (in),Cmd Name
|
|
|
|
|
/// @param nID (in),Cmd ID
|
|
|
|
|
/// @param bLicensed (in),当前是否有授权
|
|
|
|
|
/// @return 本窗体是否已经进行状态判断(即属于本窗体可执行的命令)
|
|
|
|
|
virtual bool checkCmdEnable(bool &b, \
|
|
|
|
|
QString sName, int nID, \
|
|
|
|
|
bool bLicensed);
|
|
|
|
|
|
|
|
|
|
// 对于缓存已经保存的压力流量进行刷新处理
|
|
|
|
|
virtual void freshByTempSavedPFs();
|
|
|
|
|
|
|
|
|
|
// 对于流动段,在此处考虑模拟选中最后一个流动段
|
|
|
|
|
// 有判断条件的情况下,TODO 20240819
|
|
|
|
|
virtual void simuHitLastSeg(); //模拟点击最后一个流动段
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 拖拽实现,目前暂未起作用
|
|
|
|
|
void resetOneCurveByDrag(ZxDataGaugeBase* p);
|
|
|
|
|
|
|
|
|
|
// 获取两条线的数据点,从图形上取,然后传递给SubWndFitting
|
|
|
|
|
// 20220324 TODO 修改逻辑:保留流量的第一个点,后续需要验证其他地方是否需要相应修改
|
|
|
|
|
bool getPlotCurveDataPF(QVector<QPointF>& vecP, \
|
|
|
|
|
QVector<QPointF>& vecF, \
|
|
|
|
|
QString* pStrCodeF = NULL);
|
|
|
|
|
void removeDupDataP(QVector<QPointF>& vecP, ZxSegmentInfo* pSegInfo = NULL); //压力数据去重
|
|
|
|
|
|
|
|
|
|
bool adjustMultiPhaseDataF(QVector<QPointF>& vecF, \
|
|
|
|
|
VVecDouble& vvecMp, \
|
|
|
|
|
ZxSegmentInfo* pSeg, \
|
|
|
|
|
iJobRun* pJobRun);
|
|
|
|
|
|
|
|
|
|
// 触发WndFitting
|
|
|
|
|
virtual bool runActionOf_ActivateFit(int nID);
|
|
|
|
|
|
|
|
|
|
// 取值
|
|
|
|
|
iGuiPlotPF* getPlotPF();
|
|
|
|
|
|
|
|
|
|
//自适应调整(X轴压力数据不会占满显示范围)
|
|
|
|
|
void autoZoomView();
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
// 申请主窗口创建一个新的窗体
|
|
|
|
|
void sigCreateNextSubWnd(iSubWndBaseAF*& p);
|
|
|
|
|
void sigActivateSubWnd(iSubWnd*& p);
|
|
|
|
|
|
|
|
|
|
// 一旦压力或流量保存之后,则触发其他窗口的刷新
|
|
|
|
|
void sigDataSavedPF(QString sCode);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 加载获取到默认两条数据
|
|
|
|
|
virtual void loadDefaultCurves(QVector<iCurveDesc>& vecCurveData,
|
|
|
|
|
QString sWell = "");
|
|
|
|
|
|
|
|
|
|
// 对压力和流量进行标准零点校正
|
|
|
|
|
virtual void baseAdjustCurves(QVector<iCurveDesc>* pVec);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化UI
|
|
|
|
|
virtual QWidget* initUiMainWx();
|
|
|
|
|
virtual void initUiDockWxs();
|
|
|
|
|
virtual void initPlotPF();
|
|
|
|
|
|
|
|
|
|
// 执行命令:通常来自图形右侧/左侧的工具栏
|
|
|
|
|
virtual bool runActionOf(QString sAction);
|
|
|
|
|
bool runActionOf_EditPF(QString sAction);
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
virtual void updatePlots();
|
|
|
|
|
|
|
|
|
|
// 重新调整工具栏
|
|
|
|
|
virtual void reAdjustToolbar(QToolBar*);
|
|
|
|
|
|
|
|
|
|
// 由子窗体创建RunOption
|
|
|
|
|
virtual iWxRunOptionStd* buildWxRunOption();
|
|
|
|
|
|
|
|
|
|
// 在弹出对话框后判断是否试井设计,并进行相应处理
|
|
|
|
|
virtual void adjustByPossibleDn(iSubWndBaseFit* pWndFitting);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// 调整主体布局
|
|
|
|
|
virtual void slotAdjustPlotPFUis(QSplitter* p);
|
|
|
|
|
|
|
|
|
|
// 双击弹出属性页
|
|
|
|
|
virtual void slotSetPtyVisible(bool b);
|
|
|
|
|
|
|
|
|
|
// 流动段改变
|
|
|
|
|
virtual void slotSegmentChanged(ZxSegmentInfo& o, bool bShowOptionWx);
|
|
|
|
|
|
|
|
|
|
// iWxRunOptionStd对话框OK后触发
|
|
|
|
|
// iJobRun当前的JobRun
|
|
|
|
|
// iSubWnd待应用的SubWnd
|
|
|
|
|
// bool如果为空,则自动新建
|
|
|
|
|
// sNewWndName 新的窗体名称
|
|
|
|
|
virtual void slotJobOptionFinished(iJobRun* pJobRun,
|
|
|
|
|
iSubWnd* pSubWndAim,
|
|
|
|
|
bool bNewIfNull,
|
|
|
|
|
bool bJobRunAlreadyCurrent,
|
|
|
|
|
QString sNewWndName);
|
|
|
|
|
|
|
|
|
|
// 数据加载信号相应
|
|
|
|
|
virtual void slotPfObjSaved(ZxDataGaugeBase* p);
|
|
|
|
|
|
|
|
|
|
// Rate加点
|
|
|
|
|
void slotRateInsertPt(ZxObjBase* p);
|
|
|
|
|
|
|
|
|
|
// 当前窗体所有信息的保存,比如关闭时提问的保存
|
|
|
|
|
virtual bool slotSaveAll();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////
|
|
|
|
|
// 增加拟合点的处理
|
|
|
|
|
|
|
|
|
|
// 获取另一个Plot
|
|
|
|
|
ZxPlot* getBrotherPlot(ZxPlot* pPlot);
|
|
|
|
|
|
|
|
|
|
// 查询x方向的点,并存入Map
|
|
|
|
|
virtual bool findHitPoints(ZxPlot* pPlot, double& x, \
|
|
|
|
|
QMap<ZxObjCurve*, QPointF>& mapHits, \
|
|
|
|
|
bool bP, bool bConsiderBrother);
|
|
|
|
|
// 从map中的曲线获取屏幕坐标点x的范围
|
|
|
|
|
virtual void checkCurveXBounds(double& min, double& max, \
|
|
|
|
|
QMap<ZxObjCurve*, QPointF>& mapHits);
|
|
|
|
|
virtual void checkOneCurveXBound(ZxObjCurve* p, double& min, double& max);
|
|
|
|
|
// 添加到点
|
|
|
|
|
virtual QVector<ZxObjPointEx *> addHitPoints(double& min, double& max, \
|
|
|
|
|
QMap<ZxObjCurve*, QPointF>& mapHits);
|
|
|
|
|
////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 绘图相关
|
|
|
|
|
iGuiPlotPF* m_pWxPlotPF;
|
|
|
|
|
|
|
|
|
|
//轴标题(表头)、单位
|
|
|
|
|
// QStringList m_listTags;
|
|
|
|
|
// QStringList m_listUnits;
|
|
|
|
|
|
|
|
|
|
// 临时
|
|
|
|
|
//ZxObjPoint* m_pRateInsertPt;
|
|
|
|
|
iWxOptionSmooth* m_pWxSmooth;
|
|
|
|
|
iWxOptionThinning* m_pWxThinning;
|
|
|
|
|
iWxPointSelPreview* m_pWxPsPreview;
|
|
|
|
|
iWxRateInsert* m_pWxRateInsert;
|
|
|
|
|
iWxSwapPF* m_pWxSwapPF;
|
|
|
|
|
|
|
|
|
|
// 临时,不需序列化,为了区分ANal和AnalDn
|
|
|
|
|
bool m_bTableVisible;
|
|
|
|
|
|
|
|
|
|
};
|