#include <plotmagnifier.h>
Signals | |
void | rescaled (QRectF new_size) |
Public Member Functions | |
PlotMagnifier (QWidget *canvas) | |
void | setAxisLimits (int axis, double lower, double upper) |
virtual | ~PlotMagnifier () |
Protected Member Functions | |
virtual void | rescale (double factor) override |
virtual void | widgetMousePressEvent (QMouseEvent *event) override |
virtual void | widgetWheelEvent (QWheelEvent *event) override |
Protected Attributes | |
double | _lower_bounds [QwtPlot::axisCnt] |
QPointF | _mouse_position |
double | _upper_bounds [QwtPlot::axisCnt] |
Private Member Functions | |
QPointF | invTransform (QPoint pos) |
Private Attributes | |
QTimer | _future_emit |
Definition at line 8 of file plotmagnifier.h.
PlotMagnifier::PlotMagnifier | ( | QWidget * | canvas | ) | [explicit] |
Definition at line 7 of file plotmagnifier.cpp.
PlotMagnifier::~PlotMagnifier | ( | ) | [virtual] |
Definition at line 16 of file plotmagnifier.cpp.
QPointF PlotMagnifier::invTransform | ( | QPoint | pos | ) | [private] |
Definition at line 107 of file plotmagnifier.cpp.
void PlotMagnifier::rescale | ( | double | factor | ) | [override, protected, virtual] |
Zoom in/out the axes scales
factor | A value < 1.0 zooms in, a value > 1.0 zooms out. |
Reimplemented from QwtPlotMagnifier.
Definition at line 27 of file plotmagnifier.cpp.
void PlotMagnifier::rescaled | ( | QRectF | new_size | ) | [signal] |
void PlotMagnifier::setAxisLimits | ( | int | axis, |
double | lower, | ||
double | upper | ||
) |
Definition at line 18 of file plotmagnifier.cpp.
void PlotMagnifier::widgetMousePressEvent | ( | QMouseEvent * | mouseEvent | ) | [override, protected, virtual] |
Handle a mouse press event for the observed widget.
mouseEvent | Mouse event |
Reimplemented from QwtMagnifier.
Definition at line 120 of file plotmagnifier.cpp.
void PlotMagnifier::widgetWheelEvent | ( | QWheelEvent * | wheelEvent | ) | [override, protected, virtual] |
Handle a wheel event for the observed widget.
wheelEvent | Wheel event |
Reimplemented from QwtMagnifier.
Definition at line 114 of file plotmagnifier.cpp.
QTimer PlotMagnifier::_future_emit [private] |
Definition at line 35 of file plotmagnifier.h.
double PlotMagnifier::_lower_bounds[QwtPlot::axisCnt] [protected] |
Definition at line 25 of file plotmagnifier.h.
QPointF PlotMagnifier::_mouse_position [protected] |
Definition at line 28 of file plotmagnifier.h.
double PlotMagnifier::_upper_bounds[QwtPlot::axisCnt] [protected] |
Definition at line 26 of file plotmagnifier.h.