|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <IxDeserialized.h>
|
|
|
|
|
#include "ZxSceneItem.h"
|
|
|
|
|
#include "ZxSerializer.h"
|
|
|
|
|
#include "ZxPlot.h"
|
|
|
|
|
|
|
|
|
|
#include "iPlotCurveT_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxPlotBase;
|
|
|
|
|
class ZxRenderView;
|
|
|
|
|
|
|
|
|
|
// 图表场景
|
|
|
|
|
class I_PLOTCURVE_T_EXPORT tCurvePlotScene
|
|
|
|
|
: public ZxSceneItem
|
|
|
|
|
, public IxDeserialized
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
ZX_DECLARE_DYNAMIC
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
tCurvePlotScene();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void init(ZxRenderView* pView, QString sTitle, \
|
|
|
|
|
QSize szDefault = QSize(265, 203));
|
|
|
|
|
virtual void initMembers(ZxRenderView* pView, QString sTitle);
|
|
|
|
|
virtual void resetLayouts(QSize szDefault);
|
|
|
|
|
|
|
|
|
|
virtual void setBoundEx(int l, int t, int w, int h);
|
|
|
|
|
|
|
|
|
|
//void doLayout();
|
|
|
|
|
|
|
|
|
|
virtual void freshToPlot(ZxPlot* pPlot, ZxRenderView* pView);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialized();
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// 放大/缩小
|
|
|
|
|
virtual void slotZoomRectIn();
|
|
|
|
|
virtual void slotZoomRectOut();
|
|
|
|
|
|
|
|
|
|
virtual void slotZoomRectInH();
|
|
|
|
|
virtual void slotZoomRectInV();
|
|
|
|
|
virtual void slotZoomRectOutH();
|
|
|
|
|
virtual void slotZoomRectOutV();
|
|
|
|
|
|
|
|
|
|
// 移动
|
|
|
|
|
virtual void slotMove();
|
|
|
|
|
|
|
|
|
|
// 复位
|
|
|
|
|
virtual void slotReset();
|
|
|
|
|
|
|
|
|
|
// 选择模式
|
|
|
|
|
virtual void slotHitPoint();
|
|
|
|
|
virtual void slotSelectPoint();
|
|
|
|
|
virtual void slotSelectRect();
|
|
|
|
|
virtual void slotSelect();
|
|
|
|
|
virtual void slotSelectMulti();
|
|
|
|
|
virtual void slotResetRect();
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
|
|
|
virtual void slotErasePoint();
|
|
|
|
|
virtual void slotEraseRect();
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
|
|
|
virtual void slotDelete();
|
|
|
|
|
|
|
|
|
|
// 排除
|
|
|
|
|
virtual void slotExcludePoint();
|
|
|
|
|
virtual void slotExcludeRect();
|
|
|
|
|
|
|
|
|
|
// 插入各种对象
|
|
|
|
|
virtual void slotInsertPolygon();
|
|
|
|
|
virtual void slotInsertCurveFree();
|
|
|
|
|
virtual void slotInsertLine();
|
|
|
|
|
virtual void slotInsertRect();
|
|
|
|
|
virtual void slotInsertText();
|
|
|
|
|
virtual void slotInsertImage();
|
|
|
|
|
virtual void slotInsertBandV();
|
|
|
|
|
virtual void slotInsertBandH();
|
|
|
|
|
|
|
|
|
|
// 显示相关信息
|
|
|
|
|
// virtual void slotShowTip();
|
|
|
|
|
// virtual void slotShowLine();
|
|
|
|
|
|
|
|
|
|
// 具体执行函数
|
|
|
|
|
virtual void slotDoOperate(int nOpType);
|
|
|
|
|
|
|
|
|
|
// 保存位图
|
|
|
|
|
// virtual void slotSaveBmp();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 更新工具条按钮
|
|
|
|
|
virtual void updateBtns();
|
|
|
|
|
virtual void changeCursor(int nOpType);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
void sigUpdateBtns();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxPlot* m_pPlot;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|