Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Slots
QwtPlotPanner Class Reference

`#include <qwt_plot_panner.h>`

Inheritance diagram for QwtPlotPanner:
[legend]

List of all members.

## Public Member Functions
| QwtPlotPanner (QwtPlotCanvas *)
virtual | ~QwtPlotPanner ()
QwtPlotCanvas * | canvas ()
const QwtPlotCanvas * | canvas () const
bool | isAxisEnabled (int axis) const
QwtPlot * | plot ()
const QwtPlot * | plot () const
void | setAxisEnabled (int axis, bool on)
Public Member Functions inherited from QwtPanner
| QwtPanner (QWidget *parent)
virtual | ~QwtPanner ()
const QCursor | cursor () const
virtual bool | eventFilter (QObject *, QEvent *)
void | getAbortKey (int &key, int &state) const
void | getMouseButton (int &button, int &buttonState) const
bool | isEnabled () const
bool | isOrientationEnabled (Qt::Orientation) const
Qt::Orientations | orientations () const
void | setAbortKey (int key, int state=Qt::NoButton)
void | setCursor (const QCursor &)
void | setEnabled (bool)
void | setMouseButton (int button, int buttonState=Qt::NoButton)
void | setOrientations (Qt::Orientations)

## Protected Slots
virtual void | moveCanvas (int dx, int dy)

## Additional Inherited Members
Signals inherited from QwtPanner
void | moved (int dx, int dy)
void | panned (int dx, int dy)
Protected Member Functions inherited from QwtPanner
virtual void | paintEvent (QPaintEvent *)
virtual void | widgetKeyPressEvent (QKeyEvent *)
virtual void | widgetKeyReleaseEvent (QKeyEvent *)
virtual void | widgetMouseMoveEvent (QMouseEvent *)
virtual void | widgetMousePressEvent (QMouseEvent *)
virtual void | widgetMouseReleaseEvent (QMouseEvent *)

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

## 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()

## Member Function Documentation

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()

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()

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()