Qwt User's Guide: QwtPlotPanner Class Reference

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# QwtPlotPanner Class Reference

Inheritance diagram for QwtPlotPanner:

[legend]
Collaboration diagram for QwtPlotPanner:

[legend]
List of all members.

## Detailed Description

QwtPlotPanner provides panning of a plot canvas.

QwtPlotPanner is a panner for a QwtPlotCanvas, that adjusts the scales of the axes after dropping the canvas on its new position.

Together with QwtPlotZoomer and QwtPlotMagnifier powerful ways of navigating on a QwtPlot widget can be implemented easily.

Note:
  The axes are not updated, while dragging the canvas

See also:
  QwtPlotZoomer, QwtPlotMagnifier

Definition at line 32 of file qwt_plot_panner.h.

## Public Member Functions
| QwtPlotPanner (QwtPlotCanvas *)
virtual | ~QwtPlotPanner ()
QwtPlotCanvas * | canvas ()
const QwtPlotCanvas * | canvas () const
QwtPlot * | plot ()
const QwtPlot * | plot () const
void | setAxisEnabled (int axis, bool on)
bool | isAxisEnabled (int axis) const
## Protected Slots
virtual void | moveCanvas (int dx, int dy)

## Constructor & Destructor Documentation

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

  | Create a plot panner. The panner is enabled for all axes Parameters:
  | canvas | Plot canvas to pan, also the parent object
See also: setAxisEnabled Definition at line 38 of file qwt_plot_panner.cpp. References moveCanvas(), and QwtPanner::panned().

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

| Destructor. Definition at line 48 of file qwt_plot_panner.cpp.

## Member Function Documentation

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

| Return Observed plot canvas. Definition at line 97 of file qwt_plot_panner.cpp.

QwtPlotCanvas * QwtPlotPanner::canvas | ( |  | ) |

| Return observed plot canvas. Definition at line 87 of file qwt_plot_panner.cpp. Referenced by plot().

bool QwtPlotPanner::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, moveCanvas Definition at line 78 of file qwt_plot_panner.cpp.

void QwtPlotPanner::moveCanvas | ( | int | dx,
|  | int | dy
| ) | `[protected, virtual, slot]`

  | Adjust the enabled axes according to dx/dy Parameters:
  | dx | Pixel offset in x direction
  | dy | Pixel offset in y direction
See also: QwtPanner::panned Definition at line 130 of file qwt_plot_panner.cpp. References QwtPlot::autoReplot(), QwtPlot::axisScaleDiv(), QwtPlot::canvasMap(), QwtScaleDiv::hBound(), QwtScaleDiv::lBound(), plot(), QwtPlot::setAutoReplot(), QwtPlot::setAxisScale(), and QwtScaleMap::transform(). Referenced by QwtPlotPanner().

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

| Return plot widget, containing the observed plot canvas. Definition at line 117 of file qwt_plot_panner.cpp.

QwtPlot * QwtPlotPanner::plot | ( |  | ) |

| Return plot widget, containing the observed plot canvas. Definition at line 103 of file qwt_plot_panner.cpp. References canvas(). Referenced by moveCanvas().

void QwtPlotPanner::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, moveCanvas Definition at line 64 of file qwt_plot_panner.cpp.