92 QwtPicker( rubberBand, trackerMode, canvas ),
120 w = w->parentWidget();
122 return qobject_cast<
QwtPlot *>( w );
130 w = w->parentWidget();
132 return qobject_cast<
const QwtPlot *>( w );
150 rect = rect.normalized();
195 if (
plot() == NULL )
220 text.sprintf(
"%.4f", pos.y() );
223 text.sprintf(
"%.4f", pos.x() );
226 text.sprintf(
"%.4f, %.4f", pos.x(), pos.y() );
280 if ( points.count() == 0 )
289 switch ( selectionType )
299 if ( points.count() >= 2 )
301 const QPoint p1 = points.first();
302 const QPoint p2 = points.last();
304 const QRect rect = QRect( p1, p2 ).normalized();
311 QVector<QPointF> dpa( points.count() );
312 for (
int i = 0;
i < points.count();
i++ )
377 const QPointF p( xMap.
transform( pos.x() ),
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
int yAxis() const
Return y axis.
const QwtScaleDiv & axisScaleDiv(int axisId) const
Return the scale division of a specified axis.
DisplayMode trackerMode() const
QRect transform(const QRectF &) const
The state machine not usable for any type of selection.
QWidget * parentWidget()
Return the parent widget, where the selection happens.
QwtPlotPicker(QWidget *canvas)
Create a plot picker.
virtual bool end(bool ok=true)
Y axis right of the canvas.
A class representing a scale division.
virtual QwtText trackerTextF(const QPointF &) const
Translate a position into a position string.
bool axisEnabled(int axisId) const
QRectF invTransform(const QRect &) const
QPolygon selection() const
void appended(const QPointF &pos)
virtual void setAxis(int xAxis, int yAxis)
Y axis left of the canvas.
void moved(const QPointF &pos)
virtual QwtText trackerText(const QPoint &) const
The state machine is for selecting a polygon (many points).
virtual void append(const QPoint &)
const QwtPickerMachine * stateMachine() const
The state machine is for selecting a single point.
double lowerBound() const
RubberBand rubberBand() const
A class representing a text.
void selected(const QPointF &pos)
virtual QwtScaleMap canvasMap(int axisId) const
virtual void move(const QPoint &)
A horizontal line ( only for QwtPickerMachine::PointSelection )
double invTransform(double p) const
virtual ~QwtPlotPicker()
Destructor.
TFSIMD_FORCE_INLINE const tfScalar & w() const
int xAxis() const
Return x axis.
SelectionType selectionType() const
Return the selection type.
virtual void move(const QPoint &)
A vertical line ( only for QwtPickerMachine::PointSelection )
double transform(double s) const
QwtPicker provides selections on a widget.
The state machine is for selecting a rectangle (2 points).
virtual void append(const QPoint &)