|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "iGridRowItemSubSeg.h"
|
|
|
|
|
|
|
|
|
|
|
|
// 产量段数、产量段数 Nq,注意:有水平段长度L
|
|
|
|
|
|
// 注:界面上显示所有子项,为各自的合计,比如裂缝总长度
|
|
|
|
|
|
//8:Seg流动段模式,扩展模式 具有"SubItems"属性,
|
|
|
|
|
|
// 并且以More按钮形式弹出可视化窗口
|
|
|
|
|
|
class iParameterSegEx;
|
|
|
|
|
|
class X_GUI_GRIDPTY_EXPORT iGridRowItemSubSegEx :
|
|
|
|
|
|
public iGridRowItemSubSeg
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
explicit iGridRowItemSubSegEx(iGridRowItem* pParent = nullptr);
|
|
|
|
|
|
~iGridRowItemSubSegEx();
|
|
|
|
|
|
|
|
|
|
|
|
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(double d);
|
|
|
|
|
|
virtual void setBrotherItem(iGridRowItem* p);
|
|
|
|
|
|
// 关联绑定的产量
|
|
|
|
|
|
virtual void setNqQAll(double d);
|
|
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
|
// n:段数
|
|
|
|
|
|
virtual void freshSubChild(int n, bool bBySegCount);
|
|
|
|
|
|
void recacheParas(int n, iParameterSegEx* p, bool bBySegCount);
|
|
|
|
|
|
void resetSubItems(int n, iParameterSegEx* p);
|
|
|
|
|
|
void freshChildrenWithSums(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);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void makesureChildren(int nTargetCount); //在反序列化时如果发现孩子个数不一致,则需要确保
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 在过程中createRowChildOf允许根据当前数据进行调整某些项
|
|
|
|
|
|
/// @param pItemChild: (in) 待调整的项
|
|
|
|
|
|
/// @param sPara: (in) 子项,具体可能需要加序号标识
|
|
|
|
|
|
/// @param nRowIndex: (in) 当前第几行/层
|
|
|
|
|
|
/// @param nColIndex: (in) 当前行/层的第几个参数,默认为-1,其实与sPara是对应的
|
|
|
|
|
|
virtual bool adjustValueOfRowChild(iGridRowItem* pItemChild, \
|
|
|
|
|
|
const QString sPara, \
|
|
|
|
|
|
int nRowIndex, \
|
|
|
|
|
|
int nColIndex = -1);
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 在过程中createRowChildOf允许调整内部标识
|
|
|
|
|
|
/// @param sTagInner: (in&out) TagInner
|
|
|
|
|
|
/// @param sNameInner: (in&out) NameInner
|
|
|
|
|
|
/// @param nRowIndex: (in) 当前第几行/层
|
|
|
|
|
|
virtual bool adjustTagOfRowChild(QString& sTagInner, \
|
|
|
|
|
|
QString& sNameInner, \
|
|
|
|
|
|
int nRowIndex);
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 在过程中createRowChildOf允许调整内部标识
|
|
|
|
|
|
/// @param sTagInner: (in&out) TagInner
|
|
|
|
|
|
/// @param sNameInner: (in&out) NameInner
|
|
|
|
|
|
/// @param nRowIndex: (in) 当前第几行/层
|
|
|
|
|
|
virtual bool adjustTagOfRowGroup(QString& sTagInner, \
|
|
|
|
|
|
int nRowIndex);
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 触发子参数列表改变,比如调用水平井段数编辑功能,目前只限于 iGridRowItemSubSegEx 类型的信号传递
|
|
|
|
|
|
/// @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 slotSubCountChanged(int n);
|
|
|
|
|
|
virtual void slotItemLenthChanged(QString, QVariant);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void slotSegMore();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
// 对于需要调整的,计算其默认的位置
|
|
|
|
|
|
virtual VecDouble calDefaultPoss(int n, double dLenAll);
|
|
|
|
|
|
|
|
|
|
|
|
// 结果
|
|
|
|
|
|
virtual QVariant getInfoRight();
|
|
|
|
|
|
virtual QString getInfoUnit();
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
iGridRowItem* m_pBrotherItem; //关联的长度Item
|
|
|
|
|
|
double m_dLenAll;
|
|
|
|
|
|
double m_dNqAll;
|
|
|
|
|
|
|
|
|
|
|
|
QPushButton* m_pBtn;
|
|
|
|
|
|
QVector< QMap<QString, double> > m_vvecSubParas;
|
|
|
|
|
|
|
|
|
|
|
|
};
|