|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iGridRowItemSeg.h"
|
|
|
|
|
|
|
|
|
|
// 流动段数、产液段数
|
|
|
|
|
// 注:界面上显示所有子项,为各自的合计,比如裂缝总长度
|
|
|
|
|
class iParameterSegEx;
|
|
|
|
|
class X_GUI_GRIDPTY_EXPORT iGridRowItemSegEx :
|
|
|
|
|
public iGridRowItemSeg
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iGridRowItemSegEx(iGridRowItem* pParent = NULL);
|
|
|
|
|
~iGridRowItemSegEx();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
// 控件
|
|
|
|
|
virtual void initEditor();
|
|
|
|
|
virtual void setDlgBase(QWidget* p);
|
|
|
|
|
virtual void configEditor();
|
|
|
|
|
virtual void initOtherEditors();
|
|
|
|
|
|
|
|
|
|
// 范围
|
|
|
|
|
virtual void setBounds(QRectF& rt);//全局
|
|
|
|
|
virtual QRectF getRightBounds_Main();//右
|
|
|
|
|
|
|
|
|
|
// 关联绑定的Item,长度
|
|
|
|
|
virtual void setLenAll(float f);
|
|
|
|
|
virtual void setBrotherItem(iGridRowItem* p);
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
// n:段数
|
|
|
|
|
virtual void freshSubChild(int n, bool bBySegCount);
|
|
|
|
|
void recacheParas(int n, iParameterSegEx* p, bool bBySegCount);
|
|
|
|
|
void resetSubItems(int n, iParameterSegEx* p);
|
|
|
|
|
void freshChildsWithSums(bool bByLen); //当前参数
|
|
|
|
|
QMap<QString, double> sumCurParas();
|
|
|
|
|
|
|
|
|
|
// 对于Editor的范围及颜色管理
|
|
|
|
|
virtual void checkAndClr();
|
|
|
|
|
virtual QString getEditorCss(bool bValid);
|
|
|
|
|
virtual bool isInputOk();
|
|
|
|
|
|
|
|
|
|
// 外界传递
|
|
|
|
|
virtual bool setCurValue(QVariant o);
|
|
|
|
|
virtual QVariant getCurValue();
|
|
|
|
|
|
|
|
|
|
// 数据范围,可以在扩展tips信息
|
|
|
|
|
virtual QString getParaScales();
|
|
|
|
|
|
|
|
|
|
// 20240704 新增接口
|
|
|
|
|
// 主要是设计类似流动段这类复合Item的序列化相关
|
|
|
|
|
virtual bool checkAndSetParaValue(QString sPara, QVariant o);
|
|
|
|
|
virtual bool checkAndGetParaValue(QString sPara, QVariant& o);
|
|
|
|
|
// 返回所有参数,Key为英文ID
|
|
|
|
|
virtual bool checkAndGetSubParaValues(QMap<QString, QVariant>& map,
|
|
|
|
|
bool bOnlyFitted = false,
|
|
|
|
|
bool bClearMap = true);
|
|
|
|
|
virtual bool checkAndGetSubParaUnits(QMap<QString, QString>& map,
|
|
|
|
|
bool bOnlyFitted = false,
|
|
|
|
|
bool bClearMap = true);
|
|
|
|
|
virtual bool checkAndOrgaSubResults(QVector<iResultInfo>& vec, QString sType);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
/// @brief 触发子参数列表改变,比如调用水平井段数编辑功能,目前只限于 iGridRowItemSegEx 类型的信号传递
|
|
|
|
|
/// @param sSegName: (in) 基准参数,为英文标识,如流动段数:"Nq"
|
|
|
|
|
/// @param vvec: (in & out) 子参数数据,注意:key为英文,如"NqX","NqL","NqQ"之类,与xml配置文件严格对应
|
|
|
|
|
/// @param dWellLen: (in) 水平井长度
|
|
|
|
|
/// @param bModified: (out) 是否正确触发且vvec发生改变
|
|
|
|
|
void sigSegMore(const QString sSegName, \
|
|
|
|
|
QVector< QMap<QString, double> >& vvec, \
|
|
|
|
|
const double dWellLen, \
|
|
|
|
|
bool& bModified);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
virtual void slotSegCountChanged(int n);
|
|
|
|
|
virtual void slotItemLenthChanged(QString, QVariant);
|
|
|
|
|
|
|
|
|
|
virtual void slotSegMore();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 对于需要调整的,计算其默认的位置
|
|
|
|
|
virtual VecFloat calDefaultPoss(int n, float fLenAll);
|
|
|
|
|
|
|
|
|
|
// 结果
|
|
|
|
|
virtual QVariant getInfoRight();
|
|
|
|
|
virtual QString getInfoUnit();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
QPushButton* m_pBtn;
|
|
|
|
|
|
|
|
|
|
QVector< QMap<QString, double> > m_vvecSubParas;
|
|
|
|
|
|
|
|
|
|
};
|