QwtPlotPanner provides panning of a plot canvas. More...
#include <qwt_plot_panner.h>
Classes | |
class | PrivateData |
Public Member Functions | |
QWidget * | canvas () |
Return observed plot canvas. More... | |
const QWidget * | canvas () const |
Return Observed plot canvas. More... | |
bool | isAxisEnabled (int axis) const |
QwtPlot * | plot () |
Return plot widget, containing the observed plot canvas. More... | |
const QwtPlot * | plot () 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 *) |
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 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 | paintEvent (QPaintEvent *) |
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 | |
PrivateData * | d_data |
Additional Inherited Members | |
Signals inherited from QwtPanner | |
void | moved (int dx, int dy) |
void | panned (int dx, int dy) |
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.
Definition at line 31 of file qwt_plot_panner.h.
|
explicit |
A panner for the canvas of a QwtPlot.
The panner is enabled for all axes
canvas | Plot canvas to pan, also the parent object |
Definition at line 111 of file qwt_plot_panner.cpp.
|
virtual |
Destructor.
Definition at line 121 of file qwt_plot_panner.cpp.
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.
|
protectedvirtual |
Calculate a mask from the border path of the canvas
Reimplemented from QwtPanner.
Definition at line 246 of file qwt_plot_panner.cpp.
|
protectedvirtual |
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
axis | Axis, see QwtPlot::Axis |
Definition at line 151 of file qwt_plot_panner.cpp.
|
protectedvirtualslot |
Adjust the enabled axes according to dx/dy
dx | Pixel offset in x direction |
dy | Pixel offset in y direction |
Definition at line 199 of file qwt_plot_panner.cpp.
QwtPlot * QwtPlotPanner::plot | ( | ) |
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.
axis | Axis, see QwtPlot::Axis |
on | On/Off |
Definition at line 137 of file qwt_plot_panner.cpp.
|
private |
Definition at line 56 of file qwt_plot_panner.h.