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/mTool/mToolPvt/iWxKrog.h

117 lines
3.1 KiB
C++

#pragma once
#include "iWxPvtUtilItem.h"
namespace Ui {
class iWxKrog;
}
class iPseudo3Info;
class iCurveDesc;
class M_TOOL_PVT_EXPORT iWxKrog : public iWxPvtUtilItem
{
Q_OBJECT
public:
explicit iWxKrog(QWidget *parent = 0);
~iWxKrog();
// 初始化
virtual void initUI();
// 外部调用接口
QString getMethod() {return m_sMethod; }
// Ps3Info相关接口
virtual void makesureMapPsInfos();
QMap<QString, iPseudo3Info*>* getMapPsInfos();
// 获取特殊数据
// virtual double getSpecialV(QString s);
// 文件标识
virtual QString getFilePvtTag();
protected:
// 初始化
virtual void initLabels();
virtual QWidget* initUI_Chart();
virtual QWidget* initUI_TableView();
virtual void initPsInfo(iPseudo3Info*& 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();
// 后台执行拟合
virtual void backFitKrgKro1();
virtual void backFitKrgKro2();
public:
// 序列化
// void saveBkInfos();
// void loadBkInfos();
// QString getBkInfoFile(QString s);
// 窗体关闭的情形
virtual void closeEvent(QCloseEvent *);
protected:
// 初始设定Ps3Info的参数
QStringList m_listPsInfoKeys;
// 构造map
QMap<QString, iPseudo3Info*> m_mapPsInfos;
// 针对的方法标识
QString m_sMethod;
// 坐标轴相关
QStringList m_listNames;
QStringList m_listUnits;
QString m_sTitle;
// 初始化标识(为了速度+序列化)
bool m_bInitUi;
private:
// Ui::iWxKrog *ui;
};