9#include "qwt_polar_picker.h"
10#include "qwt_polar_plot.h"
11#include "qwt_polar_canvas.h"
12#include "qwt_scale_map.h"
13#include "qwt_picker_machine.h"
14#include "qwt_point_polar.h"
16class QwtPolarPicker::PrivateData
45 :
QwtPicker( rubberBand, trackerMode, canvas )
58 return qobject_cast< QwtPolarCanvas* >(
parentWidget() );
64 return qobject_cast< const QwtPolarCanvas* >(
parentWidget() );
113 const QString text = QString::number( pos.
radius(),
'f', 4 )
114 +
", " + QString::number( pos.
azimuth(),
'f', 4 );
168 if ( points.count() == 0 )
177 switch ( selectionType )
189 for (
int i = 0; i < points.count(); i++ )
223 const QRect cr =
canvas()->contentsRect();
231 const QRect cr =
canvas()->contentsRect();
234 crPath.addRect( cr );
237 prPath.addEllipse(
plot()->plotRect( cr ) );
239 return crPath.intersected( prPath );
242#include "moc_qwt_polar_picker.cpp"
QwtPicker provides selections on a widget.
virtual void move(const QPoint &)
virtual void append(const QPoint &)
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
QWidget * parentWidget()
Return the parent widget, where the selection happens.
const QwtPickerMachine * stateMachine() const
QPolygon selection() const
@ NoSelection
The state machine not usable for any type of selection.
@ RectSelection
The state machine is for selecting a rectangle (2 points).
@ PolygonSelection
The state machine is for selecting a polygon (many points).
@ PointSelection
The state machine is for selecting a single point.
SelectionType selectionType() const
Return the selection type.
A point in polar coordinates.
double radius() const
Returns the radius.
double azimuth() const
Returns the azimuth.
Canvas of a QwtPolarPlot.
QwtPointPolar invTransform(const QPoint &) const
virtual QRect pickRect() const
virtual QwtText trackerTextPolar(const QwtPointPolar &) const
Translate a position into a position string.
QwtPointPolar invTransform(const QPoint &) const
void selected(const QwtPointPolar &pos)
virtual ~QwtPolarPicker()
Destructor.
void moved(const QwtPointPolar &pos)
QwtPolarCanvas * canvas()
virtual void move(const QPoint &) override
virtual QwtText trackerText(const QPoint &) const override
virtual QPainterPath pickArea() const override
void appended(const QwtPointPolar &pos)
virtual void append(const QPoint &) override
virtual bool end(bool ok=true) override
QwtPolarPicker(QwtPolarCanvas *)
Create a polar plot picker.
A plotting widget, displaying a polar coordinate system.
A class representing a text.