#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 |
Public Member Functions inherited from QwtPlotMagnifier | |
| QWidget * | canvas () |
| Return observed plot canvas. More... | |
| const QWidget * | canvas () const |
| bool | isAxisEnabled (QwtAxisId) const |
| QwtPlot * | plot () |
| Return plot widget, containing the observed plot canvas. More... | |
| const QwtPlot * | plot () const |
| QwtPlotMagnifier (QWidget *) | |
| void | setAxisEnabled (QwtAxisId, bool on) |
| En/Disable an axis. More... | |
| virtual | ~QwtPlotMagnifier () |
| Destructor. More... | |
Public Member Functions inherited from QwtMagnifier | |
| virtual bool | eventFilter (QObject *, QEvent *) QWT_OVERRIDE |
| Event filter. More... | |
| void | getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) const |
| void | getZoomInKey (int &key, Qt::KeyboardModifiers &) const |
| Retrieve the settings of the zoom in key. More... | |
| void | getZoomOutKey (int &key, Qt::KeyboardModifiers &) const |
| Retrieve the settings of the zoom out key. More... | |
| bool | isEnabled () const |
| double | keyFactor () const |
| double | mouseFactor () const |
| QWidget * | parentWidget () |
| const QWidget * | parentWidget () const |
| QwtMagnifier (QWidget *) | |
| void | setEnabled (bool) |
| En/disable the magnifier. More... | |
| void | setKeyFactor (double) |
| Change the key factor. More... | |
| void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier) |
| void | setMouseFactor (double) |
| Change the mouse factor. More... | |
| void | setWheelFactor (double) |
| Change the wheel factor. More... | |
| void | setWheelModifiers (Qt::KeyboardModifiers) |
| void | setZoomInKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| void | setZoomOutKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| double | wheelFactor () const |
| Qt::KeyboardModifiers | wheelModifiers () const |
| virtual | ~QwtMagnifier () |
| Destructor. More... | |
Protected Member Functions | |
| virtual void | widgetMousePressEvent (QMouseEvent *event) override |
Protected Member Functions inherited from QwtMagnifier | |
| virtual void | widgetKeyPressEvent (QKeyEvent *) |
| virtual void | widgetKeyReleaseEvent (QKeyEvent *) |
| virtual void | widgetMouseMoveEvent (QMouseEvent *) |
| virtual void | widgetMouseReleaseEvent (QMouseEvent *) |
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 |
Additional Inherited Members | |
Public Slots inherited from QwtPlotMagnifier |
Definition at line 15 of file plotmagnifier.h.
| Enumerator | |
|---|---|
| X_AXIS | |
| Y_AXIS | |
| BOTH_AXES | |
Definition at line 26 of file plotmagnifier.h.
|
explicit |
Definition at line 16 of file plotmagnifier.cpp.
|
overridevirtual |
Definition at line 26 of file plotmagnifier.cpp.
|
private |
Definition at line 145 of file plotmagnifier.cpp.
|
inlineoverridevirtual |
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 33 of file plotmagnifier.h.
| void PlotMagnifier::rescale | ( | double | factor, |
| AxisMode | axis | ||
| ) |
Definition at line 39 of file plotmagnifier.cpp.
|
signal |
| void PlotMagnifier::setAxisLimits | ( | int | axis, |
| double | lower, | ||
| double | upper | ||
| ) |
Definition at line 30 of file plotmagnifier.cpp.
|
inline |
Definition at line 38 of file plotmagnifier.h.
|
overrideprotectedvirtual |
Handle a mouse press event for the observed widget.
| mouseEvent | Mouse event |
Reimplemented from QwtMagnifier.
Definition at line 158 of file plotmagnifier.cpp.
|
overridevirtual |
Handle a wheel event for the observed widget.
| wheelEvent | Wheel event |
Reimplemented from QwtMagnifier.
Definition at line 152 of file plotmagnifier.cpp.
|
private |
Definition at line 59 of file plotmagnifier.h.
|
private |
Definition at line 58 of file plotmagnifier.h.
|
protected |
Definition at line 48 of file plotmagnifier.h.
|
protected |
Definition at line 51 of file plotmagnifier.h.
|
protected |
Definition at line 49 of file plotmagnifier.h.