|
|
#pragma once
|
|
|
|
|
|
#include "mAlgDefines.h"
|
|
|
#include "iWxPvtBase.h"
|
|
|
#include "mToolPvt_global.h"
|
|
|
|
|
|
namespace Ui {
|
|
|
class iWxPvtSubHeader;
|
|
|
}
|
|
|
|
|
|
class M_TOOL_PVT_EXPORT iWxPvtSubHeader : public iWxPvtBase
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit iWxPvtSubHeader(QWidget *parent = 0);
|
|
|
~iWxPvtSubHeader();
|
|
|
|
|
|
// 根据当前是解析还是数值进行简单调整(该函数在initUI之前)
|
|
|
void adjustUI(bool bAnalMode);
|
|
|
|
|
|
// 初始化
|
|
|
virtual void initUI();
|
|
|
|
|
|
// 返回数据
|
|
|
double getTempBase();
|
|
|
double getPressureBase();
|
|
|
double getGorBase();
|
|
|
VecDouble* getPtrOfValueP();
|
|
|
VecDouble* getPtrOfValueT();
|
|
|
|
|
|
// 文件标识
|
|
|
virtual QString getFilePvtTag();
|
|
|
|
|
|
private:
|
|
|
|
|
|
// 默认值填入
|
|
|
void initDefault();
|
|
|
// signal
|
|
|
void buildSignals();
|
|
|
|
|
|
// 填入最大最小的单位
|
|
|
void fillUnitOfMaxMin();
|
|
|
|
|
|
// 刷新
|
|
|
void refresh();
|
|
|
|
|
|
// 计算压力温度点
|
|
|
void calPressAndTemp();
|
|
|
bool _calIncrement(double& f,
|
|
|
double fMax, double fMin);
|
|
|
bool _calVecOfIncrements(VecDouble& vec,
|
|
|
double fIncrement,
|
|
|
double fMax, double fMin);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent*);
|
|
|
virtual void resizeEvent(QResizeEvent*);
|
|
|
|
|
|
virtual bool eventFilter(QObject* object, QEvent* event);
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void slotChangeIncrements();
|
|
|
void slotMaxMinChanged(QString);
|
|
|
void slotMaxMinStrChanged();
|
|
|
|
|
|
void slotCbxUnitMaxMinChanged(const QString s);
|
|
|
virtual void slotParaValueChanged();
|
|
|
|
|
|
void slotFluidMainOptionClicked(int nIndex);
|
|
|
|
|
|
void on_cbxOil_clicked();
|
|
|
void on_cbxGas_clicked();
|
|
|
void on_cbxWater_clicked();
|
|
|
void on_cbxCondense_clicked();
|
|
|
|
|
|
private:
|
|
|
|
|
|
void onFluidTypeChanged(PvtFluidClass opMain, PvtFluidType opSub);
|
|
|
|
|
|
signals:
|
|
|
|
|
|
/// @brief 当Header涉及到的一些参数数据更改时触发,比如压力数据范围改变
|
|
|
void sigHeaderOptionDataChanged();
|
|
|
|
|
|
/// @brief 当Heade中流体选项发生改变触发
|
|
|
/// @param nMain 大类,常规/特殊/状态方程
|
|
|
/// @param vecSubs 子类,油/气/水/凝析
|
|
|
void sigHeaderOptionFluidChanged(int nMain, VecInt& vecSubs);
|
|
|
|
|
|
private:
|
|
|
|
|
|
Ui::iWxPvtSubHeader *ui;
|
|
|
|
|
|
// 压力数据数组
|
|
|
VecDouble m_vecValueP;
|
|
|
// 温度数据数组,温度是后台计算的。
|
|
|
VecDouble m_vecValueT;
|
|
|
double m_fMaxT; //温度范围,固定:20-400℃ 摄氏度
|
|
|
double m_fMinT;
|
|
|
|
|
|
QString m_sLastUnitMaxMin;
|
|
|
|
|
|
PvtFluidClass m_oPfc;
|
|
|
|
|
|
};
|