#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 |
Return Observed plot canvas. More... | |
bool | isAxisEnabled (int axis) const |
QwtPlot * | plot () |
Return plot widget, containing the observed plot canvas. More... | |
const QwtPlot * | plot () const |
Return plot widget, containing the observed plot canvas. More... | |
QwtPlotMagnifier (QWidget *) | |
void | setAxisEnabled (int axis, 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 9 of file plotmagnifier.h.
Enumerator | |
---|---|
X_AXIS | |
Y_AXIS | |
BOTH_AXES |
Definition at line 20 of file plotmagnifier.h.
|
explicit |
Definition at line 9 of file plotmagnifier.cpp.
|
overridevirtual |
Definition at line 18 of file plotmagnifier.cpp.
|
private |
Definition at line 128 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 27 of file plotmagnifier.h.
void PlotMagnifier::rescale | ( | double | factor, |
AxisMode | axis | ||
) |
Definition at line 31 of file plotmagnifier.cpp.
|
signal |
void PlotMagnifier::setAxisLimits | ( | int | axis, |
double | lower, | ||
double | upper | ||
) |
Definition at line 22 of file plotmagnifier.cpp.
|
inline |
Definition at line 32 of file plotmagnifier.h.
|
overrideprotectedvirtual |
Handle a mouse press event for the observed widget.
mouseEvent | Mouse event |
Reimplemented from QwtMagnifier.
Definition at line 141 of file plotmagnifier.cpp.
|
overridevirtual |
Handle a wheel event for the observed widget.
wheelEvent | Wheel event |
Reimplemented from QwtMagnifier.
Definition at line 135 of file plotmagnifier.cpp.
|
private |
Definition at line 53 of file plotmagnifier.h.
|
private |
Definition at line 52 of file plotmagnifier.h.
|
protected |
Definition at line 42 of file plotmagnifier.h.
|
protected |
Definition at line 45 of file plotmagnifier.h.
|
protected |
Definition at line 43 of file plotmagnifier.h.