Qwt Polar User's Guide 1.0.0
Signals | Public Member Functions | Protected Member Functions

QwtPolarPicker Class Reference

QwtPolarPicker provides selections on a plot canvas. More...

#include <qwt_polar_picker.h>

List of all members.

Signals

void selected (const QwtPointPolar &pos)
void selected (const QVector< QwtPointPolar > &points)
void appended (const QwtPointPolar &pos)
void moved (const QwtPointPolar &pos)

Public Member Functions

 QwtPolarPicker (QwtPolarCanvas *)
virtual ~QwtPolarPicker ()
 QwtPolarPicker (RubberBand rubberBand, DisplayMode trackerMode, QwtPolarCanvas *)
QwtPolarPlotplot ()
const QwtPolarPlotplot () const
QwtPolarCanvascanvas ()
const QwtPolarCanvascanvas () const
virtual QRect pickRect () const

Protected Member Functions

QwtPointPolar invTransform (const QPoint &) const
virtual QwtText trackerText (const QPoint &) const
virtual QwtText trackerTextPolar (const QwtPointPolar &) const
virtual void move (const QPoint &)
virtual void append (const QPoint &)
virtual bool end (bool ok=true)

Detailed Description

QwtPolarPicker provides selections on a plot canvas.

QwtPolarPicker is a QwtPicker tailored for selections on a polar plot canvas.


Constructor & Destructor Documentation

QwtPolarPicker::QwtPolarPicker ( QwtPolarCanvas canvas) [explicit]

Create a polar plot picker.

Parameters:
canvasPlot canvas to observe, also the parent object
QwtPolarPicker::~QwtPolarPicker ( ) [virtual]

Destructor.

QwtPolarPicker::QwtPolarPicker ( RubberBand  rubberBand,
DisplayMode  trackerMode,
QwtPolarCanvas canvas 
) [explicit]

Create a plot picker

Parameters:
rubberBandRubberband style
trackerModeTracker mode
canvasPlot canvas to observe, also the parent object
See also:
QwtPicker, QwtPicker::setSelectionFlags(), QwtPicker::setRubberBand(), QwtPicker::setTrackerMode
QwtPolarPlot::autoReplot(), QwtPolarPlot::replot(), scaleRect()

Member Function Documentation

void QwtPolarPicker::append ( const QPoint &  pos) [protected, virtual]

Append a point to the selection and update rubberband and tracker.

Parameters:
posAdditional point
See also:
isActive, begin(), end(), move(), appended()
Note:
The appended(const QPoint &), appended(const QDoublePoint &) signals are emitted.
void QwtPolarPicker::appended ( const QwtPointPolar &  pos) [signal]

A signal emitted when a point has been appended to the selection

Parameters:
posPosition of the appended point.
See also:
append(). moved()
QwtPolarCanvas * QwtPolarPicker::canvas ( )
Returns:
Observed plot canvas
const QwtPolarCanvas * QwtPolarPicker::canvas ( ) const
Returns:
Observed plot canvas
bool QwtPolarPicker::end ( bool  ok = true) [protected, virtual]

Close a selection setting the state to inactive.

Parameters:
okIf true, complete the selection and emit selected signals otherwise discard the selection.
Returns:
true if the selection is accepted, false otherwise
QwtPointPolar QwtPolarPicker::invTransform ( const QPoint &  pos) const [protected]

Translate a point from widget into plot coordinates

Parameters:
posPoint in widget coordinates of the plot canvas
Returns:
Point in plot coordinates
See also:
transform(), canvas()
void QwtPolarPicker::move ( const QPoint &  pos) [protected, virtual]

Move the last point of the selection

Parameters:
posNew position
See also:
isActive, begin(), end(), append()
Note:
The moved(const QPoint &), moved(const QDoublePoint &) signals are emitted.
void QwtPolarPicker::moved ( const QwtPointPolar &  pos) [signal]

A signal emitted whenever the last appended point of the selection has been moved.

Parameters:
posPosition of the moved last point of the selection.
See also:
move(), appended()
QRect QwtPolarPicker::pickRect ( ) const [virtual]
Returns:
Bounding rectangle of the region, where picking is supported.
const QwtPolarPlot * QwtPolarPicker::plot ( ) const
Returns:
Plot widget, containing the observed plot canvas
QwtPolarPlot * QwtPolarPicker::plot ( )
Returns:
Plot widget, containing the observed plot canvas
void QwtPolarPicker::selected ( const QVector< QwtPointPolar > &  points) [signal]

A signal emitting the selected points, at the end of a selection.

Parameters:
pointsSelected points
void QwtPolarPicker::selected ( const QwtPointPolar &  pos) [signal]

A signal emitted in case of selectionFlags() & PointSelection.

Parameters:
posSelected point
QwtText QwtPolarPicker::trackerText ( const QPoint &  pos) const [protected, virtual]

Translate a pixel position into a position string

Parameters:
posPosition in pixel coordinates
Returns:
Position string
QwtText QwtPolarPicker::trackerTextPolar ( const QwtPointPolar &  pos) const [protected, virtual]

Translate a position into a position string.

In case of HLineRubberBand the label is the value of the y position, in case of VLineRubberBand the value of the x position. Otherwise the label contains x and y position separated by a ',' .

The format for the double to string conversion is "%.4f".

Parameters:
posPosition
Returns:
Position string