1
.TH "QwtPicker" 3 "22 Mar 2009" "Version 5.1.2" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtEventPattern\fP.
11
Inherited by \fBQwtPlotPicker\fP.
13
.SH "Detailed Description"
15
\fBQwtPicker\fP provides selections on a widget.
17
\fBQwtPicker\fP filters all mouse and keyboard events of a widget and translates them into an array of selected points. Depending on the \fBQwtPicker::SelectionType\fP the selection might be a single point, a rectangle or a polygon. The selection process is supported by optional rubberbands (rubberband selection) and position trackers.
19
\fBQwtPicker\fP is useful for widgets where the event handlers can't be overloaded, like for components of composite widgets. It offers alternative handlers for mouse and key events.
25
#include <qwt_picker.h>
27
QwtPicker *picker = new QwtPicker(widget);
28
picker->setTrackerMode(QwtPicker::ActiveOnly);
29
connect(picker, SIGNAL(selected(const QwtPolygon &)), ...);
31
// emit the position of clicks on widget
32
picker->setSelectionFlags(QwtPicker::PointSelection | QwtPicker::ClickSelection);
36
// now select rectangles
37
picker->setSelectionFlags(QwtPicker::RectSelection | QwtPicker::DragSelection);
38
picker->setRubberBand(QwtPicker::RectRubberBand);
45
The selection process uses the commands \fBbegin()\fP, \fBappend()\fP, \fBmove()\fP and \fBend()\fP. \fBappend()\fP adds a new point to the selection, \fBmove()\fP changes the position of the latest point.
47
The commands are initiated from a small state machine (\fBQwtPickerMachine\fP) that translates mouse and key events. There are a couple of predefined state machines for point, rect and polygon selections. The \fBselectionFlags()\fP control which one should be used. It is possible to use other machines by overloading \fBstateMachine()\fP.
49
The picker is active (\fBisActive()\fP), between \fBbegin()\fP and \fBend()\fP. In active state the rubberband is displayed, and the tracker is visible in case of trackerMode is ActiveOnly or AlwaysOn.
51
The cursor can be moved using the arrow keys. All selections can be aborted using the abort key. (\fBQwtEventPattern::KeyPatternCode\fP)
55
In case of QWidget::NoFocus the focus policy of the observed widget is set to QWidget::WheelFocus and mouse tracking will be manipulated for ClickSelection while the picker is active, or if \fBtrackerMode()\fP is AlwayOn.
60
Definition at line 80 of file qwt_picker.h.
65
.RI "enum \fBSelectionType\fP { \fBNoSelection\fP = 0, \fBPointSelection\fP = 1, \fBRectSelection\fP = 2, \fBPolygonSelection\fP = 4 }"
68
.RI "enum \fBRectSelectionType\fP { \fBCornerToCorner\fP = 64, \fBCenterToCorner\fP = 128, \fBCenterToRadius\fP = 256 }"
71
.RI "enum \fBSelectionMode\fP { \fBClickSelection\fP = 1024, \fBDragSelection\fP = 2048 }"
74
.RI "enum \fBRubberBand\fP { \fBNoRubberBand\fP = 0, \fBHLineRubberBand\fP, \fBVLineRubberBand\fP, \fBCrossRubberBand\fP, \fBRectRubberBand\fP, \fBEllipseRubberBand\fP, \fBPolygonRubberBand\fP, \fBUserRubberBand\fP = 100 }"
77
.RI "enum \fBDisplayMode\fP { \fBAlwaysOff\fP, \fBAlwaysOn\fP, \fBActiveOnly\fP, \fBImageMode\fP = 1, \fBContourMode\fP = 2 }"
80
.RI "enum \fBResizeMode\fP { \fBStretch\fP, \fBKeepSize\fP }"
87
.RI "void \fBselected\fP (const QwtPolygon &pa)"
90
.RI "void \fBappended\fP (const QPoint &pos)"
93
.RI "void \fBmoved\fP (const QPoint &pos)"
96
.RI "void \fBchanged\fP (const QwtPolygon &pa)"
99
.SS "Public Member Functions"
103
.RI "\fBQwtPicker\fP (QWidget *parent)"
106
.RI "\fBQwtPicker\fP (int selectionFlags, \fBRubberBand\fP rubberBand, \fBDisplayMode\fP trackerMode, QWidget *)"
109
.RI "virtual \fB~QwtPicker\fP ()"
112
.RI "virtual void \fBsetSelectionFlags\fP (int)"
115
.RI "int \fBselectionFlags\fP () const"
118
.RI "virtual void \fBsetRubberBand\fP (\fBRubberBand\fP)"
121
.RI "\fBRubberBand\fP \fBrubberBand\fP () const"
124
.RI "virtual void \fBsetTrackerMode\fP (\fBDisplayMode\fP)"
127
.RI "\fBDisplayMode\fP \fBtrackerMode\fP () const"
130
.RI "virtual void \fBsetResizeMode\fP (\fBResizeMode\fP)"
133
.RI "\fBResizeMode\fP \fBresizeMode\fP () const"
136
.RI "virtual void \fBsetRubberBandPen\fP (const QPen &)"
139
.RI "QPen \fBrubberBandPen\fP () const"
142
.RI "virtual void \fBsetTrackerPen\fP (const QPen &)"
145
.RI "QPen \fBtrackerPen\fP () const"
148
.RI "virtual void \fBsetTrackerFont\fP (const QFont &)"
151
.RI "QFont \fBtrackerFont\fP () const"
154
.RI "bool \fBisEnabled\fP () const"
157
.RI "virtual void \fBsetEnabled\fP (bool)"
160
.RI "bool \fBisActive\fP () const"
163
.RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
166
.RI "QWidget * \fBparentWidget\fP ()"
169
.RI "const QWidget * \fBparentWidget\fP () const"
172
.RI "virtual QRect \fBpickRect\fP () const"
175
.RI "const QwtPolygon & \fBselection\fP () const"
178
.RI "virtual void \fBdrawRubberBand\fP (QPainter *) const"
181
.RI "virtual void \fBdrawTracker\fP (QPainter *) const"
184
.RI "virtual \fBQwtText\fP \fBtrackerText\fP (const QPoint &pos) const"
187
.RI "QPoint \fBtrackerPosition\fP () const"
190
.RI "QRect \fBtrackerRect\fP (const QFont &) const "
193
.SS "Protected Member Functions"
197
.RI "virtual bool \fBaccept\fP (QwtPolygon &selection) const"
200
.RI "virtual void \fBtransition\fP (const QEvent *)"
203
.RI "virtual void \fBbegin\fP ()"
206
.RI "virtual void \fBappend\fP (const QPoint &)"
209
.RI "virtual void \fBmove\fP (const QPoint &)"
212
.RI "virtual bool \fBend\fP (bool ok=true)"
215
.RI "virtual void \fBreset\fP ()"
218
.RI "virtual void \fBwidgetMousePressEvent\fP (QMouseEvent *)"
221
.RI "virtual void \fBwidgetMouseReleaseEvent\fP (QMouseEvent *)"
224
.RI "virtual void \fBwidgetMouseDoubleClickEvent\fP (QMouseEvent *)"
227
.RI "virtual void \fBwidgetMouseMoveEvent\fP (QMouseEvent *)"
230
.RI "virtual void \fBwidgetWheelEvent\fP (QWheelEvent *)"
233
.RI "virtual void \fBwidgetKeyPressEvent\fP (QKeyEvent *)"
236
.RI "virtual void \fBwidgetKeyReleaseEvent\fP (QKeyEvent *)"
239
.RI "virtual void \fBwidgetLeaveEvent\fP (QEvent *)"
242
.RI "virtual void \fBstretchSelection\fP (const QSize &oldSize, const QSize &newSize)"
245
.RI "virtual \fBQwtPickerMachine\fP * \fBstateMachine\fP (int) const "
248
.RI "virtual void \fBupdateDisplay\fP ()"
251
.RI "const QWidget * \fBrubberBandWidget\fP () const"
254
.RI "const QWidget * \fBtrackerWidget\fP () const"
257
.SH "Member Enumeration Documentation"
259
.SS "enum \fBQwtPicker::SelectionType\fP"
261
This enum type describes the type of a selection. It can be or'd with \fBQwtPicker::RectSelectionType\fP and \fBQwtPicker::SelectionMode\fP and passed to \fBQwtPicker::setSelectionFlags()\fP
265
Selection is disabled. Note this is different to the disabled state, as you might have a tracker.
269
Select a single point.
280
The default value is NoSelection.
284
\fBQwtPicker::setSelectionFlags()\fP, \fBQwtPicker::selectionFlags()\fP
289
Definition at line 117 of file qwt_picker.h.
290
.SS "enum \fBQwtPicker::RectSelectionType\fP"
292
Selection subtype for RectSelection This enum type describes the type of rectangle selections. It can be or'd with \fBQwtPicker::RectSelectionType\fP and \fBQwtPicker::SelectionMode\fP and passed to \fBQwtPicker::setSelectionFlags()\fP.
296
The first and the second selected point are the corners of the rectangle.
300
The first point is the center, the second a corner of the rectangle.
304
The first point is the center of a quadrat, calculated by the maximum of the x- and y-distance.
308
The default value is CornerToCorner.
312
\fBQwtPicker::setSelectionFlags()\fP, \fBQwtPicker::selectionFlags()\fP
317
Definition at line 143 of file qwt_picker.h.
318
.SS "enum \fBQwtPicker::SelectionMode\fP"
320
Values of this enum type or'd together with a SelectionType value identifies which state machine should be used for the selection.
322
The default value is ClickSelection.
331
Definition at line 157 of file qwt_picker.h.
332
.SS "enum \fBQwtPicker::RubberBand\fP"
340
HLineRubberBand & PointSelection
344
VLineRubberBand & PointSelection
348
CrossRubberBand & PointSelection
350
A horizontal and a vertical line.
352
RectRubberBand & RectSelection
356
EllipseRubberBand & RectSelection
360
PolygonRubberBand &PolygonSelection
366
Values >= UserRubberBand can be used to define additional rubber bands.
369
The default value is NoRubberBand.
373
\fBQwtPicker::setRubberBand()\fP, \fBQwtPicker::rubberBand()\fP
378
Definition at line 187 of file qwt_picker.h.
379
.SS "enum \fBQwtPicker::DisplayMode\fP"
392
Display only when the selection is active.
397
\fBQwtPicker::setTrackerMode()\fP, \fBQwtPicker::trackerMode()\fP, \fBQwtPicker::isActive()\fP
402
Definition at line 217 of file qwt_picker.h.
403
.SS "enum \fBQwtPicker::ResizeMode\fP"
405
Controls what to do with the selected points of an active selection when the observed widget is resized.
409
All points are scaled according to the new size,
413
All points remain unchanged.
416
The default value is Stretch.
420
\fBQwtPicker::setResizeMode()\fP, QwtPicker::resize()
425
Definition at line 236 of file qwt_picker.h.
426
.SH "Constructor & Destructor Documentation"
428
.SS "QwtPicker::QwtPicker (QWidget * parent)\fC [explicit]\fP"
432
Creates an picker that is enabled, but where selection flag is set to NoSelection, rubberband and tracker are disabled.
436
\fIparent\fP Parent widget, that will be observed
441
Definition at line 249 of file qwt_picker.cpp.
442
.SS "QwtPicker::QwtPicker (int selectionFlags, \fBRubberBand\fP rubberBand, \fBDisplayMode\fP trackerMode, QWidget * parent)\fC [explicit]\fP"
448
\fIselectionFlags\fP Or'd value of SelectionType, RectSelectionType and SelectionMode
450
\fIrubberBand\fP Rubberband style
452
\fItrackerMode\fP Tracker mode
454
\fIparent\fP Parent widget, that will be observed
459
Definition at line 264 of file qwt_picker.cpp.
460
.SS "QwtPicker::~QwtPicker ()\fC [virtual]\fP"
464
Definition at line 272 of file qwt_picker.cpp.
465
.SH "Member Function Documentation"
467
.SS "void QwtPicker::setSelectionFlags (int flags)\fC [virtual]\fP"
469
Set the selection flags
473
\fIflags\fP Or'd value of SelectionType, RectSelectionType and SelectionMode. The default value is NoSelection.
478
\fBselectionFlags()\fP, \fBSelectionType\fP, \fBRectSelectionType\fP, \fBSelectionMode\fP
483
Reimplemented in \fBQwtPlotZoomer\fP.
485
Definition at line 403 of file qwt_picker.cpp.
487
References stateMachine().
489
Referenced by QwtPlotZoomer::setSelectionFlags().
490
.SS "int QwtPicker::selectionFlags () const"
494
Selection flags, an Or'd value of SelectionType, RectSelectionType and SelectionMode.
499
\fBsetSelectionFlags()\fP, \fBSelectionType\fP, \fBRectSelectionType\fP, \fBSelectionMode\fP
504
Definition at line 414 of file qwt_picker.cpp.
506
Referenced by drawRubberBand(), and QwtPlotPicker::end().
507
.SS "void QwtPicker::setRubberBand (\fBRubberBand\fP rubberBand)\fC [virtual]\fP"
509
Set the rubberband style
513
\fIrubberBand\fP Rubberband style The default value is NoRubberBand.
518
\fBrubberBand()\fP, \fBRubberBand\fP, \fBsetRubberBandPen()\fP
523
Definition at line 427 of file qwt_picker.cpp.
524
.SS "\fBQwtPicker::RubberBand\fP QwtPicker::rubberBand () const"
533
\fBsetRubberBand()\fP, \fBRubberBand\fP, \fBrubberBandPen()\fP
538
Definition at line 436 of file qwt_picker.cpp.
540
Referenced by drawRubberBand(), trackerRect(), QwtPlotPicker::trackerText(), trackerText(), and updateDisplay().
541
.SS "void QwtPicker::setTrackerMode (\fBDisplayMode\fP mode)\fC [virtual]\fP"
543
Set the display mode of the tracker.
545
A tracker displays information about current position of the cursor as a string. The display mode controls if the tracker has to be displayed whenever the observed widget has focus and cursor (AlwaysOn), never (AlwaysOff), or only when the selection is active (ActiveOnly).
549
\fImode\fP Tracker display mode
554
In case of AlwaysOn, mouseTracking will be enabled for the observed widget.
559
\fBtrackerMode()\fP, \fBDisplayMode\fP
564
Definition at line 457 of file qwt_picker.cpp.
565
.SS "\fBQwtPicker::DisplayMode\fP QwtPicker::trackerMode () const"
574
\fBsetTrackerMode()\fP, \fBDisplayMode\fP
579
Definition at line 470 of file qwt_picker.cpp.
581
Referenced by begin(), end(), trackerRect(), and updateDisplay().
582
.SS "void QwtPicker::setResizeMode (\fBResizeMode\fP mode)\fC [virtual]\fP"
586
The resize mode controls what to do with the selected points of an active selection when the observed widget is resized.
588
Stretch means the points are scaled according to the new size, KeepSize means the points remain unchanged.
590
The default mode is Stretch.
594
\fImode\fP Resize mode
599
\fBresizeMode()\fP, \fBResizeMode\fP
604
Definition at line 489 of file qwt_picker.cpp.
605
.SS "\fBQwtPicker::ResizeMode\fP QwtPicker::resizeMode () const"
614
\fBsetResizeMode()\fP, \fBResizeMode\fP
619
Definition at line 499 of file qwt_picker.cpp.
620
.SS "void QwtPicker::setRubberBandPen (const QPen & pen)\fC [virtual]\fP"
622
Set the pen for the rubberband
626
\fIpen\fP Rubberband pen
631
\fBrubberBandPen()\fP, \fBsetRubberBand()\fP
636
Definition at line 597 of file qwt_picker.cpp.
638
References updateDisplay().
639
.SS "QPen QwtPicker::rubberBandPen () const"
648
\fBsetRubberBandPen()\fP, \fBrubberBand()\fP
653
Definition at line 610 of file qwt_picker.cpp.
655
Referenced by drawRubberBand(), and updateDisplay().
656
.SS "void QwtPicker::setTrackerPen (const QPen & pen)\fC [virtual]\fP"
658
Set the pen for the tracker
662
\fIpen\fP Tracker pen
667
\fBtrackerPen()\fP, \fBsetTrackerMode()\fP, \fBsetTrackerFont()\fP
672
Definition at line 573 of file qwt_picker.cpp.
674
References updateDisplay().
675
.SS "QPen QwtPicker::trackerPen () const"
684
\fBsetTrackerPen()\fP, \fBtrackerMode()\fP, \fBtrackerFont()\fP
689
Definition at line 586 of file qwt_picker.cpp.
691
Referenced by updateDisplay().
692
.SS "void QwtPicker::setTrackerFont (const QFont & font)\fC [virtual]\fP"
694
Set the font for the tracker
698
\fIfont\fP Tracker font
703
\fBtrackerFont()\fP, \fBsetTrackerMode()\fP, \fBsetTrackerPen()\fP
708
Definition at line 548 of file qwt_picker.cpp.
710
References updateDisplay().
711
.SS "QFont QwtPicker::trackerFont () const"
720
\fBsetTrackerFont()\fP, \fBtrackerMode()\fP, \fBtrackerPen()\fP
725
Definition at line 562 of file qwt_picker.cpp.
726
.SS "bool QwtPicker::isEnabled () const"
730
true when enabled, false otherwise
735
\fBsetEnabled\fP, \fBeventFilter()\fP
740
Definition at line 537 of file qwt_picker.cpp.
741
.SS "void QwtPicker::setEnabled (bool enabled)\fC [virtual]\fP"
743
En/disable the picker.
745
When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.
749
\fIenabled\fP true or false
754
\fBisEnabled()\fP, \fBeventFilter()\fP
759
Definition at line 513 of file qwt_picker.cpp.
761
References parentWidget(), and updateDisplay().
762
.SS "bool QwtPicker::isActive () const"
764
A picker is active between \fBbegin()\fP and \fBend()\fP.
768
true if the selection is active.
773
Definition at line 1265 of file qwt_picker.cpp.
775
Referenced by drawRubberBand(), reset(), trackerRect(), updateDisplay(), QwtPlotZoomer::widgetKeyPressEvent(), widgetLeaveEvent(), and widgetMouseMoveEvent().
776
.SS "bool QwtPicker::eventFilter (QObject * o, QEvent * e)\fC [virtual]\fP"
780
When \fBisEnabled()\fP == true all events of the observed widget are filtered. Mouse and keyboard events are translated into widgetMouse- and widgetKey- and widgetWheel-events. Paint and Resize events are handled to keep rubberband and tracker up to date.
784
event(), \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
789
Definition at line 852 of file qwt_picker.cpp.
791
References parentWidget(), stretchSelection(), widgetKeyPressEvent(), widgetKeyReleaseEvent(), widgetLeaveEvent(), widgetMouseDoubleClickEvent(), widgetMouseMoveEvent(), widgetMousePressEvent(), widgetMouseReleaseEvent(), and widgetWheelEvent().
792
.SS "QWidget * QwtPicker::parentWidget ()"
794
Return the parent widget, where the selection happens.
796
Definition at line 375 of file qwt_picker.cpp.
798
Referenced by begin(), QwtPlotPicker::canvas(), eventFilter(), pickRect(), setEnabled(), transition(), updateDisplay(), and widgetKeyPressEvent().
799
.SS "const QWidget * QwtPicker::parentWidget () const"
801
Return the parent widget, where the selection happens.
803
Definition at line 385 of file qwt_picker.cpp.
804
.SS "QRect QwtPicker::pickRect () const\fC [virtual]\fP"
806
Find the area of the observed widget, where selection might happen.
810
QFrame::contentsRect() if it is a QFrame, QWidget::rect() otherwise.
815
Definition at line 1344 of file qwt_picker.cpp.
817
References parentWidget().
819
Referenced by drawRubberBand(), trackerRect(), widgetKeyPressEvent(), widgetMouseMoveEvent(), and widgetWheelEvent().
820
.SS "const QwtPolygon & QwtPicker::selection () const"
822
Return Selected points.
824
Definition at line 1271 of file qwt_picker.cpp.
826
Referenced by QwtPlotZoomer::end(), and QwtPlotPicker::end().
827
.SS "void QwtPicker::drawRubberBand (QPainter * painter) const\fC [virtual]\fP"
829
Draw a rubberband , depending on \fBrubberBand()\fP and \fBselectionFlags()\fP
833
\fIpainter\fP Painter, initialized with clip rect
838
\fBrubberBand()\fP, \fBRubberBand\fP, \fBselectionFlags()\fP
843
Definition at line 654 of file qwt_picker.cpp.
845
References QwtPainter::drawEllipse(), QwtPainter::drawLine(), QwtPainter::drawRect(), isActive(), pickRect(), rubberBand(), rubberBandPen(), and selectionFlags().
846
.SS "void QwtPicker::drawTracker (QPainter * painter) const\fC [virtual]\fP"
852
\fIpainter\fP Painter
857
\fBtrackerRect()\fP, \fBtrackerText()\fP
862
Definition at line 749 of file qwt_picker.cpp.
864
References QwtText::draw(), QwtText::isEmpty(), QwtText::setFont(), trackerRect(), trackerText(), and QwtText::usedFont().
865
.SS "\fBQwtText\fP QwtPicker::trackerText (const QPoint & pos) const\fC [virtual]\fP"
867
Return the label for a position.
869
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 ',' .
871
The format for the string conversion is '%d'.
880
Converted position as string
885
Reimplemented in \fBQwtPlotPicker\fP.
887
Definition at line 628 of file qwt_picker.cpp.
889
References rubberBand().
891
Referenced by drawTracker(), and trackerRect().
892
.SS "void QwtPicker::selected (const QwtPolygon & pa)\fC [signal]\fP"
894
A signal emitting the selected points, at the end of a selection.
898
\fIpa\fP Selected points
904
.SS "void QwtPicker::appended (const QPoint & pos)\fC [signal]\fP"
906
A signal emitted when a point has been appended to the selection
910
\fIpos\fP Position of the appended point.
915
\fBappend()\fP. \fBmoved()\fP
920
Referenced by append().
921
.SS "void QwtPicker::moved (const QPoint & pos)\fC [signal]\fP"
923
A signal emitted whenever the last appended point of the selection has been moved.
927
\fIpos\fP Position of the moved last point of the selection.
932
\fBmove()\fP, \fBappended()\fP
937
Referenced by move().
938
.SS "void QwtPicker::changed (const QwtPolygon & pa)\fC [signal]\fP"
940
A signal emitted when the active selection has been changed. This might happen when the observed widget is resized.
944
\fIpa\fP Changed selection
949
\fBstretchSelection()\fP
954
Referenced by stretchSelection().
955
.SS "bool QwtPicker::accept (QwtPolygon & selection) const\fC [protected, virtual]\fP"
957
Validate and fixup the selection.
959
Accepts all selections unmodified
963
\fIselection\fP Selection to validate and fixup
968
true, when accepted, false otherwise
973
Reimplemented in \fBQwtPlotZoomer\fP.
975
Definition at line 1256 of file qwt_picker.cpp.
978
.SS "void QwtPicker::transition (const QEvent * e)\fC [protected, virtual]\fP"
980
Passes an event to the state machine and executes the resulting commands. Append and Move commands use the current position of the cursor (QCursor::pos()).
989
Definition at line 1079 of file qwt_picker.cpp.
991
References append(), begin(), end(), move(), and parentWidget().
993
Referenced by widgetKeyPressEvent(), widgetKeyReleaseEvent(), widgetMouseDoubleClickEvent(), widgetMouseMoveEvent(), widgetMousePressEvent(), widgetMouseReleaseEvent(), and widgetWheelEvent().
994
.SS "void QwtPicker::begin ()\fC [protected, virtual]\fP"
996
Open a selection setting the state to active
1000
\fBisActive\fP, \fBend()\fP, \fBappend()\fP, \fBmove()\fP
1005
Reimplemented in \fBQwtPlotZoomer\fP.
1007
Definition at line 1136 of file qwt_picker.cpp.
1009
References parentWidget(), trackerMode(), and updateDisplay().
1011
Referenced by QwtPlotZoomer::begin(), and transition().
1012
.SS "void QwtPicker::append (const QPoint & pos)\fC [protected, virtual]\fP"
1014
Append a point to the selection and update rubberband and tracker. The \fBappended()\fP signal is emitted.
1018
\fIpos\fP Additional point
1023
\fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBmove()\fP, \fBappended()\fP
1028
Reimplemented in \fBQwtPlotPicker\fP.
1030
Definition at line 1215 of file qwt_picker.cpp.
1032
References appended(), and updateDisplay().
1034
Referenced by QwtPlotPicker::append(), and transition().
1035
.SS "void QwtPicker::move (const QPoint & pos)\fC [protected, virtual]\fP"
1037
Move the last point of the selection The \fBmoved()\fP signal is emitted.
1041
\fIpos\fP New position
1046
\fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBappend()\fP
1051
Reimplemented in \fBQwtPlotPicker\fP.
1053
Definition at line 1237 of file qwt_picker.cpp.
1055
References moved(), and updateDisplay().
1057
Referenced by QwtPlotPicker::move(), and transition().
1058
.SS "bool QwtPicker::end (bool ok = \fCtrue\fP)\fC [protected, virtual]\fP"
1060
Close a selection setting the state to inactive.
1062
The selection is validated and maybe fixed by \fBQwtPicker::accept()\fP.
1066
\fIok\fP If true, complete the selection and emit a selected signal otherwise discard the selection.
1071
true if the selection is accepted, false otherwise
1076
\fBisActive\fP, \fBbegin()\fP, \fBappend()\fP, \fBmove()\fP, \fBselected()\fP, \fBaccept()\fP
1081
Reimplemented in \fBQwtPlotPicker\fP, and \fBQwtPlotZoomer\fP.
1083
Definition at line 1168 of file qwt_picker.cpp.
1085
References accept(), selected(), trackerMode(), and updateDisplay().
1087
Referenced by QwtPlotPicker::end(), reset(), and transition().
1088
.SS "void QwtPicker::reset ()\fC [protected, virtual]\fP"
1090
Reset the state machine and terminate (end(false)) the selection
1092
Definition at line 1198 of file qwt_picker.cpp.
1094
References end(), and isActive().
1096
Referenced by widgetKeyPressEvent().
1097
.SS "void QwtPicker::widgetMousePressEvent (QMouseEvent * e)\fC [protected, virtual]\fP"
1099
Handle a mouse press event for the observed widget.
1101
Begin and/or end a selection depending on the selection flags.
1105
\fBQwtPicker\fP, \fBselectionFlags()\fP
1107
\fBeventFilter()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1112
Definition at line 912 of file qwt_picker.cpp.
1114
References transition().
1116
Referenced by eventFilter().
1117
.SS "void QwtPicker::widgetMouseReleaseEvent (QMouseEvent * e)\fC [protected, virtual]\fP"
1119
Handle a mouse relase event for the observed widget.
1121
End a selection depending on the selection flags.
1125
\fBQwtPicker\fP, \fBselectionFlags()\fP
1127
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1132
Reimplemented in \fBQwtPlotZoomer\fP.
1134
Definition at line 963 of file qwt_picker.cpp.
1136
References transition().
1138
Referenced by eventFilter(), and QwtPlotZoomer::widgetMouseReleaseEvent().
1139
.SS "void QwtPicker::widgetMouseDoubleClickEvent (QMouseEvent * me)\fC [protected, virtual]\fP"
1141
Handle mouse double click event for the observed widget.
1143
Empty implementation, does nothing.
1147
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1152
Definition at line 977 of file qwt_picker.cpp.
1154
References transition().
1156
Referenced by eventFilter().
1157
.SS "void QwtPicker::widgetMouseMoveEvent (QMouseEvent * e)\fC [protected, virtual]\fP"
1159
Handle a mouse move event for the observed widget.
1161
Move the last point of the selection in case of \fBisActive()\fP == true
1165
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1170
Definition at line 926 of file qwt_picker.cpp.
1172
References isActive(), pickRect(), transition(), and updateDisplay().
1174
Referenced by eventFilter().
1175
.SS "void QwtPicker::widgetWheelEvent (QWheelEvent * e)\fC [protected, virtual]\fP"
1177
Handle a wheel event for the observed widget.
1179
Move the last point of the selection in case of \fBisActive()\fP == true
1183
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1188
Definition at line 992 of file qwt_picker.cpp.
1190
References pickRect(), transition(), and updateDisplay().
1192
Referenced by eventFilter().
1193
.SS "void QwtPicker::widgetKeyPressEvent (QKeyEvent * ke)\fC [protected, virtual]\fP"
1195
Handle a key press event for the observed widget.
1197
Selections can be completely done by the keyboard. The arrow keys move the cursor, the abort key aborts a selection. All other keys are handled by the current state machine.
1201
\fBQwtPicker\fP, \fBselectionFlags()\fP
1203
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyReleaseEvent()\fP, \fBstateMachine()\fP, \fBQwtEventPattern::KeyPatternCode\fP
1208
Reimplemented in \fBQwtPlotZoomer\fP.
1210
Definition at line 1017 of file qwt_picker.cpp.
1212
References QwtEventPattern::keyMatch(), parentWidget(), pickRect(), reset(), and transition().
1214
Referenced by eventFilter(), and QwtPlotZoomer::widgetKeyPressEvent().
1215
.SS "void QwtPicker::widgetKeyReleaseEvent (QKeyEvent * ke)\fC [protected, virtual]\fP"
1217
Handle a key release event for the observed widget.
1219
Passes the event to the state machine.
1223
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBstateMachine()\fP
1228
Definition at line 1067 of file qwt_picker.cpp.
1230
References transition().
1232
Referenced by eventFilter().
1233
.SS "void QwtPicker::widgetLeaveEvent (QEvent *)\fC [protected, virtual]\fP"
1235
Handle a leave event for the observed widget.
1239
\fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseDoubleClickEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP, \fBwidgetKeyReleaseEvent()\fP
1244
Definition at line 946 of file qwt_picker.cpp.
1246
References isActive(), and updateDisplay().
1248
Referenced by eventFilter().
1249
.SS "void QwtPicker::stretchSelection (const QSize & oldSize, const QSize & newSize)\fC [protected, virtual]\fP"
1251
Scale the selection by the ratios of oldSize and newSize The \fBchanged()\fP signal is emitted.
1255
\fIoldSize\fP Previous size
1257
\fInewSize\fP Current size
1262
\fBResizeMode\fP, \fBsetResizeMode()\fP, \fBresizeMode()\fP
1267
Definition at line 1285 of file qwt_picker.cpp.
1269
References changed().
1271
Referenced by eventFilter().
1272
.SS "\fBQwtPickerMachine\fP * QwtPicker::stateMachine (int flags) const\fC [protected, virtual]\fP"
1274
Create a state machine depending on the selection flags.
1277
PointSelection | ClickSelection
1279
QwtPickerClickPointMachine()
1281
PointSelection | DragSelection
1283
QwtPickerDragPointMachine()
1285
RectSelection | ClickSelection
1287
QwtPickerClickRectMachine()
1289
RectSelection | DragSelection
1291
QwtPickerDragRectMachine()
1295
QwtPickerPolygonMachine()
1300
\fBsetSelectionFlags()\fP
1305
Definition at line 351 of file qwt_picker.cpp.
1307
Referenced by setSelectionFlags().
1311
Generated automatically by Doxygen for Qwt User's Guide from the source code.