|
|
#ifndef NMNEWDLG_H
|
|
|
#define NMNEWDLG_H
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
#include "nmSubWxs_global.h"
|
|
|
|
|
|
class iGridRowUtils;
|
|
|
|
|
|
class NM_SUB_WXS_EXPORT nmNewDlg : public iDlgBase
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
explicit nmNewDlg(QWidget *parent = 0);
|
|
|
~nmNewDlg();
|
|
|
|
|
|
// 初始化
|
|
|
virtual void initUI();
|
|
|
// 渲染各个属性
|
|
|
void renderComponents();
|
|
|
|
|
|
/// @brief 刷新参数属性载体的入口
|
|
|
/// @param listParas (in) 参数列表,可以是英文也可以是中文
|
|
|
/// @param bReserveOlds (in) 是否保留原来,比如原先属性页已经有s和k,这时候新的列表里面也包括s和k
|
|
|
/// @note 参数列表必须是在系统中配置的参数,listParas已经包括了显示顺序
|
|
|
/// 但对于层级,由系统配置来决定,具体咨询wzg
|
|
|
virtual void refreshUIs(QStringList& listParas, bool bReserveOlds = true);
|
|
|
|
|
|
// 允许备份/恢复原有的参数内容
|
|
|
virtual void backupOldParas(QMap<QString, QVariant>& map, \
|
|
|
QStringList& listParas);
|
|
|
virtual void restoreOldParas(QMap<QString, QVariant>& map);
|
|
|
|
|
|
// 从各个Wx(m_vecWxDatas)中遍历查找
|
|
|
virtual bool setParaValue(QString sPara, QVariant o);
|
|
|
virtual bool getParaValue(QString sPara, QVariant& o);
|
|
|
|
|
|
// 返回所有参数,Key为英文ID
|
|
|
virtual bool getAllParaValues(QMap<QString, QVariant>& map,
|
|
|
bool bOnlyFitted = false,
|
|
|
bool bClearMap = true);
|
|
|
|
|
|
virtual bool getAllParaUnits(QMap<QString, QString>& map,
|
|
|
bool bOnlyFitted = false,
|
|
|
bool bClearMap = true);
|
|
|
|
|
|
// 序列化
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
// help msg
|
|
|
virtual void slotHelpMsg(QString& s);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
// 布局器
|
|
|
QVBoxLayout* m_mainLayout;
|
|
|
|
|
|
// 属性参数列表及载体
|
|
|
QStringList m_listParas;
|
|
|
iGridRowUtils* m_pGridItemUtils;
|
|
|
};
|
|
|
|
|
|
#endif // NMNEWDLG_H
|