#include <plotzoomer.h>
Public Member Functions | |
PlotZoomer () | |
PlotZoomer (QWidget *, bool doReplot=true) | |
virtual | ~PlotZoomer () |
Protected Member Functions | |
virtual bool | accept (QPolygon &) const |
Check and correct a selected rectangle. | |
virtual QSizeF | minZoomSize () const override |
Limit zooming by a minimum rectangle. | |
virtual void | widgetMouseMoveEvent (QMouseEvent *event) override |
virtual void | widgetMousePressEvent (QMouseEvent *event) override |
virtual void | widgetMouseReleaseEvent (QMouseEvent *event) override |
Private Attributes | |
QPoint | _initial_pos |
bool | _mouse_pressed |
bool | _zoom_enabled |
Definition at line 7 of file plotzoomer.h.
PlotZoomer::PlotZoomer | ( | QWidget * | canvas, |
bool | doReplot = true |
||
) | [explicit] |
Definition at line 7 of file plotzoomer.cpp.
virtual PlotZoomer::~PlotZoomer | ( | ) | [virtual] |
bool PlotZoomer::accept | ( | QPolygon & | pa | ) | const [protected, virtual] |
Check and correct a selected rectangle.
Reject rectangles with a height or width < 2, otherwise expand the selected rectangle to a minimum size of 11x11 and accept it.
Reimplemented from QwtPlotZoomer.
Definition at line 74 of file plotzoomer.cpp.
QSizeF PlotZoomer::minZoomSize | ( | ) | const [override, protected, virtual] |
Limit zooming by a minimum rectangle.
Reimplemented from QwtPlotZoomer.
Definition at line 91 of file plotzoomer.cpp.
void PlotZoomer::widgetMouseMoveEvent | ( | QMouseEvent * | mouseEvent | ) | [override, protected, virtual] |
Handle a mouse move event for the observed widget.
mouseEvent | Mouse event |
Reimplemented from QwtPicker.
Definition at line 31 of file plotzoomer.cpp.
void PlotZoomer::widgetMousePressEvent | ( | QMouseEvent * | mouseEvent | ) | [override, protected, virtual] |
Handle a mouse press event for the observed widget.
mouseEvent | Mouse event |
Reimplemented from QwtPicker.
Definition at line 15 of file plotzoomer.cpp.
void PlotZoomer::widgetMouseReleaseEvent | ( | QMouseEvent * | me | ) | [override, protected, virtual] |
Qt::MidButton zooms out one position on the zoom stack, Qt::RightButton to the zoom base.
Changes the current position on the stack, but doesn't pop any rectangle.
Reimplemented from QwtPlotZoomer.
Definition at line 66 of file plotzoomer.cpp.
QPoint PlotZoomer::_initial_pos [private] |
Definition at line 25 of file plotzoomer.h.
bool PlotZoomer::_mouse_pressed [private] |
Definition at line 23 of file plotzoomer.h.
bool PlotZoomer::_zoom_enabled [private] |
Definition at line 24 of file plotzoomer.h.