|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "iGridRowItemUnt.h"
|
|
|
|
|
|
|
|
|
|
|
|
// 产量段数
|
|
|
|
|
|
class iParameterSeg;
|
|
|
|
|
|
class X_GUI_GRIDPTY_EXPORT iGridRowItemSub :
|
|
|
|
|
|
public iGridRowItemUnt
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
explicit iGridRowItemSub(iGridRowItem* pParent = nullptr);
|
|
|
|
|
|
~iGridRowItemSub();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
|
|
// 控件
|
|
|
|
|
|
virtual void initEditor();
|
|
|
|
|
|
virtual void configEditor();
|
|
|
|
|
|
virtual void initOtherEditors();
|
|
|
|
|
|
|
|
|
|
|
|
// 范围
|
|
|
|
|
|
virtual void setBounds(QRectF& rt);//全局
|
|
|
|
|
|
virtual QRectF getRightBounds_Main();//右
|
|
|
|
|
|
|
|
|
|
|
|
// 对于Editor的范围及颜色管理
|
|
|
|
|
|
virtual void checkAndClr();
|
|
|
|
|
|
virtual QString getEditorCss(bool bValid);
|
|
|
|
|
|
virtual bool isInputOk();
|
|
|
|
|
|
|
|
|
|
|
|
// 外界传递
|
|
|
|
|
|
virtual bool setCurValue(QVariant o);
|
|
|
|
|
|
virtual QVariant getCurValue();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
|
// n:段数
|
|
|
|
|
|
virtual void freshSubChild(int n, bool bBySegCount);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void makesureChildren(int nTargetCount); //在反序列化时如果发现孩子个数不一致,则需要确保
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 创建(多少行/层)子项,为了后续改成表格方便,姑且用Row
|
|
|
|
|
|
/* 第1层(李三)
|
|
|
|
|
|
* 深度 100
|
|
|
|
|
|
* 压力 27
|
|
|
|
|
|
* 渗透率 1.098
|
|
|
|
|
|
* 第2层(王五)
|
|
|
|
|
|
* 深度 110
|
|
|
|
|
|
* 压力 21
|
|
|
|
|
|
* 渗透率 3.098
|
|
|
|
|
|
*/
|
|
|
|
|
|
/// @param nTargetRowCount: (in) 目标是多少行/层
|
|
|
|
|
|
/// @param bResetAll: (in) 是否是否重新生成所有
|
|
|
|
|
|
virtual bool createRowChildren(int nTargetRowCount, bool bResetAll = false);
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 创建子项(第几行/层)比如第一层、第二层的一或二,为了后续改成表格方便,姑且用Row
|
|
|
|
|
|
/* 第1层(李三)
|
|
|
|
|
|
* 深度 100
|
|
|
|
|
|
* 压力 27
|
|
|
|
|
|
* 渗透率 1.098
|
|
|
|
|
|
* 第2层(王五)
|
|
|
|
|
|
* 深度 110
|
|
|
|
|
|
* 压力 21
|
|
|
|
|
|
* 渗透率 3.098
|
|
|
|
|
|
*/
|
|
|
|
|
|
/// @param listSubItemNames: (in) 子项,具体可能需要加序号标识
|
|
|
|
|
|
/// @param listSubItemAliass: (in) 子项别称,具体可能需要加序号标识
|
|
|
|
|
|
/// @param nRowIndex: (in) 当前第几行/层
|
|
|
|
|
|
/// @param bAddNo: (in) 是否需要添加序号标识
|
|
|
|
|
|
virtual bool createOneRowChildOf(const QStringList& listSubItemNames, \
|
|
|
|
|
|
const QStringList& listSubItemAliass, \
|
|
|
|
|
|
int nRowIndex, \
|
|
|
|
|
|
bool bAddNo = true);
|
|
|
|
|
|
|
|
|
|
|
|
/// @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);
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief 允许外部对子项进行调整
|
|
|
|
|
|
/// @param listSubItemNames: (in & out) 调整后的子项
|
|
|
|
|
|
/// @param listSubItemAliass: (in & out) 调整后的子项别称
|
|
|
|
|
|
/// @result 是否已经调整
|
|
|
|
|
|
bool adjustSubItemNames(QStringList& listSubItemNames, \
|
|
|
|
|
|
QStringList& listSubItemAliass);
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
virtual void slotSubCountChanged(int n);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
// 结果
|
|
|
|
|
|
virtual QVariant getInfoRight();
|
|
|
|
|
|
virtual QString getInfoUnit();
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
};
|