Qwt User's Guide 6.0.0
Public Member Functions | Protected Slots | Protected Member Functions

QwtPlotPanner Class Reference

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

#include <qwt_plot_panner.h>

Inheritance diagram for QwtPlotPanner:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 QwtPlotPanner (QwtPlotCanvas *)
virtual ~QwtPlotPanner ()
QwtPlotCanvascanvas ()
const QwtPlotCanvascanvas () const
QwtPlotplot ()
const QwtPlotplot () const
void setAxisEnabled (int axis, bool on)
bool isAxisEnabled (int axis) const

Protected Slots

virtual void moveCanvas (int dx, int dy)

Protected Member Functions

virtual QBitmap contentsMask () const

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:
canvasPlot canvas to pan, also the parent object
See also:
setAxisEnabled()
QwtPlotPanner::~QwtPlotPanner ( ) [virtual]

Destructor.


Member Function Documentation

QwtPlotCanvas * QwtPlotPanner::canvas ( )

Return observed plot canvas.

const QwtPlotCanvas * QwtPlotPanner::canvas ( ) const

Return Observed plot canvas.

QBitmap QwtPlotPanner::contentsMask ( ) const [protected, virtual]

Calculate a mask from the border mask of the canvas

See also:
QwtPlotCanvas::borderMask()

Reimplemented from QwtPanner.

bool QwtPlotPanner::isAxisEnabled ( int  axis) const

Test if an axis is enabled

Parameters:
axisAxis, 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:
dxPixel offset in x direction
dyPixel offset in y direction
See also:
QwtPanner::panned()
const QwtPlot * QwtPlotPanner::plot ( ) const

Return plot widget, containing the observed plot canvas.

QwtPlot * QwtPlotPanner::plot ( )

Return plot widget, containing the observed plot canvas.

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:
axisAxis, see QwtPlot::Axis
onOn/Off
See also:
isAxisEnabled(), moveCanvas()