# QwtPlotMagnifier Class Reference

Inheritance diagram for QwtPlotMagnifier:

[legend]
Collaboration diagram for QwtPlotMagnifier:

[legend]
List of all members.

## 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.

## Public Member Functions

| QwtPlotMagnifier (QwtPlotCanvas *)
virtual | ~QwtPlotMagnifier ()
void | setAxisEnabled (int axis, bool on)
bool | isAxisEnabled (int axis) const
QwtPlotCanvas * | canvas ()
const QwtPlotCanvas * | canvas () const
QwtPlot * | plot ()
const QwtPlot * | plot () const

## Protected Member Functions

virtual void | rescale (double factor)

## Constructor & Destructor Documentation

QwtPlotMagnifier::QwtPlotMagnifier | ( | QwtPlotCanvas * | canvas | ) | `[explicit]`

Constructor

Parameters:

  | canvas | Plot canvas to be magnified

Definition at line 35 of file qwt_plot_magnifier.cpp.

QwtPlotMagnifier::~QwtPlotMagnifier | ( |  | ) | `[virtual]`

Destructor.

Definition at line 42 of file qwt_plot_magnifier.cpp.

## Member Function Documentation

void QwtPlotMagnifier::setAxisEnabled | ( | int | axis,
|  | bool | on |
| ) |  |  |

En/Disable an axis.

Axes that are enabled will be synchronized to the result of panning. All other axes will remain unchanged.

Parameters:

  | axis | Axis, see QwtPlot::Axis
  | on | On/Off

See also:
  isAxisEnabled

Definition at line 58 of file qwt_plot_magnifier.cpp.

bool QwtPlotMagnifier::isAxisEnabled | ( | int | axis | ) | const

Test if an axis is enabled

Parameters:

  | axis | Axis, see QwtPlot::Axis

Returns:
  True, if the axis is enabled

See also:
  setAxisEnabled

Definition at line 72 of file qwt_plot_magnifier.cpp.

Referenced by rescale().

QwtPlotCanvas * QwtPlotMagnifier::canvas | ( |  | ) |

Return observed plot canvas.

Definition at line 81 of file qwt_plot_magnifier.cpp.

Referenced by plot().

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

Return Observed plot canvas.

Definition at line 91 of file qwt_plot_magnifier.cpp.

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

Return plot widget, containing the observed plot canvas.

Definition at line 97 of file qwt_plot_magnifier.cpp.

References canvas().

Referenced by rescale().

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

Return plot widget, containing the observed plot canvas.

Definition at line 111 of file qwt_plot_magnifier.cpp.

void QwtPlotMagnifier::rescale | ( | double | factor | ) | `[protected, virtual]`

Zoom in/out the axes scales

Parameters:

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

Implements QwtMagnifier.

Definition at line 120 of file qwt_plot_magnifier.cpp.

References QwtPlot::autoReplot(), QwtPlot::axisScaleDiv(), isAxisEnabled(), QwtScaleDiv::lBound(), plot(), QwtPlot::replot(), QwtPlot::setAutoReplot(), and QwtPlot::setAxisScale().