QwtPlotPanner provides panning of a plot canvas.
More...
#include <qwt_plot_cache_panner.h>
|
| virtual void | moveCanvas (int dx, int dy) |
| | Adjust the enabled axes according to dx/dy.
|
| |
|
| | QwtPlotCachePanner (QWidget *) |
| | A panner for the canvas of a QwtPlot.
|
| |
|
virtual | ~QwtPlotCachePanner () |
| | Destructor.
|
| |
|
QWidget * | canvas () |
| | Return observed plot canvas.
|
| |
|
const QWidget * | canvas () const |
| | Return Observed plot canvas.
|
| |
|
QwtPlot * | plot () |
| | Return plot widget, containing the observed plot canvas.
|
| |
|
const QwtPlot * | plot () const |
| | Return plot widget, containing the observed plot canvas.
|
| |
| void | setAxisEnabled (QwtAxisId axisId, bool on) |
| | En/Disable an axis.
|
| |
| bool | isAxisEnabled (QwtAxisId) const |
| | Test if an axis is enabled.
|
| |
| | QwtCachePanner (QWidget *parent) |
| | Creates an panner that is enabled for the left mouse button.
|
| |
|
virtual | ~QwtCachePanner () |
| | Destructor.
|
| |
| void | setEnabled (bool) |
| | En/disable the panner.
|
| |
| bool | isEnabled () const |
| |
|
void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier) |
| | Change the mouse button and modifiers used for panning The defaults are Qt::LeftButton and Qt::NoModifier.
|
| |
|
void | getMouseButton (Qt::MouseButton &button, Qt::KeyboardModifiers &) const |
| | Get mouse button and modifiers used for panning.
|
| |
| void | setAbortKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| | Change the abort key The defaults are Qt::Key_Escape and Qt::NoModifiers.
|
| |
|
void | getAbortKey (int &key, Qt::KeyboardModifiers &) const |
| | Get the abort key and modifiers.
|
| |
| void | setCursor (const QCursor &) |
| | Change the cursor, that is active while panning The default is the cursor of the parent widget.
|
| |
| const QCursor | cursor () const |
| |
| void | setOrientations (Qt::Orientations) |
| | Set the orientations, where panning is enabled The default value is in both directions: Qt::Horizontal | Qt::Vertical.
|
| |
|
Qt::Orientations | orientations () const |
| | Return the orientation, where panning is enabled.
|
| |
| bool | isOrientationEnabled (Qt::Orientation) const |
| |
| virtual bool | eventFilter (QObject *, QEvent *) QWT_OVERRIDE |
| | Event filter.
|
| |
|
| virtual QBitmap | contentsMask () const QWT_OVERRIDE |
| | Calculate a mask from the border path of the canvas.
|
| |
| virtual QPixmap | grab () const QWT_OVERRIDE |
| |
| virtual void | widgetMousePressEvent (QMouseEvent *) |
| | Handle a mouse press event for the observed widget.
|
| |
| virtual void | widgetMouseReleaseEvent (QMouseEvent *) |
| | Handle a mouse release event for the observed widget.
|
| |
| virtual void | widgetMouseMoveEvent (QMouseEvent *) |
| | Handle a mouse move event for the observed widget.
|
| |
| virtual void | widgetKeyPressEvent (QKeyEvent *) |
| | Handle a key press event for the observed widget.
|
| |
| virtual void | widgetKeyReleaseEvent (QKeyEvent *) |
| | Handle a key release event for the observed widget.
|
| |
| virtual void | paintEvent (QPaintEvent *) QWT_OVERRIDE |
| | Paint event.
|
| |
|
| void | panned (int dx, int dy) |
| | Signal emitted, when panning is done.
|
| |
| void | moved (int dx, int dy) |
| | Signal emitted, while the widget moved, but panning is not finished.
|
| |
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
◆ QwtPlotCachePanner()
| QwtPlotCachePanner::QwtPlotCachePanner |
( |
QWidget * |
canvas | ) |
|
|
explicit |
A panner for the canvas of a QwtPlot.
The panner is enabled for all axes
- Parameters
-
| canvas | Plot canvas to pan, also the parent object |
- See also
- setAxisEnabled()
◆ contentsMask()
| QBitmap QwtPlotCachePanner::contentsMask |
( |
| ) |
const |
|
protectedvirtual |
◆ grab()
| QPixmap QwtPlotCachePanner::grab |
( |
| ) |
const |
|
protectedvirtual |
- Returns
- Pixmap with the content of the canvas
Reimplemented from QwtCachePanner.
◆ isAxisEnabled()
| bool QwtPlotCachePanner::isAxisEnabled |
( |
QwtAxisId |
axisId | ) |
const |
◆ moveCanvas
| void QwtPlotCachePanner::moveCanvas |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
|
virtualslot |
Adjust the enabled axes according to dx/dy.
- Parameters
-
| dx | Pixel offset in x direction |
| dy | Pixel offset in y direction |
- See also
- QwtPanner::panned()
◆ setAxisEnabled()
| void QwtPlotCachePanner::setAxisEnabled |
( |
QwtAxisId |
axisId, |
|
|
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
-
- See also
- isAxisEnabled(), moveCanvas()
The documentation for this class was generated from the following files: