|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxBase.h"
|
|
|
|
|
#include "mGuiJob_global.h"
|
|
|
|
|
|
|
|
|
|
//class iModelDesc;
|
|
|
|
|
class iParameter;
|
|
|
|
|
class ZxTableView;
|
|
|
|
|
class iModelOption;
|
|
|
|
|
class iBdyInfo;
|
|
|
|
|
class iGridRowItem;
|
|
|
|
|
class iGridRowUtils;
|
|
|
|
|
|
|
|
|
|
class M_GUI_JOB_EXPORT iWxModelParameter : public iWxBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit iWxModelParameter(QWidget *parent = 0);
|
|
|
|
|
~iWxModelParameter();
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
void initUI_HelpBox();
|
|
|
|
|
|
|
|
|
|
// 在pCtrl InitUI之前允许部分调整,如参数跟着模型走的调整
|
|
|
|
|
// 包括:
|
|
|
|
|
// 1. 把原有的被特殊模型修改过的,重新矫正过来
|
|
|
|
|
// 2. 调整特殊模型
|
|
|
|
|
virtual void adjustParaInfos(iParameter* pParameter);
|
|
|
|
|
virtual void restoreParaInfos(iParameter* pParameter = NULL); //如果为空,则全部恢复
|
|
|
|
|
|
|
|
|
|
// 组织结果数据,注:vec不进行clear,由调用方自行clear
|
|
|
|
|
virtual bool organizeResults(QVector<iResultInfo>& vec, QString sType);
|
|
|
|
|
bool sortByShow(QVector<iResultInfo>& vec);
|
|
|
|
|
|
|
|
|
|
// 返回所有的跟模型相关的边界参数的类型,封闭或定压
|
|
|
|
|
// 封闭:0
|
|
|
|
|
// 定压:1
|
|
|
|
|
bool getBdyInfos(QMap<QString, int>& map);
|
|
|
|
|
|
|
|
|
|
// 从各个Wx(m_vecWxDatas)中遍历查找
|
|
|
|
|
virtual bool setParaValue(QString sPara, double d);
|
|
|
|
|
virtual bool getParaValue(QString sPara, double& d);
|
|
|
|
|
// 返回所有参数,Key为英文ID
|
|
|
|
|
virtual bool getAllParaValues(QMap<QString, double>& map,
|
|
|
|
|
bool bOnlyFitted = false,
|
|
|
|
|
bool bClearMap = true);
|
|
|
|
|
|
|
|
|
|
virtual bool getAllParaUnits(QMap<QString, QString>& map,
|
|
|
|
|
bool bOnlyFitted = false,
|
|
|
|
|
bool bClearMap = true);
|
|
|
|
|
// 模式设置
|
|
|
|
|
void setDnMode(bool b);
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
virtual void refreshUIs(QStringList& listParas);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
//增加信号保证切换的时候,窗口中的参数显示与否的按钮初始化(即恢复到隐藏状态)
|
|
|
|
|
void sigWxImageInit();
|
|
|
|
|
void sigIsAddBt(bool IsAdd);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
void slotShowParam(bool bHide);
|
|
|
|
|
|
|
|
|
|
public :
|
|
|
|
|
// 当前面窗体参数改变时,本窗体响应
|
|
|
|
|
virtual void slotParasObtained(QMap<QString, QVariant>& map);
|
|
|
|
|
// 根据多相单相对右侧参数进行调整
|
|
|
|
|
void setToMpMode(bool bMultiPhase);
|
|
|
|
|
|
|
|
|
|
void freshParasByMap(QMap<QString, QVariant>& mapOldValues);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
virtual void slotParasObtainedEx(iModelOption* pOption);
|
|
|
|
|
|
|
|
|
|
// 响应ParaCtrl数据的改变
|
|
|
|
|
virtual void slotParaCtrlValueChanged(QString sPara, QVariant o);
|
|
|
|
|
|
|
|
|
|
// help msg
|
|
|
|
|
virtual void slotHelpMsg(QString& s);
|
|
|
|
|
|
|
|
|
|
// 外部控制
|
|
|
|
|
void slotOuterValidate(QString sPara, QVariant o, bool& bValid, bool& bSet);
|
|
|
|
|
|
|
|
|
|
/// @brief 响应属性页子参数列表改变,比如调用水平井段数编辑功能
|
|
|
|
|
/// @param sSegName: (in) 基准参数,为英文标识,如流动段数:"Nq"
|
|
|
|
|
/// @param vvec: (in & out) 子参数数据,
|
|
|
|
|
/// 注意:key为英文,如"NqX","NqL","NqQ"之类,与xml配置文件严格对应
|
|
|
|
|
/// @param dWellLen: (in) 水平井长度
|
|
|
|
|
/// @param bModified: (out) 是否正确触发且vvec发生改变
|
|
|
|
|
void slotSegItemMore(const QString sSegName, \
|
|
|
|
|
QVector<QMap<QString, double> >& vvec, \
|
|
|
|
|
const double dWellLen, \
|
|
|
|
|
bool& bModified);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 响应边界信息改变,比如修改平行边界,由上下改为左右
|
|
|
|
|
/// @param pItem: (in) 当前的GroupItem,其实即是本类iGridRowGroupBdy
|
|
|
|
|
/// @param vvec: (in & out) 边界信息数据
|
|
|
|
|
/// @param bModified: (out) 是否正确触发且vvec发生改变
|
|
|
|
|
void slotBdyDetails(iGridRowItem* pItem, \
|
|
|
|
|
QVector< iBdyInfo* >& vvec, \
|
|
|
|
|
bool& bModified);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
//virtual void makesureListParas(QStringList& listParas); //对显示名称进行调整
|
|
|
|
|
virtual void runParseOldVersion(QStringList& listParas, ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
QStringList checkTypes(); //类别
|
|
|
|
|
|
|
|
|
|
// 部分没有在xml配置的参数
|
|
|
|
|
void appendParas_Inner(QStringList& listParas, \
|
|
|
|
|
iModelOption* pOption);
|
|
|
|
|
// 井储参数
|
|
|
|
|
void appendParas_Wbs(QStringList& listParas, \
|
|
|
|
|
QString sWbs);
|
|
|
|
|
// 边界参数
|
|
|
|
|
void appendParas_Bdy(QStringList& listParas, \
|
|
|
|
|
QString sBdy);
|
|
|
|
|
|
|
|
|
|
// 根据当前选中模型处理特殊参数
|
|
|
|
|
void findSpecialParas();
|
|
|
|
|
|
|
|
|
|
//设置参数隐藏
|
|
|
|
|
void setSpecialParasHide(bool &IsAdd);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 布局器
|
|
|
|
|
QVBoxLayout* m_pMainLayout;
|
|
|
|
|
|
|
|
|
|
QStringList m_listParas;
|
|
|
|
|
iGridRowUtils* m_pGridItemUtils;
|
|
|
|
|
|
|
|
|
|
// 临时,不序列化
|
|
|
|
|
QStringList m_listParaTags;
|
|
|
|
|
|
|
|
|
|
// 临时
|
|
|
|
|
QString m_sSerie;
|
|
|
|
|
QString m_sWbs;
|
|
|
|
|
QString m_sWel;
|
|
|
|
|
QString m_sRes;
|
|
|
|
|
QString m_sBdy;
|
|
|
|
|
|
|
|
|
|
// 满足当前模型条件的特殊的Parameter
|
|
|
|
|
QVector<iParameter*> m_vecSpecialParas;
|
|
|
|
|
|
|
|
|
|
bool m_bDnMode;
|
|
|
|
|
|
|
|
|
|
bool m_bMultiPhase;
|
|
|
|
|
|
|
|
|
|
// Help
|
|
|
|
|
QTextEdit * m_pHelpBox;
|
|
|
|
|
};
|