#include <plotmagnifier.h>

Public Types | |
| enum | AxisMode { X_AXIS, Y_AXIS, BOTH_AXES } |
Signals | |
| void | rescaled (QRectF new_size) |
Public Member Functions | |
| PlotMagnifier (QWidget *canvas) | |
| virtual void | rescale (double factor) override |
| void | rescale (double factor, AxisMode axis) |
| void | setAxisLimits (int axis, double lower, double upper) |
| void | setDefaultMode (AxisMode mode) |
| virtual void | widgetWheelEvent (QWheelEvent *event) override |
| virtual | ~PlotMagnifier () override |
Protected Member Functions | |
| virtual void | widgetMousePressEvent (QMouseEvent *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 | |
| AxisMode | _default_mode |
| QTimer | _future_emit |
Definition at line 9 of file plotmagnifier.h.
Definition at line 20 of file plotmagnifier.h.
| PlotMagnifier::PlotMagnifier | ( | QWidget * | canvas | ) | [explicit] |
Definition at line 8 of file plotmagnifier.cpp.
| PlotMagnifier::~PlotMagnifier | ( | ) | [override, virtual] |
Definition at line 19 of file plotmagnifier.cpp.
| QPointF PlotMagnifier::invTransform | ( | QPoint | pos | ) | [private] |
Definition at line 120 of file plotmagnifier.cpp.
| virtual void PlotMagnifier::rescale | ( | double | factor | ) | [inline, override, 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 22 of file plotmagnifier.h.
| void PlotMagnifier::rescale | ( | double | factor, |
| AxisMode | axis | ||
| ) |
Definition at line 30 of file plotmagnifier.cpp.
| void PlotMagnifier::rescaled | ( | QRectF | new_size | ) | [signal] |
| void PlotMagnifier::setAxisLimits | ( | int | axis, |
| double | lower, | ||
| double | upper | ||
| ) |
Definition at line 21 of file plotmagnifier.cpp.
| void PlotMagnifier::setDefaultMode | ( | AxisMode | mode | ) | [inline] |
Definition at line 27 of file plotmagnifier.h.
| 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 133 of file plotmagnifier.cpp.
| void PlotMagnifier::widgetWheelEvent | ( | QWheelEvent * | wheelEvent | ) | [override, virtual] |
Handle a wheel event for the observed widget.
| wheelEvent | Wheel event |
Reimplemented from QwtMagnifier.
Definition at line 127 of file plotmagnifier.cpp.
AxisMode PlotMagnifier::_default_mode [private] |
Definition at line 45 of file plotmagnifier.h.
QTimer PlotMagnifier::_future_emit [private] |
Definition at line 44 of file plotmagnifier.h.
double PlotMagnifier::_lower_bounds[QwtPlot::axisCnt] [protected] |
Definition at line 34 of file plotmagnifier.h.
QPointF PlotMagnifier::_mouse_position [protected] |
Definition at line 37 of file plotmagnifier.h.
double PlotMagnifier::_upper_bounds[QwtPlot::axisCnt] [protected] |
Definition at line 35 of file plotmagnifier.h.