1
.TH "QwtPanner" 3 "26 Feb 2007" "Version 5.0.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherited by \fBQwtPlotPanner\fP.
11
.SH "Detailed Description"
13
\fBQwtPanner\fP provides panning of a widget.
15
\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.
17
\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.
19
For widgets, where repaints are very fast it might be better to implement panning manually by mapping mouse events into paint events.
21
Definition at line 35 of file qwt_panner.h.
26
.RI "void \fBpanned\fP (int dx, int dy)"
29
.RI "void \fBmoved\fP (int dx, int dy)"
32
.SS "Public Member Functions"
36
.RI "\fBQwtPanner\fP (QWidget *parent)"
39
.RI "virtual \fB~QwtPanner\fP ()"
42
.RI "void \fBsetEnabled\fP (bool)"
45
.RI "bool \fBisEnabled\fP () const "
48
.RI "void \fBsetMouseButton\fP (int button, int buttonState=Qt::NoButton)"
51
.RI "void \fBgetMouseButton\fP (int &button, int &buttonState) const "
54
.RI "void \fBsetAbortKey\fP (int key, int state=Qt::NoButton)"
57
.RI "void \fBgetAbortKey\fP (int &key, int &state) const "
60
.RI "void \fBsetCursor\fP (const QCursor &)"
63
.RI "const QCursor \fBcursor\fP () const "
66
.RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
69
.SS "Protected Member Functions"
73
.RI "virtual void \fBwidgetMousePressEvent\fP (QMouseEvent *)"
76
.RI "virtual void \fBwidgetMouseReleaseEvent\fP (QMouseEvent *)"
79
.RI "virtual void \fBwidgetMouseMoveEvent\fP (QMouseEvent *)"
82
.RI "virtual void \fBwidgetKeyPressEvent\fP (QKeyEvent *)"
85
.RI "virtual void \fBwidgetKeyReleaseEvent\fP (QKeyEvent *)"
88
.RI "virtual void \fBpaintEvent\fP (QPaintEvent *)"
91
.SH "Constructor & Destructor Documentation"
93
.SS "QwtPanner::QwtPanner (QWidget * parent)"
95
Creates an panner that is enabled for the left mouse button.
99
\fIparent\fP Parent widget to be panned
104
Definition at line 64 of file qwt_panner.cpp.
106
References setEnabled().
107
.SS "QwtPanner::~QwtPanner ()\fC [virtual]\fP"
111
Definition at line 86 of file qwt_panner.cpp.
112
.SH "Member Function Documentation"
114
.SS "const QCursor QwtPanner::cursor () const"
118
Cursor that is active while panning
128
Definition at line 145 of file qwt_panner.cpp.
129
.SS "bool QwtPanner::eventFilter (QObject * o, QEvent * e)\fC [virtual]\fP"
133
When \fBisEnabled()\fP the mouse events of the observed widget are filtered.
137
\fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP
142
Definition at line 246 of file qwt_panner.cpp.
144
References widgetMousePressEvent().
145
.SS "void QwtPanner::getAbortKey (int & key, int & state) const"
149
Definition at line 119 of file qwt_panner.cpp.
150
.SS "void QwtPanner::getMouseButton (int & button, int & buttonState) const"
152
Get the mouse button.
154
Definition at line 102 of file qwt_panner.cpp.
155
.SS "bool QwtPanner::isEnabled () const"
159
true when enabled, false otherwise
164
\fBsetEnabled\fP, \fBeventFilter()\fP
169
Definition at line 192 of file qwt_panner.cpp.
170
.SS "void QwtPanner::moved (int dx, int dy)\fC [signal]\fP"
172
Signal emitted, while the widget moved, but panning is not finished.
176
\fIdx\fP Offset in horizontal direction
178
\fIdy\fP Offset in vertical direction
183
Referenced by widgetMouseMoveEvent().
184
.SS "void QwtPanner::paintEvent (QPaintEvent * pe)\fC [protected, virtual]\fP"
188
Repaint the grabbed pixmap on its current position and fill the empty spaces by the background of the parent widget.
197
Definition at line 205 of file qwt_panner.cpp.
198
.SS "void QwtPanner::panned (int dx, int dy)\fC [signal]\fP"
200
Signal emitted, when panning is done
204
\fIdx\fP Offset in horizontal direction
206
\fIdy\fP Offset in vertical direction
211
Referenced by QwtPlotPanner::QwtPlotPanner(), and widgetMouseReleaseEvent().
212
.SS "void QwtPanner::setAbortKey (int key, int state = \fCQt::NoButton\fP)"
214
Change the abort key The defaults are Qt::Key_Escape and Qt::NoButton
216
Definition at line 112 of file qwt_panner.cpp.
217
.SS "void QwtPanner::setCursor (const QCursor & cursor)"
219
Change the cursor, that is active while panning The default is the cursor of the parent widget.
223
\fIcursor\fP New cursor
233
Definition at line 134 of file qwt_panner.cpp.
234
.SS "void QwtPanner::setEnabled (bool on)"
236
En/disable the panner.
238
When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.
242
\fIon\fP true or false
247
\fBisEnabled()\fP, \fBeventFilter()\fP
252
Definition at line 166 of file qwt_panner.cpp.
254
Referenced by QwtPanner().
255
.SS "void QwtPanner::setMouseButton (int button, int buttonState = \fCQt::NoButton\fP)"
257
Change the mouse button The defaults are Qt::LeftButton and Qt::NoButton
259
Definition at line 95 of file qwt_panner.cpp.
260
.SS "void QwtPanner::widgetKeyPressEvent (QKeyEvent * ke)\fC [protected, virtual]\fP"
262
Handle a key press event for the observed widget.
271
\fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP
276
Definition at line 379 of file qwt_panner.cpp.
277
.SS "void QwtPanner::widgetKeyReleaseEvent (QKeyEvent *)\fC [protected, virtual]\fP"
279
Handle a key release event for the observed widget.
288
\fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP
293
Definition at line 408 of file qwt_panner.cpp.
294
.SS "void QwtPanner::widgetMouseMoveEvent (QMouseEvent * me)\fC [protected, virtual]\fP"
296
Handle a mouse release event for the observed widget.
305
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseMoveEvent()\fP,
310
Definition at line 336 of file qwt_panner.cpp.
313
.SS "void QwtPanner::widgetMousePressEvent (QMouseEvent * me)\fC [protected, virtual]\fP"
315
Handle a mouse press event for the observed widget.
324
\fBeventFilter()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP,
329
Definition at line 291 of file qwt_panner.cpp.
331
Referenced by eventFilter().
332
.SS "void QwtPanner::widgetMouseReleaseEvent (QMouseEvent * me)\fC [protected, virtual]\fP"
334
Handle a mouse move event for the observed widget.
338
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP,
343
Definition at line 353 of file qwt_panner.cpp.
349
Generated automatically by Doxygen for Qwt User's Guide from the source code.