Classes | Public Slots | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtPlotPanner Class Reference

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

#include <qwt_plot_panner.h>

Inheritance diagram for QwtPlotPanner:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Slots

virtual void moveCanvas (int dx, int dy)
 

Public Member Functions

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

Protected Member Functions

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

Private Attributes

PrivateDatad_data
 

Additional Inherited Members

- Signals inherited from QwtPanner
void moved (int dx, int dy)
 
void panned (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.

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 129 of file qwt_plot_panner.cpp.

QwtPlotPanner::~QwtPlotPanner ( )
virtual

Destructor.

Definition at line 139 of file qwt_plot_panner.cpp.

Member Function Documentation

QWidget * QwtPlotPanner::canvas ( )

Return observed plot canvas.

Definition at line 178 of file qwt_plot_panner.cpp.

const QWidget * QwtPlotPanner::canvas ( ) const

Return Observed plot canvas.

Definition at line 184 of file qwt_plot_panner.cpp.

QBitmap QwtPlotPanner::contentsMask ( ) const
protectedvirtual

Calculate a mask from the border path of the canvas

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

Reimplemented from QwtPanner.

Definition at line 264 of file qwt_plot_panner.cpp.

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

Reimplemented from QwtPanner.

Definition at line 275 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 169 of file qwt_plot_panner.cpp.

void QwtPlotPanner::moveCanvas ( int  dx,
int  dy 
)
virtualslot

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 217 of file qwt_plot_panner.cpp.

QwtPlot * QwtPlotPanner::plot ( )

Return plot widget, containing the observed plot canvas.

Definition at line 190 of file qwt_plot_panner.cpp.

const QwtPlot * QwtPlotPanner::plot ( ) const

Return plot widget, containing the observed plot canvas.

Definition at line 200 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 155 of file qwt_plot_panner.cpp.

Member Data Documentation

PrivateData* QwtPlotPanner::d_data
private

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 Sun Dec 6 2020 04:02:50