Qwt User's Guide  6.1.3
QwtPlotPanner Class Reference

QwtPlotPanner provides panning of a plot canvas. More...

#include <qwt_plot_panner.h>

Inheritance diagram for QwtPlotPanner:

Public Member Functions

 QwtPlotPanner (QWidget *)
 A panner for the canvas of a QwtPlot. More...
virtual ~QwtPlotPanner ()
QWidget * canvas ()
 Return observed plot canvas.
const QWidget * canvas () const
 Return Observed plot canvas.
QwtPlotplot ()
 Return plot widget, containing the observed plot canvas.
const QwtPlotplot () const
 Return plot widget, containing the observed plot canvas.
void setAxisEnabled (int axis, bool on)
 En/Disable an axis. More...
bool isAxisEnabled (int axis) const
- Public Member Functions inherited from QwtPanner
 QwtPanner (QWidget *parent)
virtual ~QwtPanner ()
void setEnabled (bool)
 En/disable the panner. More...
bool isEnabled () const
void setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)
void getMouseButton (Qt::MouseButton &button, Qt::KeyboardModifiers &) const
 Get mouse button and modifiers used for panning.
void setAbortKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
void getAbortKey (int &key, Qt::KeyboardModifiers &) const
 Get the abort key and modifiers.
void setCursor (const QCursor &)
const QCursor cursor () const
void setOrientations (Qt::Orientations)
Qt::Orientations orientations () const
 Return the orientation, where paning is enabled.
bool isOrientationEnabled (Qt::Orientation) const
virtual bool eventFilter (QObject *, QEvent *)
 Event filter. More...

Protected Slots

virtual void moveCanvas (int dx, int dy)

Protected Member Functions

virtual QBitmap contentsMask () const
virtual QPixmap grab () const
- Protected Member Functions inherited from QwtPanner
virtual void widgetMousePressEvent (QMouseEvent *)
virtual void widgetMouseReleaseEvent (QMouseEvent *)
virtual void widgetMouseMoveEvent (QMouseEvent *)
virtual void widgetKeyPressEvent (QKeyEvent *)
virtual void widgetKeyReleaseEvent (QKeyEvent *)
virtual void paintEvent (QPaintEvent *)
 Paint event. More...

Additional Inherited Members

- Signals inherited from QwtPanner
void panned (int dx, int dy)
void moved (int dx, int dy)

Detailed Description

QwtPlotPanner provides panning of a plot canvas.

QwtPlotPanner is a panner for a plot canvas, 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.

The axes are not updated, while dragging the canvas
See also
QwtPlotZoomer, QwtPlotMagnifier

Constructor & Destructor Documentation

QwtPlotPanner::QwtPlotPanner ( QWidget *  canvas)

A panner for the canvas of a QwtPlot.

The panner is enabled for all axes

canvasPlot canvas to pan, also the parent object
See also

Member Function Documentation

QBitmap QwtPlotPanner::contentsMask ( ) const

Calculate a mask from the border path of the canvas

Mask as bitmap
See also

Reimplemented from QwtPanner.

QPixmap QwtPlotPanner::grab ( ) const
Pixmap with the content of the canvas

Reimplemented from QwtPanner.

bool QwtPlotPanner::isAxisEnabled ( int  axis) const

Test if an axis is enabled

axisAxis, see QwtPlot::Axis
True, if the axis is enabled
See also
setAxisEnabled(), moveCanvas()
void QwtPlotPanner::moveCanvas ( int  dx,
int  dy 

Adjust the enabled axes according to dx/dy

dxPixel offset in x direction
dyPixel offset in y direction
See also
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.

axisAxis, see QwtPlot::Axis
See also
isAxisEnabled(), moveCanvas()