Qwt Polar User's Guide
Signals | Public Member Functions | Protected Member Functions | List of all members
QwtPolarPicker Class Reference

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

#include <qwt_polar_picker.h>

Inheritance diagram for QwtPolarPicker:
Inheritance graph
[legend]

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 *)
 Create a polar plot picker. More...
 
virtual ~QwtPolarPicker ()
 Destructor.
 
 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
 Translate a position into a position string. More...
 
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() [1/2]

QwtPolarPicker::QwtPolarPicker ( QwtPolarCanvas canvas)
explicit

Create a polar plot picker.

Parameters
canvasPlot canvas to observe, also the parent object

◆ QwtPolarPicker() [2/2]

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

◆ append()

void QwtPolarPicker::append ( const QPoint &  pos)
protectedvirtual

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.

◆ appended

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()

◆ canvas() [1/2]

QwtPolarCanvas * QwtPolarPicker::canvas ( )
Returns
Observed plot canvas

◆ canvas() [2/2]

const QwtPolarCanvas * QwtPolarPicker::canvas ( ) const
Returns
Observed plot canvas

◆ end()

bool QwtPolarPicker::end ( bool  ok = true)
protectedvirtual

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

◆ invTransform()

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()

◆ move()

void QwtPolarPicker::move ( const QPoint &  pos)
protectedvirtual

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.

◆ moved

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()

◆ pickRect()

QRect QwtPolarPicker::pickRect ( ) const
virtual
Returns
Bounding rectangle of the region, where picking is supported.

◆ plot() [1/2]

QwtPolarPlot * QwtPolarPicker::plot ( )
Returns
Plot widget, containing the observed plot canvas

◆ plot() [2/2]

const QwtPolarPlot * QwtPolarPicker::plot ( ) const
Returns
Plot widget, containing the observed plot canvas

◆ selected [1/2]

void QwtPolarPicker::selected ( const QwtPointPolar &  pos)
signal

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

Parameters
posSelected point

◆ selected [2/2]

void QwtPolarPicker::selected ( const QVector< QwtPointPolar > &  points)
signal

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

Parameters
pointsSelected points

◆ trackerText()

QwtText QwtPolarPicker::trackerText ( const QPoint &  pos) const
protectedvirtual

Translate a pixel position into a position string

Parameters
posPosition in pixel coordinates
Returns
Position string

◆ trackerTextPolar()

QwtText QwtPolarPicker::trackerTextPolar ( const QwtPointPolar &  pos) const
protectedvirtual

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