QwtPlotPicker

本文深入解析QwtPicker的核心组件——Tracker、StateMachine和RubberBand,并详细介绍了RubberBand的各种类型及其应用。同时,文章还讨论了QwtPicker如何过滤并转换事件以收集点,以及预定义的挑选机制如何工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

QwtPlotPicker ------------- >QwtPicker

QwtPicker的核心有三个:
1、Tracker
2、StateMachine 3、RubberBand

简单来说tracker就是在鼠标光标处显示当前坐标。
rubberBand则与stateMachine有关了。 rubberBand有很多种:
Enumerator:
NoRubberBand 

No rubberband.

HLineRubberBand 

A horizontal line ( only for QwtPicker::PointSelection )

VLineRubberBand 

A vertical line ( only for QwtPicker::PointSelection )

CrossRubberBand 

A crosshair ( only for QwtPicker::PointSelection )

RectRubberBand 

A rectangle ( only for QwtPicker::RectSelection )

EllipseRubberBand 

An ellipse ( only for QwtPicker::RectSelection )

PolygonRubberBand 

A polygon ( only for QwtPicker::&PolygonSelection )

UserRubberBand 

Values >= UserRubberBand can be used to define additional rubber bands.


但是必须与下面的machine对应,

QwtPicker filters all enter, leave, mouse and keyboard events of a widget and translates them into an array of selected points.

The way how the points are collected depends on type of state machine that is connected to the picker. Qwt offers a couple of predefined state machines for selecting:

While these state machines cover the most common ways to collect points it is also possible to implement individual machines as well.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值