Qwt User's Guide  5.2.3
Public Member Functions | Protected Slots
QwtPlotPanner Class Reference

#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
bool isAxisEnabled (int axis) const
QwtPlotplot ()
const QwtPlotplot () 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:
canvasPlot 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:
axisAxis, see QwtPlot::Axis
Returns:
True, if the axis is enabled
See also:
setAxisEnabled(), moveCanvas()
void QwtPlotPanner::moveCanvas ( int  dx,
int  dy 
)
protectedvirtualslot

Adjust the enabled axes according to dx/dy

Parameters:
dxPixel offset in x direction
dyPixel 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:
axisAxis, see QwtPlot::Axis
onOn/Off
See also:
isAxisEnabled(), moveCanvas()