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/iPlot/iPlotCurveT/Commands/ZxCommandZoom.h

42 lines
874 B
C

#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,
double fMaxX,
double fMinX,
ZxSubAxisBase* pAxisY = NULL,
double fMaxY = 0.f,
double fMinY = 0.f,
QUndoCommand* parent = 0);
~ZxCommandZoom();
virtual void redo();
virtual void undo();
private:
ZxSubAxisBase* m_pAxisX;
double m_fMaxX;
double m_fMinX;
double m_fMaxXOld;
double m_fMinXOld;
ZxSubAxisBase* m_pAxisY;
double m_fMaxY;
double m_fMinY;
double m_fMaxYOld;
double m_fMinYOld;
};