#include <qwt_plot_panner.h>
Inherits QwtPanner.
List of all members.
Detailed Description
QwtPlotPanner provides panning of a plot canvas.
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.
- Note:
- The axes are not updated, while dragging the canvas
- See also:
- QwtPlotZoomer, QwtPlotMagnifier
Constructor & Destructor Documentation
QwtPlotPanner::QwtPlotPanner |
( |
QwtPlotCanvas * |
canvas | ) |
[explicit] |
Create a plot panner.
The panner is enabled for all axes
- Parameters:
-
canvas | Plot canvas to pan, also the parent object |
- See also:
- setAxisEnabled()
QwtPlotPanner::~QwtPlotPanner |
( |
| ) |
[virtual] |
Member Function Documentation
Return observed plot canvas.
Return Observed plot canvas.
QBitmap QwtPlotPanner::contentsMask |
( |
| ) |
const [protected, virtual] |
const QCursor QwtPanner::cursor |
( |
| ) |
const [inherited] |
- Returns:
- Cursor that is active while panning
- See also:
- setCursor()
bool QwtPanner::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| [virtual, inherited] |
void QwtPanner::getAbortKey |
( |
int & |
key, |
|
|
int & |
state |
|
) |
| const [inherited] |
void QwtPanner::getMouseButton |
( |
int & |
button, |
|
|
int & |
buttonState |
|
) |
| const [inherited] |
QPixmap QwtPanner::grab |
( |
| ) |
const [protected, virtual, inherited] |
Grab the widget into a pixmap.
bool QwtPlotPanner::isAxisEnabled |
( |
int |
axis | ) |
const |
bool QwtPanner::isEnabled |
( |
| ) |
const [inherited] |
bool QwtPanner::isOrientationEnabled |
( |
Qt::Orientation |
o | ) |
const [inherited] |
void QwtPlotPanner::moveCanvas |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| [protected, virtual, slot] |
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()
void QwtPanner::moved |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| [signal, inherited] |
Signal emitted, while the widget moved, but panning is not finished.
- Parameters:
-
dx | Offset in horizontal direction |
dy | Offset in vertical direction |
Qt::Orientations QwtPanner::orientations |
( |
| ) |
const [inherited] |
Return the orientation, where paning is enabled.
void QwtPanner::paintEvent |
( |
QPaintEvent * |
pe | ) |
[protected, virtual, inherited] |
Paint event.
Repaint the grabbed pixmap on its current position and fill the empty spaces by the background of the parent widget.
- Parameters:
-
void QwtPanner::panned |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| [signal, inherited] |
Signal emitted, when panning is done
- Parameters:
-
dx | Offset in horizontal direction |
dy | Offset in vertical direction |
Return plot widget, containing the observed plot canvas.
const QwtPlot * QwtPlotPanner::plot |
( |
| ) |
const |
Return plot widget, containing the observed plot canvas.
void QwtPanner::setAbortKey |
( |
int |
key, |
|
|
int |
state = Qt::NoButton |
|
) |
| [inherited] |
Change the abort key The defaults are Qt::Key_Escape and Qt::NoButton
- Parameters:
-
key | Key ( See Qt::Keycode ) |
state | State |
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:
-
- See also:
- isAxisEnabled(), moveCanvas()
void QwtPanner::setCursor |
( |
const QCursor & |
cursor | ) |
[inherited] |
Change the cursor, that is active while panning The default is the cursor of the parent widget.
- Parameters:
-
- See also:
- setCursor()
void QwtPanner::setEnabled |
( |
bool |
on | ) |
[inherited] |
En/disable the panner.
When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.
- Parameters:
-
- See also:
- isEnabled(), eventFilter()
void QwtPanner::setMouseButton |
( |
int |
button, |
|
|
int |
buttonState = Qt::NoButton |
|
) |
| [inherited] |
Change the mouse button The defaults are Qt::LeftButton and Qt::NoButton
void QwtPanner::setOrientations |
( |
Qt::Orientations |
o | ) |
[inherited] |
Set the orientations, where panning is enabled The default value is in both directions: Qt::Horizontal | Qt::Vertical
/param o Orientation
void QwtPanner::widgetKeyPressEvent |
( |
QKeyEvent * |
keyEvent | ) |
[protected, virtual, inherited] |
void QwtPanner::widgetKeyReleaseEvent |
( |
QKeyEvent * |
keyEvent | ) |
[protected, virtual, inherited] |
void QwtPanner::widgetMouseMoveEvent |
( |
QMouseEvent * |
mouseEvent | ) |
[protected, virtual, inherited] |
void QwtPanner::widgetMousePressEvent |
( |
QMouseEvent * |
mouseEvent | ) |
[protected, virtual, inherited] |
void QwtPanner::widgetMouseReleaseEvent |
( |
QMouseEvent * |
mouseEvent | ) |
[protected, virtual, inherited] |