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/mGui/mGuiJob/iPseu3Wrapper.h

58 lines
1.3 KiB
C

#pragma once
#include <QObject>
#include <QMap>
#include "IxSerDes.h"
#include "ZxXpf.h"
#include "ZxSerializer.h"
#include "Defines.h"
#include "ZxBaseUtil.h"
#include "mGuiJob_global.h"
class iPseudo3Info;
// 三区拟压力设置相关的序列化载体
class M_GUI_JOB_EXPORT iPseu3Wrapper : public QObject,
virtual public IxSerDes
{
Q_OBJECT
public:
iPseu3Wrapper();
iPseu3Wrapper(const iPseu3Wrapper &other);
~iPseu3Wrapper();
// 初始化、刷新UI
virtual void init();
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
void setInfos(const VVecDouble& vvec, \
const QMap<QString, iPseudo3Info*>& mapPsInfos, \
const QMap<QString, double>& mapOthers);
QMap<QString, iPseudo3Info*>* getPsInfoPtrs();
QMap<QString, double>* getOtherPtrs();
VVecDouble getDataXY();
// 是否有效的三区配置
bool isPs3Valid();
iPseu3Wrapper* clone();
private:
// ByteArray map,序列化的另类实现
bool thisToBa(QByteArray& ba);
bool baToThis(QByteArray& ba);
private slots:
private:
VVecDouble m_vvecDataXY;//size()==2,一列x一列y
QMap<QString, iPseudo3Info*> m_mapPsInfos;
QMap<QString, double> m_mapOthers;
};