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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ZxDot.h"
|
|
|
|
|
#include "iPlotBaseWxT.h"
|
|
|
|
|
#include "ZxDrawHelper.h"
|
|
|
|
|
|
|
|
|
|
// 曲线类绘图窗体
|
|
|
|
|
class I_PLOTWX_T_EXPORT iPlotCurveWxT : public iPlotBaseWxT
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iPlotCurveWxT(QWidget* parent = 0);
|
|
|
|
|
~iPlotCurveWxT();
|
|
|
|
|
|
|
|
|
|
// 初始化UI
|
|
|
|
|
virtual void initUI(QString sTitle,
|
|
|
|
|
QSize szDefault = QSize(265, 203));
|
|
|
|
|
|
|
|
|
|
// 关联信号
|
|
|
|
|
virtual void connectSignals();
|
|
|
|
|
|
|
|
|
|
// 清空
|
|
|
|
|
virtual void clearAllPlots();
|
|
|
|
|
|
|
|
|
|
// 设置数据
|
|
|
|
|
// 分别对应 压力P 离散D 流量F
|
|
|
|
|
virtual ZxObjCurve* appendSeriesF(VecFloat x, VecFloat y,
|
|
|
|
|
QString sName,
|
|
|
|
|
bool bUseY2 = false);
|
|
|
|
|
virtual ZxObjCurve* appendSeriesD(VecFloat x, VecFloat y,
|
|
|
|
|
QString sName,
|
|
|
|
|
bool bUseY2 = false);
|
|
|
|
|
virtual ZxObjCurve* appendSeriesP(VecFloat x, VecFloat y,
|
|
|
|
|
QString sName,
|
|
|
|
|
bool bUseY2 = false);
|
|
|
|
|
|
|
|
|
|
// 设置画笔相关
|
|
|
|
|
void setPenAndDot(ZxObjCurve* pCurve, bool bLineVisible);
|
|
|
|
|
void setPenAndDot(ZxObjCurve* pCurve, bool bLineVisible, \
|
|
|
|
|
QPen oPen, ZxDot oDot);
|
|
|
|
|
|
|
|
|
|
// 把曲线添加或新建后,刷新坐标轴
|
|
|
|
|
virtual void freshAxisScales(bool bReset = true, bool bMinusPermitted = true);
|
|
|
|
|
virtual void freshAxisYScales(bool bReset = true);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// resize and parint
|
|
|
|
|
virtual void resizeEvent(QResizeEvent *);
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// 右键响应
|
|
|
|
|
virtual void slotShowCurveData(ZxObjCurveBase*);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|