30#include "qwt_global.h"
31#include "qwt_event_pattern.h"
36#include <QPainterPath>
156 Q_PROPERTY(
bool isEnabled READ isEnabled WRITE setEnabled)
157 Q_PROPERTY(
ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
159 Q_PROPERTY(
DisplayMode trackerMode READ trackerMode WRITE setTrackerMode)
160 Q_PROPERTY(QPen trackerPen READ trackerPen WRITE setTrackerPen)
161 Q_PROPERTY(QFont trackerFont READ trackerFont WRITE setTrackerFont)
163 Q_PROPERTY(
RubberBand rubberBand READ rubberBand WRITE setRubberBand)
164 Q_PROPERTY(QPen rubberBandPen READ rubberBandPen WRITE setRubberBandPen)
238 explicit QwtPicker(RubberBand rubberBand, DisplayMode trackerMode, QWidget*);
246 void setRubberBand(RubberBand);
247 RubberBand rubberBand()
const;
249 void setTrackerMode(DisplayMode);
250 DisplayMode trackerMode()
const;
252 void setResizeMode(ResizeMode);
253 ResizeMode resizeMode()
const;
255 void setRubberBandPen(
const QPen&);
256 QPen rubberBandPen()
const;
258 void setTrackerPen(
const QPen&);
259 QPen trackerPen()
const;
261 void setTrackerFont(
const QFont&);
262 QFont trackerFont()
const;
264 bool isEnabled()
const;
265 bool isActive()
const;
267 virtual bool eventFilter(QObject*, QEvent*) QWT_OVERRIDE;
269 QWidget* parentWidget();
270 const QWidget* parentWidget()
const;
272 virtual QPainterPath pickArea()
const;
274 virtual void drawRubberBand(QPainter*)
const;
275 virtual void drawTracker(QPainter*)
const;
277 virtual QRegion trackerMask()
const;
278 virtual QRegion rubberBandMask()
const;
280 virtual QwtText trackerText(
const QPoint& pos)
const;
281 virtual QRect trackerRect(
const QFont&)
const;
283 virtual void setTrackerPosition(
const QPoint& pos);
284 QPoint trackerPosition()
const;
285 QPolygon selection()
const;
289 void setActive(
bool on);
291 void setEnabled(
bool);
346 virtual QPolygon adjustedPoints(
const QPolygon&)
const;
348 virtual void transition(
const QEvent*);
350 virtual void begin();
351 virtual void append(
const QPoint&);
352 virtual void move(
const QPoint&);
353 virtual void remove();
354 virtual bool end(
bool ok =
true);
356 virtual bool accept(QPolygon&)
const;
357 virtual void reset();
359 virtual void widgetMousePressEvent(QMouseEvent*);
360 virtual void widgetMouseReleaseEvent(QMouseEvent*);
361 virtual void widgetMouseDoubleClickEvent(QMouseEvent*);
362 virtual void widgetMouseMoveEvent(QMouseEvent*);
363 virtual void widgetWheelEvent(QWheelEvent*);
364 virtual void widgetKeyPressEvent(QKeyEvent*);
365 virtual void widgetKeyReleaseEvent(QKeyEvent*);
366 virtual void widgetEnterEvent(QEvent*);
367 virtual void widgetLeaveEvent(QEvent*);
369 virtual void stretchSelection(
const QSize& oldSize,
const QSize& newSize);
371 virtual void updateDisplay();
376 const QPolygon& pickedPoints()
const;
381 void setMouseTracking(
bool);
A collection of event patterns.
Definition qwt_event_pattern.h:48
A state machine for QwtPicker selections.
Definition qwt_picker_machine.h:46
QwtPicker provides selections on a widget / QwtPicker 在一个部件(widget)上提供选择功能
Definition qwt_picker.h:151
DisplayMode
Display mode.
Definition qwt_picker.h:209
@ AlwaysOn
Display always.
Definition qwt_picker.h:214
@ AlwaysOff
Display never.
Definition qwt_picker.h:211
void selected(const QPolygon &polygon)
A signal emitting the selected points, at the end of a selection.
void activated(bool on)
A signal indicating, when the picker has been activated.
RubberBand
Rubber band style.
Definition qwt_picker.h:175
@ VLineRubberBand
A vertical line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:183
@ CrossRubberBand
A crosshair ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:186
@ EllipseRubberBand
An ellipse ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:192
@ PolygonRubberBand
A polygon ( only for QwtPickerMachine::PolygonSelection )
Definition qwt_picker.h:195
@ HLineRubberBand
A horizontal line ( only for QwtPickerMachine::PointSelection )
Definition qwt_picker.h:180
@ RectRubberBand
A rectangle ( only for QwtPickerMachine::RectSelection )
Definition qwt_picker.h:189
ResizeMode
Controls what to do with the selected points of an active selection when the observed widget is resiz...
Definition qwt_picker.h:229
@ Stretch
All points are scaled according to the new size,.
Definition qwt_picker.h:231
void appended(const QPoint &pos)
A signal emitted when a point has been appended to the selection.
void moved(const QPoint &pos)
A signal emitted whenever the last appended point of the selection has been moved.
void removed(const QPoint &pos)
A signal emitted whenever the last appended point of the selection has been removed.
void changed(const QPolygon &selection)
A signal emitted when the active selection has been changed.
A class representing a text.
Definition qwt_text.h:69