1
.TH "QwtPlotPicker" 3 "1 May 2008" "Version 5.1.0" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtPicker\fP.
11
Inherited by \fBQwtPlotZoomer\fP.
13
.SH "Detailed Description"
15
\fBQwtPlotPicker\fP provides selections on a plot canvas.
17
\fBQwtPlotPicker\fP is a \fBQwtPicker\fP tailored for selections on a plot canvas. It is set to a x-Axis and y-Axis and translates all pixel coordinates into this coodinate system.
19
Definition at line 29 of file qwt_plot_picker.h.
24
.RI "void \fBselected\fP (const \fBQwtDoublePoint\fP &pos)"
27
.RI "void \fBselected\fP (const \fBQwtDoubleRect\fP &rect)"
30
.RI "void \fBselected\fP (const QwtArray< \fBQwtDoublePoint\fP > &pa)"
33
.RI "void \fBappended\fP (const \fBQwtDoublePoint\fP &pos)"
36
.RI "void \fBmoved\fP (const \fBQwtDoublePoint\fP &pos)"
39
.SS "Public Member Functions"
43
.RI "\fBQwtPlotPicker\fP (\fBQwtPlotCanvas\fP *)"
46
.RI "\fBQwtPlotPicker\fP (int xAxis, int yAxis, \fBQwtPlotCanvas\fP *)"
49
.RI "\fBQwtPlotPicker\fP (int xAxis, int yAxis, int selectionFlags, \fBRubberBand\fP rubberBand, \fBDisplayMode\fP trackerMode, \fBQwtPlotCanvas\fP *)"
52
.RI "virtual void \fBsetAxis\fP (int xAxis, int yAxis)"
55
.RI "int \fBxAxis\fP () const"
58
.RI "int \fByAxis\fP () const"
61
.RI "\fBQwtPlot\fP * \fBplot\fP ()"
64
.RI "const \fBQwtPlot\fP * \fBplot\fP () const"
67
.RI "\fBQwtPlotCanvas\fP * \fBcanvas\fP ()"
70
.RI "const \fBQwtPlotCanvas\fP * \fBcanvas\fP () const"
73
.SS "Protected Member Functions"
77
.RI "\fBQwtDoubleRect\fP \fBscaleRect\fP () const"
80
.RI "\fBQwtDoubleRect\fP \fBinvTransform\fP (const QRect &) const "
83
.RI "QRect \fBtransform\fP (const \fBQwtDoubleRect\fP &) const"
86
.RI "\fBQwtDoublePoint\fP \fBinvTransform\fP (const QPoint &) const"
89
.RI "QPoint \fBtransform\fP (const \fBQwtDoublePoint\fP &) const"
92
.RI "virtual \fBQwtText\fP \fBtrackerText\fP (const QPoint &) const"
95
.RI "virtual \fBQwtText\fP \fBtrackerText\fP (const \fBQwtDoublePoint\fP &) const"
98
.RI "virtual void \fBmove\fP (const QPoint &)"
101
.RI "virtual void \fBappend\fP (const QPoint &)"
104
.RI "virtual bool \fBend\fP (bool ok=true)"
107
.SH "Constructor & Destructor Documentation"
109
.SS "QwtPlotPicker::QwtPlotPicker (\fBQwtPlotCanvas\fP * canvas)\fC [explicit]\fP"
111
Create a plot picker.
113
The picker is set to those x- and y-axis of the plot that are enabled. If both or no x-axis are enabled, the picker is set to QwtPlot::xBottom. If both or no y-axis are enabled, it is set to QwtPlot::yLeft.
117
\fIcanvas\fP Plot canvas to observe, also the parent object
122
\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBQwtPlotPicker::scaleRect()\fP
127
Definition at line 32 of file qwt_plot_picker.cpp.
129
References QwtPlot::axisEnabled(), canvas(), plot(), setAxis(), xAxis(), and yAxis().
130
.SS "QwtPlotPicker::QwtPlotPicker (int xAxis, int yAxis, \fBQwtPlotCanvas\fP * canvas)\fC [explicit]\fP"
136
\fIxAxis\fP Set the x axis of the picker
138
\fIyAxis\fP Set the y axis of the picker
140
\fIcanvas\fP Plot canvas to observe, also the parent object
145
\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBQwtPlotPicker::scaleRect()\fP
150
Definition at line 70 of file qwt_plot_picker.cpp.
151
.SS "QwtPlotPicker::QwtPlotPicker (int xAxis, int yAxis, int selectionFlags, \fBRubberBand\fP rubberBand, \fBDisplayMode\fP trackerMode, \fBQwtPlotCanvas\fP * canvas)\fC [explicit]\fP"
157
\fIxAxis\fP X axis of the picker
159
\fIyAxis\fP Y axis of the picker
161
\fIselectionFlags\fP Or'd value of SelectionType, RectSelectionType and SelectionMode
163
\fIrubberBand\fP Rubberband style
165
\fItrackerMode\fP Tracker mode
167
\fIcanvas\fP Plot canvas to observe, also the parent object
172
\fBQwtPicker\fP, \fBQwtPicker::setSelectionFlags()\fP, \fBQwtPicker::setRubberBand()\fP, \fBQwtPicker::setTrackerMode\fP
174
\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBQwtPlotPicker::scaleRect()\fP
179
Definition at line 93 of file qwt_plot_picker.cpp.
180
.SH "Member Function Documentation"
182
.SS "void QwtPlotPicker::setAxis (int xAxis, int yAxis)\fC [virtual]\fP"
184
Set the x and y axes of the picker
195
Reimplemented in \fBQwtPlotZoomer\fP.
197
Definition at line 169 of file qwt_plot_picker.cpp.
201
Referenced by QwtPlotPicker(), and QwtPlotZoomer::setAxis().
202
.SS "int QwtPlotPicker::xAxis () const"
206
Definition at line 183 of file qwt_plot_picker.cpp.
208
Referenced by QwtPlotPicker(), QwtPlotZoomer::rescale(), scaleRect(), and QwtPlotZoomer::setAxis().
209
.SS "int QwtPlotPicker::yAxis () const"
213
Definition at line 189 of file qwt_plot_picker.cpp.
215
Referenced by QwtPlotPicker(), QwtPlotZoomer::rescale(), scaleRect(), and QwtPlotZoomer::setAxis().
216
.SS "\fBQwtPlot\fP * QwtPlotPicker::plot ()"
218
Return plot widget, containing the observed plot canvas.
220
Definition at line 119 of file qwt_plot_picker.cpp.
224
Referenced by QwtPlotZoomer::end(), end(), invTransform(), QwtPlotPicker(), QwtPlotZoomer::rescale(), scaleRect(), setAxis(), QwtPlotZoomer::setZoomBase(), and transform().
225
.SS "const \fBQwtPlot\fP * QwtPlotPicker::plot () const"
227
Return plot widget, containing the observed plot canvas.
229
Definition at line 133 of file qwt_plot_picker.cpp.
230
.SS "\fBQwtPlotCanvas\fP * QwtPlotPicker::canvas ()"
232
Return observed plot canvas.
234
Definition at line 103 of file qwt_plot_picker.cpp.
236
References QwtPicker::parentWidget().
238
Referenced by plot(), QwtPlotPicker(), and QwtPlotZoomer::QwtPlotZoomer().
239
.SS "const \fBQwtPlotCanvas\fP * QwtPlotPicker::canvas () const"
241
Return Observed plot canvas.
243
Definition at line 113 of file qwt_plot_picker.cpp.
244
.SS "void QwtPlotPicker::selected (const \fBQwtDoublePoint\fP & pos)\fC [signal]\fP"
246
A signal emitted in case of \fBselectionFlags()\fP & PointSelection.
250
\fIpos\fP Selected point
256
.SS "void QwtPlotPicker::selected (const \fBQwtDoubleRect\fP & rect)\fC [signal]\fP"
258
A signal emitted in case of \fBselectionFlags()\fP & RectSelection.
262
\fIrect\fP Selected rectangle
266
.SS "void QwtPlotPicker::selected (const QwtArray< \fBQwtDoublePoint\fP > & pa)\fC [signal]\fP"
268
A signal emitting the selected points, at the end of a selection.
272
\fIpa\fP Selected points
276
.SS "void QwtPlotPicker::appended (const \fBQwtDoublePoint\fP & pos)\fC [signal]\fP"
278
A signal emitted when a point has been appended to the selection
282
\fIpos\fP Position of the appended point.
287
\fBappend()\fP. \fBmoved()\fP
292
Referenced by append().
293
.SS "void QwtPlotPicker::moved (const \fBQwtDoublePoint\fP & pos)\fC [signal]\fP"
295
A signal emitted whenever the last appended point of the selection has been moved.
299
\fIpos\fP Position of the moved last point of the selection.
304
\fBmove()\fP, \fBappended()\fP
309
Referenced by move().
310
.SS "\fBQwtDoubleRect\fP QwtPlotPicker::scaleRect () const\fC [protected]\fP"
312
Return normalized bounding rect of the axes
316
\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP.
321
Definition at line 143 of file qwt_plot_picker.cpp.
323
References QwtPlot::axisScaleDiv(), QwtScaleDiv::lBound(), plot(), QwtScaleDiv::range(), xAxis(), and yAxis().
325
Referenced by QwtPlotZoomer::rescale(), QwtPlotZoomer::setAxis(), and QwtPlotZoomer::setZoomBase().
326
.SS "\fBQwtDoubleRect\fP QwtPlotPicker::invTransform (const QRect & rect) const\fC [protected]\fP"
328
Translate a rectangle from pixel into plot coordinates
332
Rectangle in plot coordinates
337
\fBQwtPlotPicker::transform()\fP
342
Definition at line 332 of file qwt_plot_picker.cpp.
344
References QwtPlot::canvasMap(), QwtScaleMap::invTransform(), and plot().
346
Referenced by append(), QwtPlotZoomer::end(), end(), move(), and trackerText().
347
.SS "QRect QwtPlotPicker::transform (const \fBQwtDoubleRect\fP & rect) const\fC [protected]\fP"
349
Translate a rectangle from plot into pixel coordinates
353
Rectangle in pixel coordinates
358
\fBQwtPlotPicker::invTransform()\fP
363
Definition at line 351 of file qwt_plot_picker.cpp.
365
References QwtPlot::canvasMap(), plot(), and QwtScaleMap::transform().
366
.SS "\fBQwtDoublePoint\fP QwtPlotPicker::invTransform (const QPoint & pos) const\fC [protected]\fP"
368
Translate a point from pixel into plot coordinates
372
Point in plot coordinates
377
\fBQwtPlotPicker::transform()\fP
382
Definition at line 369 of file qwt_plot_picker.cpp.
384
References QwtPlot::canvasMap(), QwtScaleMap::invTransform(), and plot().
385
.SS "QPoint QwtPlotPicker::transform (const \fBQwtDoublePoint\fP & pos) const\fC [protected]\fP"
387
Translate a point from plot into pixel coordinates
391
Point in pixel coordinates
396
\fBQwtPlotPicker::invTransform()\fP
401
Definition at line 385 of file qwt_plot_picker.cpp.
403
References QwtPlot::canvasMap(), plot(), and QwtScaleMap::transform().
404
.SS "\fBQwtText\fP QwtPlotPicker::trackerText (const QPoint & pos) const\fC [protected, virtual]\fP"
406
Translate a pixel position into a position string
410
\fIpos\fP Position in pixel coordinates
420
Reimplemented from \fBQwtPicker\fP.
422
Definition at line 200 of file qwt_plot_picker.cpp.
424
References invTransform().
425
.SS "\fBQwtText\fP QwtPlotPicker::trackerText (const \fBQwtDoublePoint\fP & pos) const\fC [protected, virtual]\fP"
427
Translate a position into a position string.
429
In case of HLineRubberBand the label is the value of the y position, in case of VLineRubberBand the value of the x position. Otherwise the label contains x and y position separated by a ',' .
431
The format for the double to string conversion is '%.4f'.
445
Definition at line 217 of file qwt_plot_picker.cpp.
447
References QwtPicker::rubberBand().
448
.SS "void QwtPlotPicker::move (const QPoint & pos)\fC [protected, virtual]\fP"
450
Move the last point of the selection
454
\fIpos\fP New position
459
\fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBappend()\fP
464
The \fBmoved(const QPoint &)\fP, moved(const QDoublePoint &) signals are emitted.
469
Reimplemented from \fBQwtPicker\fP.
471
Definition at line 259 of file qwt_plot_picker.cpp.
473
References invTransform(), QwtPicker::move(), and moved().
474
.SS "void QwtPlotPicker::append (const QPoint & pos)\fC [protected, virtual]\fP"
476
Append a point to the selection and update rubberband and tracker.
480
\fIpos\fP Additional point
485
\fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBmove()\fP, \fBappended()\fP
490
The \fBappended(const QPoint &)\fP, appended(const QDoublePoint &) signals are emitted.
495
Reimplemented from \fBQwtPicker\fP.
497
Definition at line 244 of file qwt_plot_picker.cpp.
499
References QwtPicker::append(), appended(), and invTransform().
500
.SS "bool QwtPlotPicker::end (bool ok = \fCtrue\fP)\fC [protected, virtual]\fP"
502
Close a selection setting the state to inactive.
506
\fIok\fP If true, complete the selection and emit selected signals otherwise discard the selection.
511
true if the selection is accepted, false otherwise
516
Reimplemented from \fBQwtPicker\fP.
518
Reimplemented in \fBQwtPlotZoomer\fP.
520
Definition at line 273 of file qwt_plot_picker.cpp.
522
References QwtPicker::end(), invTransform(), plot(), selected(), QwtPicker::selection(), and QwtPicker::selectionFlags().
524
Referenced by QwtPlotZoomer::end().
528
Generated automatically by Doxygen for Qwt User's Guide from the source code.