|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "iGridRowItemSub.h"
|
|
|
|
|
|
|
|
|
|
|
|
// 常规的Sub,比如层数据
|
|
|
|
|
|
/* 第1层(李三)
|
|
|
|
|
|
* 深度 100
|
|
|
|
|
|
* 压力 27
|
|
|
|
|
|
* 渗透率 1.098
|
|
|
|
|
|
* 第2层(王五)
|
|
|
|
|
|
* 深度 110
|
|
|
|
|
|
* 压力 21
|
|
|
|
|
|
* 渗透率 3.098
|
|
|
|
|
|
*/
|
|
|
|
|
|
class X_GUI_GRIDPTY_EXPORT iGridRowItemSubNormal :
|
|
|
|
|
|
public iGridRowItemSub
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
explicit iGridRowItemSubNormal(iGridRowItem* pParent = nullptr);
|
|
|
|
|
|
~iGridRowItemSubNormal();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
|
|
// 控件
|
|
|
|
|
|
virtual void initEditor();
|
|
|
|
|
|
virtual void configEditor();
|
|
|
|
|
|
virtual void initOtherEditors();
|
|
|
|
|
|
virtual bool isInputOk();
|
|
|
|
|
|
|
|
|
|
|
|
virtual void setParameter(iParameter* p);
|
|
|
|
|
|
|
|
|
|
|
|
// 根据当前数据,构造默认的数据体
|
|
|
|
|
|
virtual void defaultSubInfos();
|
|
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
|
// n:数
|
|
|
|
|
|
virtual void freshSubChild(int n, bool bBySegCount);
|
|
|
|
|
|
|
|
|
|
|
|
// 从外部设置数据
|
|
|
|
|
|
virtual void setAllSubInfos(QStringList& listTagRows, \
|
|
|
|
|
|
VVecVariant& vvec, \
|
|
|
|
|
|
bool bReadonly = true, \
|
|
|
|
|
|
bool bExpanded = false);
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
QStringList m_listTagRows;
|
|
|
|
|
|
VVecVariant m_vvecSubInfos;
|
|
|
|
|
|
};
|