|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
QwtPlotCachePanner provides panning of a plot canvas. More...
#include <qwt_plot_cache_panner.h>
Classes | |
| class | PrivateData |
Public Slots | |
| virtual void | moveCanvas (int dx, int dy) |
| Move the canvas by the specified offset. | |
Public Member Functions | |
| QwtPlotCachePanner (QWidget *) | |
| Constructor. | |
| virtual | ~QwtPlotCachePanner () |
| Destructor. | |
| QWidget * | canvas () |
| Get the canvas widget. | |
| const QWidget * | canvas () const |
| Get the canvas widget (const version) | |
| QwtPlot * | plot () |
| Get the plot widget. | |
| const QwtPlot * | plot () const |
| Get the plot widget (const version) | |
| void | setAxisEnabled (QwtAxisId axisId, bool on) |
| Enable or disable an axis for panning. | |
| bool | isAxisEnabled (QwtAxisId) const |
| Check if an axis is enabled for panning. | |
Public Member Functions inherited from QwtCachePanner | |
| QwtCachePanner (QWidget *parent) | |
| Creates a panner that is enabled for the left mouse button. | |
| virtual | ~QwtCachePanner () |
| Destructor . | |
| void | setEnabled (bool) |
| En/disable the panner. | |
| bool | isEnabled () const |
| Return whether the panner is enabled. | |
| void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier) |
| Change the mouse button and modifiers used for panning. | |
| 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. | |
| 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. | |
| const QCursor | cursor () const |
| Return the cursor that is active while panning. | |
| void | setOrientations (Qt::Orientations) |
| Set the orientations where panning is enabled. | |
| Qt::Orientations | orientations () const |
| Return the orientation where panning is enabled. | |
| bool | isOrientationEnabled (Qt::Orientation) const |
| Check if an orientation is enabled. | |
| virtual bool | eventFilter (QObject *, QEvent *) override |
| Event filter. | |
Protected Member Functions | |
| virtual QBitmap | contentsMask () const override |
| Get the contents mask. | |
| virtual QPixmap | grab () const override |
| Grab the canvas. | |
Protected Member Functions inherited from QwtCachePanner | |
| 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 *) override |
| Paint event. | |
Additional Inherited Members | |
Signals inherited from QwtCachePanner | |
| 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. | |
QwtPlotCachePanner provides panning of a plot canvas.
|
explicit |
Constructor.
Constructs a panner for the canvas of a QwtPlot
Creates a QwtPlotCachePanner object attached to the given canvas. The panner is enabled for all axes by default.
| canvas | Plot canvas to pan, also becomes the parent object |
|
virtual |
Destructor.
Destructor
Releases all resources held by the panner.
| QWidget * QwtPlotCachePanner::canvas | ( | ) |
Get the canvas widget.
Returns the observed plot canvas
| const QWidget * QwtPlotCachePanner::canvas | ( | ) | const |
Get the canvas widget (const version)
Returns the observed plot canvas (const version)
|
overrideprotectedvirtual |
Get the contents mask.
Calculate a mask from the border path of the canvas.
Reimplemented from QwtCachePanner.
|
overrideprotectedvirtual |
| bool QwtPlotCachePanner::isAxisEnabled | ( | QwtAxisId | axisId | ) | const |
Check if an axis is enabled for panning.
Tests if an axis is enabled for panning
| axisId | Axis identifier to test |
|
virtualslot |
Move the canvas by the specified offset.
Adjusts the enabled axes according to the pixel offset
Moves the canvas by the specified pixel offset and updates the axis scales accordingly. Only enabled axes are affected.
| dx | Pixel offset in x direction |
| dy | Pixel offset in y direction |
| QwtPlot * QwtPlotCachePanner::plot | ( | ) |
Get the plot widget.
Returns the plot widget containing the observed canvas
| const QwtPlot * QwtPlotCachePanner::plot | ( | ) | const |
Get the plot widget (const version)
Returns the plot widget containing the observed canvas (const version)
| void QwtPlotCachePanner::setAxisEnabled | ( | QwtAxisId | axisId, |
| bool | on | ||
| ) |
Enable or disable an axis for panning.
Enables or disables an axis for panning
Axes that are enabled will be synchronized to the result of panning. All other axes will remain unchanged.
| axisId | Axis identifier |
| on | True to enable, false to disable |