.TH "QwtPanner" 3 "Tue Nov 20 2012" "Version 5.2.3" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPanner \- .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBQwtPlotPanner\fP\&. .SS "Signals" .in +1c .ti -1c .RI "void \fBmoved\fP (int dx, int dy)" .br .ti -1c .RI "void \fBpanned\fP (int dx, int dy)" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPanner\fP (QWidget *parent)" .br .ti -1c .RI "virtual \fB~QwtPanner\fP ()" .br .ti -1c .RI "const QCursor \fBcursor\fP () const " .br .ti -1c .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)" .br .ti -1c .RI "void \fBgetAbortKey\fP (int &key, int &state) const " .br .ti -1c .RI "void \fBgetMouseButton\fP (int &button, int &buttonState) const " .br .ti -1c .RI "bool \fBisEnabled\fP () const " .br .ti -1c .RI "bool \fBisOrientationEnabled\fP (Qt::Orientation) const " .br .ti -1c .RI "Qt::Orientations \fBorientations\fP () const " .br .ti -1c .RI "void \fBsetAbortKey\fP (int key, int state=Qt::NoButton)" .br .ti -1c .RI "void \fBsetCursor\fP (const QCursor &)" .br .ti -1c .RI "void \fBsetEnabled\fP (bool)" .br .ti -1c .RI "void \fBsetMouseButton\fP (int button, int buttonState=Qt::NoButton)" .br .ti -1c .RI "void \fBsetOrientations\fP (Qt::Orientations)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBpaintEvent\fP (QPaintEvent *)" .br .ti -1c .RI "virtual void \fBwidgetKeyPressEvent\fP (QKeyEvent *)" .br .ti -1c .RI "virtual void \fBwidgetKeyReleaseEvent\fP (QKeyEvent *)" .br .ti -1c .RI "virtual void \fBwidgetMouseMoveEvent\fP (QMouseEvent *)" .br .ti -1c .RI "virtual void \fBwidgetMousePressEvent\fP (QMouseEvent *)" .br .ti -1c .RI "virtual void \fBwidgetMouseReleaseEvent\fP (QMouseEvent *)" .br .in -1c .SH "Detailed Description" .PP \fBQwtPanner\fP provides panning of a widget\&. \fBQwtPanner\fP grabs the contents of a widget, that can be dragged in all directions\&. The offset between the start and the end position is emitted by the panned signal\&. .PP \fBQwtPanner\fP grabs the content of the widget into a pixmap and moves the pixmap around, without initiating any repaint events for the widget\&. Areas, that are not part of content are not painted while panning in in process\&. This makes panning fast enough for widgets, where repaints are too slow for mouse movements\&. .PP For widgets, where repaints are very fast it might be better to implement panning manually by mapping mouse events into paint events\&. .SH "Constructor & Destructor Documentation" .PP .SS "QwtPanner::QwtPanner (QWidget *parent)" Creates an panner that is enabled for the left mouse button\&. .PP \fBParameters:\fP .RS 4 \fIparent\fP Parent widget to be panned .RE .PP .SH "Member Function Documentation" .PP .SS "const QCursor QwtPanner::cursor () const" \fBReturns:\fP .RS 4 Cursor that is active while panning .RE .PP \fBSee also:\fP .RS 4 \fBsetCursor()\fP .RE .PP .SS "bool QwtPanner::eventFilter (QObject *o, QEvent *e)\fC [virtual]\fP" .PP Event filter\&. When \fBisEnabled()\fP the mouse events of the observed widget are filtered\&. .PP \fBSee also:\fP .RS 4 \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP .RE .PP .SS "bool QwtPanner::isEnabled () const" \fBReturns:\fP .RS 4 true when enabled, false otherwise .RE .PP \fBSee also:\fP .RS 4 \fBsetEnabled\fP, \fBeventFilter()\fP .RE .PP .SS "bool QwtPanner::isOrientationEnabled (Qt::Orientationo) const" Return true if a orientatio is enabled .PP \fBSee also:\fP .RS 4 \fBorientations()\fP, \fBsetOrientations()\fP .RE .PP .SS "void QwtPanner::moved (intdx, intdy)\fC [signal]\fP" Signal emitted, while the widget moved, but panning is not finished\&. .PP \fBParameters:\fP .RS 4 \fIdx\fP Offset in horizontal direction .br \fIdy\fP Offset in vertical direction .RE .PP .SS "void QwtPanner::paintEvent (QPaintEvent *pe)\fC [protected]\fP, \fC [virtual]\fP" .PP Paint event\&. Repaint the grabbed pixmap on its current position and fill the empty spaces by the background of the parent widget\&. .PP \fBParameters:\fP .RS 4 \fIpe\fP Paint event .RE .PP .SS "void QwtPanner::panned (intdx, intdy)\fC [signal]\fP" Signal emitted, when panning is done .PP \fBParameters:\fP .RS 4 \fIdx\fP Offset in horizontal direction .br \fIdy\fP Offset in vertical direction .RE .PP .SS "void QwtPanner::setAbortKey (intkey, intstate = \fCQt::NoButton\fP)" Change the abort key The defaults are Qt::Key_Escape and Qt::NoButton .PP \fBParameters:\fP .RS 4 \fIkey\fP Key ( See Qt::Keycode ) .br \fIstate\fP State .RE .PP .SS "void QwtPanner::setCursor (const QCursor &cursor)" Change the cursor, that is active while panning The default is the cursor of the parent widget\&. .PP \fBParameters:\fP .RS 4 \fIcursor\fP New cursor .RE .PP \fBSee also:\fP .RS 4 \fBsetCursor()\fP .RE .PP .SS "void QwtPanner::setEnabled (boolon)" .PP En/disable the panner\&. When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed\&. .PP \fBParameters:\fP .RS 4 \fIon\fP true or false .RE .PP \fBSee also:\fP .RS 4 \fBisEnabled()\fP, \fBeventFilter()\fP .RE .PP .SS "void QwtPanner::setMouseButton (intbutton, intbuttonState = \fCQt::NoButton\fP)" Change the mouse button The defaults are Qt::LeftButton and Qt::NoButton .SS "void QwtPanner::setOrientations (Qt::Orientationso)" Set the orientations, where panning is enabled The default value is in both directions: Qt::Horizontal | Qt::Vertical .PP /param o Orientation .SS "void QwtPanner::widgetKeyPressEvent (QKeyEvent *ke)\fC [protected]\fP, \fC [virtual]\fP" Handle a key press event for the observed widget\&. .PP \fBParameters:\fP .RS 4 \fIke\fP Key event .RE .PP \fBSee also:\fP .RS 4 \fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP .RE .PP .SS "void QwtPanner::widgetKeyReleaseEvent (QKeyEvent *)\fC [protected]\fP, \fC [virtual]\fP" Handle a key release event for the observed widget\&. .PP \fBSee also:\fP .RS 4 \fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP .RE .PP .SS "void QwtPanner::widgetMouseMoveEvent (QMouseEvent *me)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse move event for the observed widget\&. .PP \fBParameters:\fP .RS 4 \fIme\fP Mouse event .RE .PP \fBSee also:\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP .RE .PP .SS "void QwtPanner::widgetMousePressEvent (QMouseEvent *me)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse press event for the observed widget\&. .PP \fBParameters:\fP .RS 4 \fIme\fP Mouse event .RE .PP \fBSee also:\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP, .RE .PP .SS "void QwtPanner::widgetMouseReleaseEvent (QMouseEvent *me)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse release event for the observed widget\&. .PP \fBParameters:\fP .RS 4 \fIme\fP Mouse event .RE .PP \fBSee also:\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseMoveEvent()\fP, .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.