You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/nmNum/nmSubWxs/nmWxParaProperty.h

72 lines
2.1 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "iDlgBase.h"
#include "nmSubWxs_global.h"
class iGridRowUtils;
// 参数输入/编辑属性对话框窗体
class NM_SUB_WXS_EXPORT nmWxParaProperty : public iDlgBase
{
Q_OBJECT
public:
explicit nmWxParaProperty(QWidget *parent = 0);
~nmWxParaProperty();
// 初始化
virtual void initUI();
void initUI_HelpBox();
/// @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);
// 从各个Wxm_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_pMainLayout;
// 属性参数列表及载体
QStringList m_listParas;
iGridRowUtils* m_pGridItemUtils;
// Help
QTextEdit* m_pHelpBox;
};