|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxPvtUtilItem.h"
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class iWxPseudoCSub;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class iPseudoCInfo;
|
|
|
|
|
class iCurveDesc;
|
|
|
|
|
class M_TOOL_PVT_EXPORT iWxPseudoCSub : public iWxPvtUtilItem
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxPseudoCSub(QString sMethod, QWidget *parent = 0);
|
|
|
|
|
~iWxPseudoCSub();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void makeSureInitUI();
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 外部调用接口
|
|
|
|
|
QString getMethod() {return m_sMethod; }
|
|
|
|
|
|
|
|
|
|
// Ps3Info相关接口
|
|
|
|
|
virtual void makesureMapPsInfos();
|
|
|
|
|
QMap<QString, iPseudoCInfo*>* getMapPsInfos();
|
|
|
|
|
iPseudoCInfo* getPsInfoBy(QString sName);
|
|
|
|
|
|
|
|
|
|
// 获取特殊数据
|
|
|
|
|
virtual double getSpecialV(QString s);
|
|
|
|
|
|
|
|
|
|
// 文件标识
|
|
|
|
|
virtual QString getFilePvtTag();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initLabels();
|
|
|
|
|
virtual void initUI_Tops();
|
|
|
|
|
virtual void initUI_ChartAndTable();
|
|
|
|
|
virtual QWidget* initUI_Chart();
|
|
|
|
|
virtual QWidget* initUI_TableView();
|
|
|
|
|
virtual void initDefaultData();
|
|
|
|
|
virtual void initPsInfo(iPseudoCInfo*& pInfo);
|
|
|
|
|
|
|
|
|
|
// 表格数据改变,与图形相关内容
|
|
|
|
|
virtual void freshChartByTableChange();
|
|
|
|
|
virtual void refreshChart(VVecVariant& vvec);
|
|
|
|
|
virtual void refreshHitPoint();
|
|
|
|
|
|
|
|
|
|
// 曲线基础操作
|
|
|
|
|
// 配置曲线
|
|
|
|
|
void configCurveDecs(iCurveDesc* pDesc, \
|
|
|
|
|
QString sName, QColor clr, \
|
|
|
|
|
VecDouble& x, VecDouble& y, \
|
|
|
|
|
bool bLineVisible = true, bool bPtVisible = false);
|
|
|
|
|
// 添加曲线
|
|
|
|
|
virtual bool addCurveBy(VecPointF& vecFts, QString sName, \
|
|
|
|
|
bool bLineVisible = true, bool bPtVisible = false, \
|
|
|
|
|
QColor clr = QColor(), bool bUseY2 = false);
|
|
|
|
|
virtual bool addCurveBy(VecDouble& x, VecDouble& y, QString sName, \
|
|
|
|
|
bool bLineVisible = true, bool bPtVisible = false, \
|
|
|
|
|
QColor clr = QColor(), bool bUseY2 = false);
|
|
|
|
|
//virtual void addOrChangeCurveBy(VecPointF& vecRaw, VecPointF& vecFit, bool bFitCurveOnly);
|
|
|
|
|
// 移除指定曲线
|
|
|
|
|
virtual void removeCurveOf(QString sName);
|
|
|
|
|
// 获取曲线名称
|
|
|
|
|
QString getCurveNameOf(int nIndexName, int nIndexSub = -1, bool bFit = false);
|
|
|
|
|
// 对图形进行最后调整
|
|
|
|
|
virtual void adjustPlots(bool bForceLineVisible = false);
|
|
|
|
|
|
|
|
|
|
// 拟合过程封装
|
|
|
|
|
virtual bool runAlgFit(QString sName, VVecVariant vvec, int nType = -1, int nOrder = -1);
|
|
|
|
|
// 清除内容,状态
|
|
|
|
|
void clearAlg(QString sKey);
|
|
|
|
|
|
|
|
|
|
// 通用标识
|
|
|
|
|
virtual bool isFinalPseu();
|
|
|
|
|
virtual bool isFittingNeeded();
|
|
|
|
|
virtual bool isTbDataEditable();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
// void saveBkInfos();
|
|
|
|
|
// void loadBkInfos();
|
|
|
|
|
// QString getBkInfoFile(QString s);
|
|
|
|
|
|
|
|
|
|
// 窗体关闭的情形
|
|
|
|
|
virtual void closeEvent(QCloseEvent *);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
Ui::iWxPseudoCSub *ui;
|
|
|
|
|
|
|
|
|
|
// 初始设定Ps3Info的参数
|
|
|
|
|
QStringList m_listPsInfoKeys;
|
|
|
|
|
// 构造map
|
|
|
|
|
QMap<QString, iPseudoCInfo*> m_mapPsInfos;
|
|
|
|
|
|
|
|
|
|
// 针对的方法标识
|
|
|
|
|
QString m_sMethod;
|
|
|
|
|
|
|
|
|
|
// 坐标轴相关
|
|
|
|
|
QStringList m_listNames;
|
|
|
|
|
QStringList m_listUnits;
|
|
|
|
|
QString m_sTitle;
|
|
|
|
|
|
|
|
|
|
// 初始化标识(为了速度+序列化)
|
|
|
|
|
bool m_bInitUi;
|
|
|
|
|
|
|
|
|
|
// 是否启用Y2
|
|
|
|
|
bool m_bY2Used;
|
|
|
|
|
|
|
|
|
|
// 内部设定
|
|
|
|
|
bool m_bLineVisible;
|
|
|
|
|
bool m_bDotVisible;
|
|
|
|
|
|
|
|
|
|
};
|