Qwt User's Guide 6.3.0

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
QwtPlotMagnifier Class Reference

QwtPlotMagnifier provides zooming, by magnifying in steps. More...

`#include <qwt_plot_magnifier.h>`

Inheritance diagram for QwtPlotMagnifier:

## Public Slots
virtual void | rescale (double factor) override

## Public Member Functions
| QwtPlotMagnifier (QWidget *)
virtual | ~QwtPlotMagnifier ()
| Destructor.
void | setAxisEnabled (QwtAxisId, bool on)
| En/Disable an axis.
bool | isAxisEnabled (QwtAxisId) const
QWidget * | canvas ()
| Return observed plot canvas.
const QWidget * | canvas () const
| Return Observed plot canvas.
QwtPlot * | plot ()
| Return plot widget, containing the observed plot canvas.
const QwtPlot * | plot () const
| Return plot widget, containing the observed plot canvas.
Public Member Functions inherited from QwtMagnifier
| QwtMagnifier (QWidget *)
virtual | ~QwtMagnifier ()
| Destructor.
QWidget * | parentWidget ()
const QWidget * | parentWidget () const
void | setEnabled (bool)
| En/disable the magnifier.
bool | isEnabled () const
void | setMouseFactor (double)
| Change the mouse factor.
double | mouseFactor () const
void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)
void | getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) const
void | setWheelFactor (double)
| Change the wheel factor.
double | wheelFactor () const
void | setWheelModifiers (Qt::KeyboardModifiers)
Qt::KeyboardModifiers | wheelModifiers () const
void | setKeyFactor (double)
| Change the key factor.
double | keyFactor () const
void | setZoomInKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
void | getZoomInKey (int &key, Qt::KeyboardModifiers &) const
| Retrieve the settings of the zoom in key.
void | setZoomOutKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
void | getZoomOutKey (int &key, Qt::KeyboardModifiers &) const
| Retrieve the settings of the zoom out key.
virtual bool | eventFilter (QObject *, QEvent *) override
| Event filter.

## Additional Inherited Members
Protected Member Functions inherited from QwtMagnifier
virtual void | rescale (double factor)=0
virtual void | widgetMousePressEvent (QMouseEvent *)
virtual void | widgetMouseReleaseEvent (QMouseEvent *)
virtual void | widgetMouseMoveEvent (QMouseEvent *)
virtual void | widgetWheelEvent (QWheelEvent *)
virtual void | widgetKeyPressEvent (QKeyEvent *)
virtual void | widgetKeyReleaseEvent (QKeyEvent *)

## Detailed Description

QwtPlotMagnifier provides zooming, by magnifying in steps.

Using QwtPlotMagnifier a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction.

Together with QwtPlotZoomer and QwtPlotPanner it is possible to implement individual and powerful navigation of the plot canvas.

See also
  QwtPlotZoomer, QwtPlotPanner, QwtPlot

Definition at line 30 of file qwt_plot_magnifier.h.

## Constructor & Destructor Documentation

## ◆ QwtPlotMagnifier()

QwtPlotMagnifier::QwtPlotMagnifier | ( | QWidget * | canvas | ) |
| explicit

Constructor

Parameters

  canvas | Plot canvas to be magnified

Definition at line 30 of file qwt_plot_magnifier.cpp.

## ◆ ~QwtPlotMagnifier()

QwtPlotMagnifier::~QwtPlotMagnifier | ( |  | ) |
| virtual

Destructor.

Definition at line 37 of file qwt_plot_magnifier.cpp.

## Member Function Documentation

## ◆ canvas() [1/2]

QWidget * QwtPlotMagnifier::canvas | ( |  | ) |

Return observed plot canvas.

Definition at line 76 of file qwt_plot_magnifier.cpp.

## ◆ canvas() [2/2]

const QWidget * QwtPlotMagnifier::canvas | ( |  | ) | const

Return Observed plot canvas.

Definition at line 82 of file qwt_plot_magnifier.cpp.

## ◆ isAxisEnabled()

bool QwtPlotMagnifier::isAxisEnabled | ( | QwtAxisId | axisId | ) | const

Test if an axis is enabled

Parameters

  axisId | Axis

Returns
  True, if the axis is enabled

See also
  setAxisEnabled()

Definition at line 67 of file qwt_plot_magnifier.cpp.

## ◆ plot() [1/2]

QwtPlot * QwtPlotMagnifier::plot | ( |  | ) |

Return plot widget, containing the observed plot canvas.

Definition at line 88 of file qwt_plot_magnifier.cpp.

## ◆ plot() [2/2]

const QwtPlot * QwtPlotMagnifier::plot | ( |  | ) | const

Return plot widget, containing the observed plot canvas.

Definition at line 98 of file qwt_plot_magnifier.cpp.

## ◆ rescale

void QwtPlotMagnifier::rescale | ( | double | factor | ) |
| override virtual slot

Zoom in/out the axes scales

Parameters

  factor | A value < 1.0 zooms in, a value > 1.0 zooms out.

Definition at line 111 of file qwt_plot_magnifier.cpp.

## ◆ setAxisEnabled()

void QwtPlotMagnifier::setAxisEnabled | ( | QwtAxisId | axisId,
|  | bool | on )

En/Disable an axis.

Only Axes that are enabled will be zoomed. All other axes will remain unchanged.

Parameters

  axisId | Axis
  on | On/Off

See also
  isAxisEnabled()

Definition at line 53 of file qwt_plot_magnifier.cpp.