You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #pragma once
-
- #include <QPoint>
- #include "qcustomplot.h"
-
- class QRubberBand;
- class QMouseEvent;
- class QWidget;
-
- class CustomPlotZoom : public QCustomPlot
- {
- Q_OBJECT
- public:
- CustomPlotZoom(QWidget* parent = 0);
- virtual ~CustomPlotZoom();
- void setZoomMode(bool mode);
-
- protected:
- void mousePressEvent(QMouseEvent* event);
- void mouseMoveEvent(QMouseEvent* event);
- void mouseReleaseEvent(QMouseEvent* event);
-
- private:
- bool mZoomMode;
- QRubberBand* mRubberBand;
- QPoint mOrigin;
- };
|