#pragma once #include #include #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; };