30#include "qwt_global.h"
31#include "qwt_event_pattern.h"
36#include <QPainterPath>
162 Q_PROPERTY(
bool isEnabled READ isEnabled WRITE setEnabled)
163 Q_PROPERTY(
ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
165 Q_PROPERTY(
DisplayMode trackerMode READ trackerMode WRITE setTrackerMode)
166 Q_PROPERTY(QPen trackerPen READ trackerPen WRITE setTrackerPen)
167 Q_PROPERTY(QFont trackerFont READ trackerFont WRITE setTrackerFont)
169 Q_PROPERTY(
RubberBand rubberBand READ rubberBand WRITE setRubberBand)
170 Q_PROPERTY(QPen rubberBandPen READ rubberBandPen WRITE setRubberBandPen)
265 explicit QwtPicker(RubberBand rubberBand, DisplayMode trackerMode, QWidget*);
278 void setRubberBand(RubberBand);
280 RubberBand rubberBand()
const;
283 void setTrackerMode(DisplayMode);
285 DisplayMode trackerMode()
const;
288 void setResizeMode(ResizeMode);
290 ResizeMode resizeMode()
const;
293 void setRubberBandPen(
const QPen&);
295 QPen rubberBandPen()
const;
298 void setTrackerPen(
const QPen&);
300 QPen trackerPen()
const;
303 void setTrackerFont(
const QFont&);
305 QFont trackerFont()
const;
308 bool isEnabled()
const;
310 bool isActive()
const;
313 virtual bool eventFilter(QObject*, QEvent*)
override;
316 QWidget* parentWidget();
318 const QWidget* parentWidget()
const;
321 virtual QPainterPath pickArea()
const;
324 virtual void drawRubberBand(QPainter*)
const;
326 virtual void drawTracker(QPainter*)
const;
329 virtual QRegion trackerMask()
const;
331 virtual QRegion rubberBandMask()
const;
334 virtual QwtText trackerText(
const QPoint& pos)
const;
336 virtual QRect trackerRect(
const QFont&)
const;
338 virtual void setTrackerPosition(
const QPoint& pos);
340 QPoint trackerPosition()
const;
342 QPolygon selection()
const;
346 void setActive(
bool on);
349 void setEnabled(
bool);
438 virtual QPolygon adjustedPoints(
const QPolygon&)
const;
440 virtual void transition(
const QEvent*);
442 virtual void begin();
443 virtual void append(
const QPoint&);
444 virtual void move(
const QPoint&);
445 virtual void remove();
446 virtual bool end(
bool ok =
true);
448 virtual bool accept(QPolygon&)
const;
449 virtual void reset();
451 virtual void widgetMousePressEvent(QMouseEvent*);
452 virtual void widgetMouseReleaseEvent(QMouseEvent*);
453 virtual void widgetMouseDoubleClickEvent(QMouseEvent*);
454 virtual void widgetMouseMoveEvent(QMouseEvent*);
455 virtual void widgetWheelEvent(QWheelEvent*);
456 virtual void widgetKeyPressEvent(QKeyEvent*);
457 virtual void widgetKeyReleaseEvent(QKeyEvent*);
458 virtual void widgetEnterEvent(QEvent*);
459 virtual void widgetLeaveEvent(QEvent*);
461 virtual void stretchSelection(
const QSize& oldSize,
const QSize& newSize);
463 virtual void updateDisplay();
468 const QPolygon& pickedPoints()
const;
473 void setMouseTracking(
bool);
A collection of event patterns.
Definition qwt_event_pattern.h:54
A state machine for QwtPicker selections.
Definition qwt_picker_machine.h:51
QwtPicker provides selections on a widget.
Definition qwt_picker.h:157
DisplayMode
Display mode.
Definition qwt_picker.h:230
@ AlwaysOn
Display always.
Definition qwt_picker.h:235
@ AlwaysOff
Display never.
Definition qwt_picker.h:232
void selected(const QPolygon &polygon)
Signal emitting the selected points at the end of a selection.
void activated(bool on)
Signal indicating when the picker has been activated.
RubberBand
Rubber band style.
Definition qwt_picker.h:186
@ VLineRubberBand
A vertical line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:194
@ CrossRubberBand
A crosshair ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:197
@ EllipseRubberBand
An ellipse ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:203
@ PolygonRubberBand
A polygon ( only for QwtPickerMachine::PolygonSelection )
Definition qwt_picker.h:206
@ HLineRubberBand
A horizontal line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:191
@ RectRubberBand
A rectangle ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:200
ResizeMode
Controls what to do with the selected points when the observed widget is resized.
Definition qwt_picker.h:254
@ Stretch
All points are scaled according to the new size,.
Definition qwt_picker.h:256
void appended(const QPoint &pos)
Signal emitted when a point has been appended to the selection.
void moved(const QPoint &pos)
Signal emitted whenever the last appended point of the selection has been moved.
void removed(const QPoint &pos)
Signal emitted whenever the last appended point of the selection has been removed.
void changed(const QPolygon &selection)
Signal emitted when the active selection has been changed.
A class representing a text.
Definition qwt_text.h:93