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