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/mTool/mToolPvt/iWxMixMiu.h

92 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 "iDlgBase.h"
#include "mAlgDefines.h"
#include "mToolPvt_global.h"
namespace Ui {
class iWxMixMiu;
}
// 混合黏度计算的对话框
class M_TOOL_PVT_EXPORT iWxMixMiu : public iDlgBase
{
Q_OBJECT
public:
explicit iWxMixMiu(QWidget *parent = 0);
~iWxMixMiu();
virtual void initUI();
/// @brief 初始传递过来的信息
/// @param mapValues, 分别包括 Miuo、Miuw、Fw、Miux
/// @param bEnableMiux, 是否启用
/// @param wft, 相态
bool setMixInfos(const QMap<QString, double>& mapValues, \
const bool bEnableMiux, \
const WellFluidType wft);
/// @brief 返回相关信息
/// @param mapValues, 分别包括 Miuo、Miuw、Fw、Miux
/// @param bEnableMiux, 是否启用
bool getMixInfos(QMap<QString, double>& mapValues, \
bool& bEnableMiux);
/// @brief 由外界调整参数(比如PVT界面修改了Miuo)后自动刷新计算
/// @param mapValues, 分别包括 Miuo、Miuw、Fw、Miux
/// @note 内部已经包括是油气水了
bool freshByParaValue(QMap<QString, double>& mapValues);
public:
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void copyFrom(ZxUiBase* p);
private:
double getParaOf(QString s, QMap<QString, double>* pMapPtr, \
const double dDefault = 0.0);
void makesureFw(double& dFw, const double dMax = 100.0);
void cacheTbxValue2Map(QMap<QString, QVariant>& map, QString sPara, \
QLineEdit* pTbx, QComboBox* pCbxBinding, \
bool bNumber = true, \
bool bIgnoreIfNull = true);
public slots:
void slotCal();
void slotApply();
void slotClose();
void slotSliderChanged(int);
void slotFwEditingFinished();
protected slots:
/// @brief 对于参数/单位绑定的情形,数据编辑,允许外部进行判断是否合理
/// @param sPara 具体哪个参数,英文标识
/// @param baseValue 基准数值,并非显示数值
/// @param bValid 是否有效的数值,返回值
virtual void slotValidateParaInput(const QString sPara, const double baseValue, bool& bValid);
signals:
void sigMixMiuRsts(QMap<QString, double>&, bool);
private:
Ui::iWxMixMiu *ui;
QMap<QString, double> m_mapValues;
WellFluidType m_oWft;
bool m_bEnableMiux;
};