Qwt Polar User's Guide: QwtPolarPicker Class Reference

Qwt Polar User's Guide 1.1.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Typedefs Enumerations Enumerator Pages
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:
[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 *)
QwtPolarPlot * | plot ()
const QwtPolarPlot * | plot () const
QwtPolarCanvas * | canvas ()
const QwtPolarCanvas * | canvas () 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::QwtPolarPicker | ( | QwtPolarCanvas * | canvas | ) |
| explicit

Create a polar plot picker.

Parameters

  canvas | Plot canvas to observe, also the parent object

QwtPolarPicker::QwtPolarPicker | ( | RubberBand | rubberBand,
|  | DisplayMode | trackerMode,
|  | QwtPolarCanvas * | canvas
| ) |  |
| explicit

Create a plot picker

Parameters

  rubberBand | Rubberband style
  trackerMode | Tracker mode
  canvas | Plot 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 | ) |
| protectedvirtual

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

Parameters

  pos | Additional 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

  pos | Position 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` | ) |
| protectedvirtual

Close a selection setting the state to inactive.

Parameters

  ok | If 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

  pos | Point in widget coordinates of the plot canvas

Returns
  Point in plot coordinates

See Also
  transform(), canvas()

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

Move the last point of the selection

Parameters

  pos | New 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

  pos | Position 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.

QwtPolarPlot * QwtPolarPicker::plot | ( |  | ) |

Returns
  Plot widget, containing the observed plot canvas

const QwtPolarPlot * QwtPolarPicker::plot | ( |  | ) | const

Returns
  Plot widget, containing the observed plot canvas

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

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

Parameters

  pos | Selected point

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

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

Parameters

  points | Selected points

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

Translate a pixel position into a position string

Parameters

  pos | Position in pixel coordinates

Returns
  Position string

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

  pos | Position

Returns
  Position string