|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxBase.h"
|
|
|
|
|
#include "mToolPvt_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxDataPvtInfo;
|
|
|
|
|
class M_TOOL_PVT_EXPORT iWxPvtBase : public iWxBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxPvtBase(QWidget *parent = 0);
|
|
|
|
|
~iWxPvtBase();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 返回数据
|
|
|
|
|
virtual bool getParaValue(QString sPara,
|
|
|
|
|
double &fValue,
|
|
|
|
|
QString sUnitDest = "");
|
|
|
|
|
|
|
|
|
|
//Pseudo
|
|
|
|
|
void setPi(double fPi);
|
|
|
|
|
double getPi();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 20220418 增加PVT的过程序列化处理
|
|
|
|
|
// 以文件方式存储,并且以Job名称为目录标识
|
|
|
|
|
virtual void setJobTag(QString sDir);
|
|
|
|
|
virtual QString getFilePvtTag(); //文件标识
|
|
|
|
|
virtual bool savePvt();
|
|
|
|
|
virtual bool loadPvt();
|
|
|
|
|
virtual QString getFilePvt(bool bLoad);
|
|
|
|
|
virtual ZxDataPvtInfo* getJobPVT(bool bLoad);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 默认值
|
|
|
|
|
virtual void initDefault();
|
|
|
|
|
|
|
|
|
|
// 绑定参数
|
|
|
|
|
void appendParaInfos(QString sPara,
|
|
|
|
|
QWidget* pValue,
|
|
|
|
|
QWidget* pUnit,
|
|
|
|
|
double fDefault = SYS_VALUE_INVALID,
|
|
|
|
|
QString sCurUnit = "");
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent*);
|
|
|
|
|
virtual void resizeEvent(QResizeEvent*);
|
|
|
|
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
virtual void slotParaUnitChanged(QString s);
|
|
|
|
|
virtual void slotParaValueChanged();
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// QMap<QString, QWidget*> m_mapCtrls//借用父类
|
|
|
|
|
QMap<QString, QWidget*> m_mapUnits;
|
|
|
|
|
QMap<QString, QString> m_mapUnitDefaults; //这是算法应用的单位,而不是显示的单位
|
|
|
|
|
QMap<QString, QString> m_mapUnitLasts; //这是上一次显示的单位
|
|
|
|
|
|
|
|
|
|
//Pseudo
|
|
|
|
|
//存储Zgi、Mugi等参数
|
|
|
|
|
double m_fPi;
|
|
|
|
|
|
|
|
|
|
// 默认的存储路径,外部传递过来
|
|
|
|
|
QString m_sJobTag;
|
|
|
|
|
};
|