QwtPlotPanner is a panner for a QwtPlotCanvas, 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 32 of file qwt_plot_panner.h.
Public Member Functions | |
QwtPlotPanner (QwtPlotCanvas *) | |
virtual | ~QwtPlotPanner () |
QwtPlotCanvas * | canvas () |
const QwtPlotCanvas * | canvas () const |
QwtPlot * | plot () |
const QwtPlot * | plot () const |
void | setAxisEnabled (int axis, bool on) |
bool | isAxisEnabled (int axis) const |
Protected Slots | |
virtual void | moveCanvas (int dx, int dy) |
|
Create a plot panner. The panner is enabled for all axes
Definition at line 38 of file qwt_plot_panner.cpp. References moveCanvas(), and QwtPanner::panned(). |
|
Destructor.
Definition at line 48 of file qwt_plot_panner.cpp. |
|
Return Observed plot canvas.
Definition at line 97 of file qwt_plot_panner.cpp. |
|
Return observed plot canvas.
Definition at line 87 of file qwt_plot_panner.cpp. Referenced by plot(). |
|
Test if an axis is enabled
Definition at line 78 of file qwt_plot_panner.cpp. |
|
Adjust the enabled axes according to dx/dy
Definition at line 130 of file qwt_plot_panner.cpp. References QwtPlot::autoReplot(), QwtPlot::axisScaleDiv(), QwtPlot::canvasMap(), QwtScaleDiv::hBound(), QwtScaleDiv::lBound(), plot(), QwtPlot::setAutoReplot(), QwtPlot::setAxisScale(), and QwtScaleMap::transform(). Referenced by QwtPlotPanner(). |
|
Return plot widget, containing the observed plot canvas.
Definition at line 117 of file qwt_plot_panner.cpp. |
|
Return plot widget, containing the observed plot canvas.
Definition at line 103 of file qwt_plot_panner.cpp. References canvas(). Referenced by moveCanvas(). |
|
En/Disable an axis. Axes that are enabled will be synchronized to the result of panning. All other axes will remain unchanged.
Definition at line 64 of file qwt_plot_panner.cpp. |