|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
An item which draws scales and grid lines on a polar plot. More...
#include <qwt_polar_grid.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | DisplayFlag { SmartOriginLabel = 1 , HideMaxRadiusLabel = 2 , ClipAxisBackground = 4 , SmartScaleDraw = 8 , ClipGridLines = 16 } |
| Display flags to avoid conflicts when painting scales and grid lines. More... | |
| enum | GridAttribute { AutoScaling = 0x01 } |
| Grid attributes. More... | |
Public Types inherited from QwtPolarItem | |
| enum | RttiValues { Rtti_PolarItem = 0 , Rtti_PolarGrid , Rtti_PolarMarker , Rtti_PolarCurve , Rtti_PolarSpectrogram , Rtti_PolarUserItem = 1000 } |
| enum | ItemAttribute { Legend = 0x01 , AutoScale = 0x02 } |
| enum | RenderHint { RenderAntialiased = 0x01 } |
Public Member Functions | |
| QwtPolarGrid () | |
| Constructor. | |
| virtual | ~QwtPolarGrid () |
| Destructor. | |
| virtual int | rtti () const override |
| Get the runtime type information. | |
| void | setDisplayFlag (DisplayFlag, bool on=true) |
| Set a display flag. | |
| bool | testDisplayFlag (DisplayFlag) const |
| Test a display flag. | |
| void | setGridAttribute (GridAttribute, bool on=true) |
| Set a grid attribute. | |
| bool | testGridAttribute (GridAttribute) const |
| Test a grid attribute. | |
| void | showGrid (int scaleId, bool show=true) |
| Show/hide the grid for a scale. | |
| bool | isGridVisible (int scaleId) const |
| Check if the grid is visible for a scale. | |
| void | showMinorGrid (int scaleId, bool show=true) |
| Show/hide the minor grid for a scale. | |
| bool | isMinorGridVisible (int scaleId) const |
| Check if the minor grid is visible for a scale. | |
| void | showAxis (int axisId, bool show=true) |
| Show/hide an axis. | |
| bool | isAxisVisible (int axisId) const |
| Check if an axis is visible. | |
| void | setPen (const QPen &p) |
| Set the pen. | |
| void | setFont (const QFont &) |
| Set the font. | |
| void | setMajorGridPen (const QPen &p) |
| Set the major grid pen. | |
| void | setMajorGridPen (int scaleId, const QPen &p) |
| Set the major grid pen for a scale. | |
| QPen | majorGridPen (int scaleId) const |
| Get the major grid pen for a scale. | |
| void | setMinorGridPen (const QPen &p) |
| Set the minor grid pen. | |
| void | setMinorGridPen (int scaleId, const QPen &p) |
| Set the minor grid pen for a scale. | |
| QPen | minorGridPen (int scaleId) const |
| Get the minor grid pen for a scale. | |
| void | setAxisPen (int axisId, const QPen &p) |
| Set the axis pen. | |
| QPen | axisPen (int axisId) const |
| Get the axis pen. | |
| void | setAxisFont (int axisId, const QFont &p) |
| Set the axis font. | |
| QFont | axisFont (int axisId) const |
| Get the axis font. | |
| void | setScaleDraw (int axisId, QwtScaleDraw *) |
| Set the scale draw for an axis. | |
| const QwtScaleDraw * | scaleDraw (int axisId) const |
| Get the scale draw for an axis (const version) | |
| QwtScaleDraw * | scaleDraw (int axisId) |
| Get the scale draw for an axis. | |
| void | setAzimuthScaleDraw (QwtRoundScaleDraw *) |
| Set the azimuth scale draw. | |
| const QwtRoundScaleDraw * | azimuthScaleDraw () const |
| Get the azimuth scale draw (const version) | |
| QwtRoundScaleDraw * | azimuthScaleDraw () |
| Get the azimuth scale draw. | |
| virtual void | draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &rect) const override |
| Draw the grid. | |
| virtual void | updateScaleDiv (const QwtScaleDiv &azimuthMap, const QwtScaleDiv &radialMap, const QwtInterval &) override |
| Update the scale division. | |
| virtual int | marginHint () const override |
| Get the margin hint. | |
Public Member Functions inherited from QwtPolarItem | |
| QwtPolarItem (const QwtText &title=QwtText()) | |
| Constructor. | |
| virtual | ~QwtPolarItem () |
| Destructor. | |
| void | attach (QwtPolarPlot *plot) |
| Attach the item to a plot. | |
| void | detach () |
| Detach the item from its plot. | |
| QwtPolarPlot * | plot () const |
| Get the attached plot. | |
| void | setTitle (const QString &title) |
| Set the title from a QString. | |
| void | setTitle (const QwtText &title) |
| Set the title from a QwtText. | |
| const QwtText & | title () const |
| Get the title. | |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| Set an item attribute. | |
| bool | testItemAttribute (ItemAttribute) const |
| Test an item attribute. | |
| void | setRenderHint (RenderHint, bool on=true) |
| Set a render hint. | |
| bool | testRenderHint (RenderHint) const |
| Test a render hint. | |
| void | setRenderThreadCount (uint numThreads) |
| Set the number of render threads. | |
| uint | renderThreadCount () const |
| Get the number of render threads. | |
| double | z () const |
| Get the z value. | |
| void | setZ (double z) |
| Set the z value. | |
| void | show () |
| Show the item. | |
| void | hide () |
| Hide the item. | |
| virtual void | setVisible (bool) |
| Set the visibility. | |
| bool | isVisible () const |
| Get the visibility. | |
| virtual void | itemChanged () |
| Update the item and trigger autoRefresh. | |
| virtual void | legendChanged () |
| Update the legend. | |
| virtual QwtInterval | boundingInterval (int scaleId) const |
| Get the bounding interval for a scale. | |
| void | setLegendIconSize (const QSize &) |
| Set the legend icon size. | |
| QSize | legendIconSize () const |
| Get the legend icon size. | |
| virtual QList< QwtLegendData > | legendData () const |
| Get the legend data. | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
| Get the legend icon. | |
Protected Member Functions | |
| void | drawRays (QPainter *, const QRectF &, const QPointF &pole, double radius, const QwtScaleMap &azimuthMap, const QList< double > &) const |
| Draw the rays. | |
| void | drawCircles (QPainter *, const QRectF &, const QPointF &pole, const QwtScaleMap &radialMap, const QList< double > &) const |
| Draw the circles. | |
| void | drawAxis (QPainter *, int axisId) const |
| Draw an axis. | |
An item which draws scales and grid lines on a polar plot.
Display flags to avoid conflicts when painting scales and grid lines.
|
explicit |
Constructor.
|
virtual |
Destructor.
Destructor
.
| QFont QwtPolarGrid::axisFont | ( | int | axisId | ) | const |
Get the axis font.
Get the font for the tick labels of a specific axis.
| QPen QwtPolarGrid::axisPen | ( | int | axisId | ) | const |
Get the axis pen.
Get the pen for painting a specific axis.
| QwtRoundScaleDraw * QwtPolarGrid::azimuthScaleDraw | ( | ) |
Get the azimuth scale draw.
Get the scale draw for the azimuth scale.
| const QwtRoundScaleDraw * QwtPolarGrid::azimuthScaleDraw | ( | ) | const |
Get the azimuth scale draw (const version)
Get the scale draw for the azimuth scale.
|
overridevirtual |
|
protected |
Draw an axis.
Paint an axis.
| painter | Painter |
| axisId | Axis id (QwtPolar::Axis) |
|
protected |
Draw the circles.
Draw circles.
| painter | Painter |
| canvasRect | Contents rect of the canvas in painter coordinates |
| pole | Position of the pole in painter coordinates |
| radialMap | Maps radius values into painter coordinates. |
| values | Radial values, indicating the distances from the pole |
|
protected |
Draw the rays.
Draw lines from the pole.
| painter | Painter |
| canvasRect | Contents rect of the canvas in painter coordinates |
| pole | Position of the pole in painter coordinates |
| radius | Length of the lines in painter coordinates |
| azimuthMap | Maps azimuth values to values related to 0.0, M_2PI |
| values | Azimuth values, indicating the direction of the lines |
| bool QwtPolarGrid::isAxisVisible | ( | int | axisId | ) | const |
Check if an axis is visible.
| bool QwtPolarGrid::isGridVisible | ( | int | scaleId | ) | const |
Check if the grid is visible for a scale.
Check if grid lines are visible for a scale.
| bool QwtPolarGrid::isMinorGridVisible | ( | int | scaleId | ) | const |
Check if the minor grid is visible for a scale.
Check if minor grid lines are visible for a scale.
| QPen QwtPolarGrid::majorGridPen | ( | int | scaleId | ) | const |
Get the major grid pen for a scale.
Get the pen for painting the major grid lines of a specific scale.
|
overridevirtual |
Get the margin hint.
Reimplemented from QwtPolarItem.
| QPen QwtPolarGrid::minorGridPen | ( | int | scaleId | ) | const |
Get the minor grid pen for a scale.
Get the pen for painting the minor grid lines of a specific scale.
|
overridevirtual |
Get the runtime type information.
Reimplemented from QwtPolarItem.
| QwtScaleDraw * QwtPolarGrid::scaleDraw | ( | int | axisId | ) |
Get the scale draw for an axis.
Get the scale draw of a specified axis.
| const QwtScaleDraw * QwtPolarGrid::scaleDraw | ( | int | axisId | ) | const |
Get the scale draw for an axis (const version)
Get the scale draw of a specified axis.
| void QwtPolarGrid::setAxisFont | ( | int | axisId, |
| const QFont & | font | ||
| ) |
Set the axis font.
Assign a font for the tick labels of a specific axis.
| void QwtPolarGrid::setAxisPen | ( | int | axisId, |
| const QPen & | pen | ||
| ) |
Set the axis pen.
Assign a pen for painting an axis.
| void QwtPolarGrid::setAzimuthScaleDraw | ( | QwtRoundScaleDraw * | scaleDraw | ) |
Set the azimuth scale draw.
Set a scale draw for the azimuth scale.
| void QwtPolarGrid::setDisplayFlag | ( | DisplayFlag | flag, |
| bool | on = true |
||
| ) |
Set a display flag.
Change the display flags.
| void QwtPolarGrid::setFont | ( | const QFont & | font | ) |
Set the font.
Assign a font for all scale tick labels.
| void QwtPolarGrid::setGridAttribute | ( | GridAttribute | attribute, |
| bool | on = true |
||
| ) |
Set a grid attribute.
Specify an attribute for the grid.
| void QwtPolarGrid::setMajorGridPen | ( | const QPen & | pen | ) |
Set the major grid pen.
Assign a pen for the major grid lines.
| void QwtPolarGrid::setMajorGridPen | ( | int | scaleId, |
| const QPen & | pen | ||
| ) |
Set the major grid pen for a scale.
Assign a pen for the major grid lines of a specific scale.
| void QwtPolarGrid::setMinorGridPen | ( | const QPen & | pen | ) |
Set the minor grid pen.
Assign a pen for the minor grid lines.
| void QwtPolarGrid::setMinorGridPen | ( | int | scaleId, |
| const QPen & | pen | ||
| ) |
Set the minor grid pen for a scale.
Assign a pen for the minor grid lines of a specific scale.
| void QwtPolarGrid::setPen | ( | const QPen & | pen | ) |
Set the pen.
Assign a pen for all axes and grid lines.
| void QwtPolarGrid::setScaleDraw | ( | int | axisId, |
| QwtScaleDraw * | scaleDraw | ||
| ) |
Set the scale draw for an axis.
Set a scale draw for a specified axis.
| void QwtPolarGrid::showAxis | ( | int | axisId, |
| bool | show = true |
||
| ) |
Show/hide an axis.
| void QwtPolarGrid::showGrid | ( | int | scaleId, |
| bool | show = true |
||
| ) |
Show/hide the grid for a scale.
Show/hide grid lines for a scale.
| void QwtPolarGrid::showMinorGrid | ( | int | scaleId, |
| bool | show = true |
||
| ) |
Show/hide the minor grid for a scale.
Show/hide minor grid lines for a scale.
| bool QwtPolarGrid::testDisplayFlag | ( | DisplayFlag | flag | ) | const |
Test a display flag.
| bool QwtPolarGrid::testGridAttribute | ( | GridAttribute | attribute | ) | const |
Test a grid attribute.
|
overridevirtual |
Update the scale division.
Update the item to changes of the axes scale division.
Reimplemented from QwtPolarItem.