Classes | Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes
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.

Classes

class  PrivateData

Public Member Functions

QWidget * canvas ()
 Return observed plot canvas.
const QWidget * canvas () const
 Return Observed plot canvas.
bool isAxisEnabled (int axis) const
QwtPlotplot ()
 Return plot widget, containing the observed plot canvas.
const QwtPlotplot () const
 Return plot widget, containing the observed plot canvas.
 QwtPlotPanner (QWidget *)
 A panner for the canvas of a QwtPlot.
void setAxisEnabled (int axis, bool on)
 En/Disable an axis.
virtual ~QwtPlotPanner ()
 Destructor.

Protected Slots

virtual void moveCanvas (int dx, int dy)

Protected Member Functions

virtual QBitmap contentsMask () const
virtual QPixmap grab () const

Private Attributes

PrivateDatad_data

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.

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

Definition at line 31 of file qwt_plot_panner.h.


Constructor & Destructor Documentation

QwtPlotPanner::QwtPlotPanner ( QWidget *  canvas) [explicit]

A panner for the canvas of a QwtPlot.

The panner is enabled for all axes

Parameters:
canvasPlot canvas to pan, also the parent object
See also:
setAxisEnabled()

Definition at line 111 of file qwt_plot_panner.cpp.

Destructor.

Definition at line 121 of file qwt_plot_panner.cpp.


Member Function Documentation

QWidget * QwtPlotPanner::canvas ( )

Return observed plot canvas.

Definition at line 160 of file qwt_plot_panner.cpp.

const QWidget * QwtPlotPanner::canvas ( ) const

Return Observed plot canvas.

Definition at line 166 of file qwt_plot_panner.cpp.

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

Calculate a mask from the border path of the canvas

Returns:
Mask as bitmap
See also:
QwtPlotCanvas::borderPath()

Reimplemented from QwtPanner.

Definition at line 246 of file qwt_plot_panner.cpp.

QPixmap QwtPlotPanner::grab ( ) const [protected, virtual]
Returns:
Pixmap with the content of the canvas

Reimplemented from QwtPanner.

Definition at line 257 of file qwt_plot_panner.cpp.

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

Definition at line 151 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:
dxPixel offset in x direction
dyPixel offset in y direction
See also:
QwtPanner::panned()

Definition at line 199 of file qwt_plot_panner.cpp.

Return plot widget, containing the observed plot canvas.

Definition at line 172 of file qwt_plot_panner.cpp.

const QwtPlot * QwtPlotPanner::plot ( ) const

Return plot widget, containing the observed plot canvas.

Definition at line 182 of file qwt_plot_panner.cpp.

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

Definition at line 137 of file qwt_plot_panner.cpp.


Member Data Documentation

Reimplemented from QwtPanner.

Definition at line 56 of file qwt_plot_panner.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:06