100 :
QwtPicker( rubberBand, trackerMode, canvas )
130 w = w->parentWidget();
132 return qobject_cast<
QwtPlot* >( w );
138 const QWidget* w =
canvas();
140 w = w->parentWidget();
142 return qobject_cast<
const QwtPlot* >( w );
160 rect = rect.normalized();
205 if (
plot() == NULL )
230 text = QString::number( pos.y(),
'f', 4 );
233 text = QString::number( pos.x(),
'f', 4 );
236 text = QString::number( pos.x(),
'f', 4 )
237 +
", " + QString::number( pos.y(),
'f', 4 );
291 if ( points.count() == 0 )
300 switch ( selectionType )
310 if ( points.count() >= 2 )
312 const QPoint p1 = points.first();
313 const QPoint p2 = points.last();
315 const QRect rect = QRect( p1, p2 ).normalized();
323 for (
int i = 0; i < points.count(); i++ )
394 #include "moc_qwt_plot_picker.cpp"
double invTransform(double p) const
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
double lowerBound() const
QwtAxisId xAxis() const
Return x axis.
virtual QwtText trackerText(const QPoint &) const QWT_OVERRIDE
The state machine not usable for any type of selection.
QwtAxisId yAxis() const
Return y axis.
QWidget * parentWidget()
Return the parent widget, where the selection happens.
QwtPlotPicker(QWidget *canvas)
Create a plot picker.
const QwtScaleDiv & axisScaleDiv(QwtAxisId) const
Return the scale division of a specified axis.
A class representing a scale division.
const QwtPickerMachine * stateMachine() const
double transform(double s) const
void appended(const QPointF &pos)
void moved(const QPointF &pos)
virtual QwtText trackerTextF(const QPointF &) const
Translate a position into a position string.
The state machine is for selecting a polygon (many points).
DisplayMode trackerMode() const
The state machine is for selecting a single point.
RubberBand rubberBand() const
virtual void setAxes(QwtAxisId xAxisId, QwtAxisId yAxisId)
SelectionType selectionType() const
Return the selection type.
Y axis right of the canvas.
A class representing a text.
void selected(const QPointF &pos)
virtual void move(const QPoint &)
Y axis left of the canvas.
bool isAxisVisible(QwtAxisId) const
A horizontal line ( only for QwtPickerMachine::PointSelection )
int QwtAxisId
Axis identifier.
virtual ~QwtPlotPicker()
Destructor.
QRect transform(const QRectF &) const
QPolygon selection() const
virtual bool end(bool ok=true) QWT_OVERRIDE
virtual QwtScaleMap canvasMap(QwtAxisId) const
A vertical line ( only for QwtPickerMachine::PointSelection )
virtual void append(const QPoint &) QWT_OVERRIDE
QRectF invTransform(const QRect &) const
virtual void move(const QPoint &) QWT_OVERRIDE
QwtPicker provides selections on a widget.
The state machine is for selecting a rectangle (2 points).
virtual void append(const QPoint &)