30#include "qwt_global.h"
31#include "qwt_event_pattern.h"
36#include <QPainterPath>
113 Q_PROPERTY(
bool isEnabled READ isEnabled WRITE setEnabled)
114 Q_PROPERTY(
ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
116 Q_PROPERTY(
DisplayMode trackerMode READ trackerMode WRITE setTrackerMode)
117 Q_PROPERTY(QPen trackerPen READ trackerPen WRITE setTrackerPen)
118 Q_PROPERTY(QFont trackerFont READ trackerFont WRITE setTrackerFont)
120 Q_PROPERTY(
RubberBand rubberBand READ rubberBand WRITE setRubberBand)
121 Q_PROPERTY(QPen rubberBandPen READ rubberBandPen WRITE setRubberBandPen)
191 explicit QwtPicker(RubberBand rubberBand, DisplayMode trackerMode, QWidget*);
204 void setRubberBand(RubberBand);
206 RubberBand rubberBand()
const;
209 void setTrackerMode(DisplayMode);
211 DisplayMode trackerMode()
const;
214 void setResizeMode(ResizeMode);
216 ResizeMode resizeMode()
const;
219 void setRubberBandPen(
const QPen&);
221 QPen rubberBandPen()
const;
224 void setTrackerPen(
const QPen&);
226 QPen trackerPen()
const;
229 void setTrackerFont(
const QFont&);
231 QFont trackerFont()
const;
234 bool isEnabled()
const;
236 bool isActive()
const;
239 virtual bool eventFilter(QObject*, QEvent*)
override;
242 QWidget* parentWidget();
244 const QWidget* parentWidget()
const;
247 virtual QPainterPath pickArea()
const;
250 virtual void drawRubberBand(QPainter*)
const;
252 virtual void drawTracker(QPainter*)
const;
255 virtual QRegion trackerMask()
const;
257 virtual QRegion rubberBandMask()
const;
260 virtual QwtText trackerText(
const QPoint& pos)
const;
262 virtual QRect trackerRect(
const QFont&)
const;
264 virtual void setTrackerPosition(
const QPoint& pos);
266 QPoint trackerPosition()
const;
268 QPolygon selection()
const;
272 void setActive(
bool on);
275 void setEnabled(
bool);
322 virtual QPolygon adjustedPoints(
const QPolygon&)
const;
324 virtual void transition(
const QEvent*);
326 virtual void begin();
327 virtual void append(
const QPoint&);
328 virtual void move(
const QPoint&);
329 virtual void remove();
330 virtual bool end(
bool ok =
true);
332 virtual bool accept(QPolygon&)
const;
333 virtual void reset();
335 virtual void widgetMousePressEvent(QMouseEvent*);
336 virtual void widgetMouseReleaseEvent(QMouseEvent*);
337 virtual void widgetMouseDoubleClickEvent(QMouseEvent*);
338 virtual void widgetMouseMoveEvent(QMouseEvent*);
339 virtual void widgetWheelEvent(QWheelEvent*);
340 virtual void widgetKeyPressEvent(QKeyEvent*);
341 virtual void widgetKeyReleaseEvent(QKeyEvent*);
342 virtual void widgetEnterEvent(QEvent*);
343 virtual void widgetLeaveEvent(QEvent*);
345 virtual void stretchSelection(
const QSize& oldSize,
const QSize& newSize);
347 virtual void updateDisplay();
352 const QPolygon& pickedPoints()
const;
357 void setMouseTracking(
bool);
A collection of event patterns
Definition qwt_event_pattern.h:46
A state machine for QwtPicker selections
Definition qwt_picker_machine.h:45
QwtPicker provides selections on a widget
Definition qwt_picker.h:108
DisplayMode
Display mode
Definition qwt_picker.h:163
@ AlwaysOn
Display always
Definition qwt_picker.h:168
@ AlwaysOff
Display never
Definition qwt_picker.h:165
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:130
@ VLineRubberBand
A vertical line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:138
@ CrossRubberBand
A crosshair ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:141
@ EllipseRubberBand
An ellipse ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:147
@ PolygonRubberBand
A polygon ( only for QwtPickerMachine::PolygonSelection )
Definition qwt_picker.h:150
@ HLineRubberBand
A horizontal line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:135
@ RectRubberBand
A rectangle ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:144
ResizeMode
Controls what to do with the selected points when the observed widget is resized
Definition qwt_picker.h:180
@ Stretch
All points are scaled according to the new size,
Definition qwt_picker.h:182
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:70