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 <QPointF>
|
|
|
|
|
#include <QUndoCommand>
|
|
|
|
|
#include "iPlotCurveT_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxRenderItem;
|
|
|
|
|
class ZxSubAxisBase;
|
|
|
|
|
|
|
|
|
|
// 命令: 视图缩放,主要通过坐标轴范围来实现
|
|
|
|
|
class I_PLOTCURVE_T_EXPORT ZxCommandZoom : \
|
|
|
|
|
public QUndoCommand
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxCommandZoom(ZxSubAxisBase* pAxisX,
|
|
|
|
|
float fMaxX,
|
|
|
|
|
float fMinX,
|
|
|
|
|
ZxSubAxisBase* pAxisY = NULL,
|
|
|
|
|
float fMaxY = 0.f,
|
|
|
|
|
float fMinY = 0.f,
|
|
|
|
|
QUndoCommand* parent = 0);
|
|
|
|
|
~ZxCommandZoom();
|
|
|
|
|
|
|
|
|
|
virtual void redo();
|
|
|
|
|
virtual void undo();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
ZxSubAxisBase* m_pAxisX;
|
|
|
|
|
float m_fMaxX;
|
|
|
|
|
float m_fMinX;
|
|
|
|
|
float m_fMaxXOld;
|
|
|
|
|
float m_fMinXOld;
|
|
|
|
|
|
|
|
|
|
ZxSubAxisBase* m_pAxisY;
|
|
|
|
|
float m_fMaxY;
|
|
|
|
|
float m_fMinY;
|
|
|
|
|
float m_fMaxYOld;
|
|
|
|
|
float m_fMinYOld;
|
|
|
|
|
};
|