|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
Base class for items on the plot canvas. More...
#include <qwt_plot_item.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | RttiValues { Rtti_PlotItem = 0 , Rtti_PlotGrid , Rtti_PlotScale , Rtti_PlotLegend , Rtti_PlotMarker , Rtti_PlotCurve , Rtti_PlotSpectroCurve , Rtti_PlotIntervalCurve , Rtti_PlotHistogram , Rtti_PlotSpectrogram , Rtti_PlotGraphic , Rtti_PlotTradingCurve , Rtti_PlotBarChart , Rtti_PlotMultiBarChart , Rtti_PlotShape , Rtti_PlotTextLabel , Rtti_PlotZone , Rtti_PlotVectorField , Rtti_PlotArrowMarker , Rtti_PlotBoxChart , Rtti_PlotUserItem = 1000 } |
| Runtime type information. More... | |
| enum | ItemAttribute { Legend = 0x01 , AutoScale = 0x02 , Margins = 0x04 } |
| Plot Item Attributes. More... | |
| enum | ItemInterest { ScaleInterest = 0x01 , LegendInterest = 0x02 } |
| Plot Item Interests. More... | |
| enum | RenderHint { RenderAntialiased = 0x1 } |
| Render hints . More... | |
Public Member Functions | |
| QwtPlotItem () | |
| Default constructor. | |
| QwtPlotItem (const QString &title) | |
| Constructor with title as QString. | |
| QwtPlotItem (const QwtText &title) | |
| Constructor with title as QwtText. | |
| virtual | ~QwtPlotItem () |
| Destructor. | |
| void | attach (QwtPlot *plot) |
| Attach the item to a plot. | |
| void | detach () |
| Detach the item from the plot. | |
| QwtPlot * | plot () const |
| Get the plot the item is attached to. | |
| void | setTitle (const QString &title) |
| Set the title using a QString. | |
| void | setTitle (const QwtText &title) |
| Set the title using a QwtText. | |
| const QwtText & | title () const |
| Get the title. | |
| virtual int | rtti () const |
| Runtime type information. | |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| Set an item attribute. | |
| bool | testItemAttribute (ItemAttribute) const |
| Test an item attribute. | |
| void | setItemInterest (ItemInterest, bool on=true) |
| Set an item interest. | |
| bool | testItemInterest (ItemInterest) const |
| Test an item interest. | |
| 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. | |
| void | setLegendIconSize (const QSize &) |
| Set the legend icon size. | |
| QSize | legendIconSize () const |
| Get the legend icon size. | |
| 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 |
| Check if the item is visible. | |
| void | setAxes (QwtAxisId xAxis, QwtAxisId yAxis) |
| Set both axes. | |
| void | setXAxis (QwtAxisId) |
| Set the x-axis. | |
| QwtAxisId | xAxis () const |
| Get the x-axis. | |
| void | setYAxis (QwtAxisId) |
| Set the y-axis. | |
| QwtAxisId | yAxis () const |
| Get the y-axis. | |
| virtual void | itemChanged () |
| Notify the plot that the item has changed. | |
| virtual void | legendChanged () |
| Notify the item that the legend has changed. | |
| virtual void | draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0 |
| Draw the item. | |
| virtual QRectF | boundingRect () const |
| Get the bounding rectangle. | |
| virtual void | getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const |
| Get margin hints for the canvas. | |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
| Update the item with new scale divisions. | |
| virtual void | updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) |
| Update the item with changes of the legend. | |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| Calculate the scale rectangle. | |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| Calculate the paint rectangle. | |
| virtual QList< QwtLegendData > | legendData () const |
| Return legend data. | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
| Return a legend icon. | |
Protected Member Functions | |
| QwtGraphic | defaultIcon (const QBrush &, const QSizeF &) const |
| Create a default icon. | |
Base class for items on the plot canvas.
Plot Item Attributes.
| Enumerator | |
|---|---|
| Legend | The item is represented on the legend. |
| AutoScale | The boundingRect() of the item is included in the autoscaling calculation as long as its width or height is >= 0.0. |
| Margins | The item needs extra space to display something outside its bounding rectangle.
|
Plot Item Interests.
| Enumerator | |
|---|---|
| ScaleInterest | The item is interested in updates of the scales
|
| LegendInterest | The item is interested in updates of the legend ( of other items ) This flag is intended for items, that want to implement a legend for displaying entries of other plot item.
|
Runtime type information.
| Enumerator | |
|---|---|
| Rtti_PlotItem | Unspecific value, that can be used, when it doesn't matter. |
| Rtti_PlotGrid | For QwtPlotGrid. |
| Rtti_PlotScale | For QwtPlotScaleItem. |
| Rtti_PlotLegend | For QwtPlotLegendItem. |
| Rtti_PlotMarker | For QwtPlotMarker. |
| Rtti_PlotCurve | For QwtPlotCurve. |
| Rtti_PlotSpectroCurve | For QwtPlotSpectroCurve. |
| Rtti_PlotIntervalCurve | For QwtPlotIntervalCurve. |
| Rtti_PlotHistogram | For QwtPlotHistogram. |
| Rtti_PlotSpectrogram | For QwtPlotSpectrogram. |
| Rtti_PlotGraphic | |
| Rtti_PlotTradingCurve | For QwtPlotTradingCurve. |
| Rtti_PlotBarChart | For QwtPlotBarChart. |
| Rtti_PlotMultiBarChart | For QwtPlotMultiBarChart. |
| Rtti_PlotShape | For QwtPlotShapeItem. |
| Rtti_PlotTextLabel | For QwtPlotTextLabel. |
| Rtti_PlotZone | For QwtPlotZoneItem. |
| Rtti_PlotVectorField | For QwtPlotVectorField. |
| Rtti_PlotArrowMarker | For QwtPlotArrowMarker. |
| Rtti_PlotBoxChart | Boxplot chart item. |
| Rtti_PlotUserItem | Values >= Rtti_PlotUserItem are reserved for plot items not implemented in the Qwt library. |
|
explicit |
Default constructor.
|
explicit |
Constructor with title as QString.
|
virtual |
Destructor.
| void QwtPlotItem::attach | ( | QwtPlot * | plot | ) |
Attach the item to a plot.
|
virtual |
Get the bounding rectangle.
Reimplemented in QwtPlotArrowMarker, QwtPlotBarChart, QwtPlotBoxChart, QwtPlotGraphicItem, QwtPlotHistogram, QwtPlotIntervalCurve, QwtPlotMarker, QwtPlotMultiBarChart, QwtPlotRasterItem, QwtPlotSeriesItem, QwtPlotShapeItem, QwtPlotTradingCurve, QwtPlotVectorField, and QwtPlotZoneItem.
|
protected |
Create a default icon.
Return a default icon from a brush.
| void QwtPlotItem::detach | ( | ) |
Detach the item from the plot.
|
pure virtual |
Draw the item.
Implemented in QwtPlotTextLabel, QwtPlotZoneItem, QwtPlotMarker, QwtPlotGraphicItem, QwtPlotGrid, QwtPlotLegendItem, QwtPlotRasterItem, QwtPlotScaleItem, QwtPlotSeriesItem, QwtPlotShapeItem, QwtPlotSpectrogram, and QwtPlotArrowMarker.
|
virtual |
Get margin hints for the canvas.
Calculate a hint for the canvas margin.
Reimplemented in QwtPlotAbstractBarChart.
| void QwtPlotItem::hide | ( | ) |
Hide the item.
| bool QwtPlotItem::isVisible | ( | ) | const |
Check if the item is visible.
|
virtual |
Notify the plot that the item has changed.
|
virtual |
Notify the item that the legend has changed.
Notify that the legend has changed.
|
virtual |
Return legend data.
Return all information needed to represent the item on the legend.
Reimplemented in QwtPlotBarChart, and QwtPlotMultiBarChart.
|
virtual |
Return a legend icon.
Get the icon representing the item on the legend.
Reimplemented in QwtPlotBarChart, QwtPlotBoxChart, QwtPlotCurve, QwtPlotHistogram, QwtPlotIntervalCurve, QwtPlotMarker, QwtPlotMultiBarChart, QwtPlotShapeItem, QwtPlotTradingCurve, QwtPlotVectorField, and QwtPlotArrowMarker.
| QSize QwtPlotItem::legendIconSize | ( | ) | const |
Get the legend icon size.
| QRectF QwtPlotItem::paintRect | ( | const QwtScaleMap & | xMap, |
| const QwtScaleMap & | yMap | ||
| ) | const |
Calculate the paint rectangle.
Calculate the bounding paint rectangle of 2 maps.
| QwtPlot * QwtPlotItem::plot | ( | ) | const |
Get the plot the item is attached to.
| uint QwtPlotItem::renderThreadCount | ( | ) | const |
Get the number of render threads.
|
virtual |
Runtime type information.
Get runtime type information.
Reimplemented in QwtPlotArrowMarker, QwtPlotBarChart, QwtPlotBoxChart, QwtPlotCurve, QwtPlotGraphicItem, QwtPlotGrid, QwtPlotHistogram, QwtPlotIntervalCurve, QwtPlotLegendItem, QwtPlotMarker, QwtPlotMultiBarChart, QwtPlotScaleItem, QwtPlotShapeItem, QwtPlotSpectroCurve, QwtPlotSpectrogram, QwtPlotTextLabel, QwtPlotTradingCurve, QwtPlotVectorField, and QwtPlotZoneItem.
| QRectF QwtPlotItem::scaleRect | ( | const QwtScaleMap & | xMap, |
| const QwtScaleMap & | yMap | ||
| ) | const |
Calculate the scale rectangle.
Calculate the bounding scale rectangle of 2 maps.
| void QwtPlotItem::setAxes | ( | QwtAxisId | xAxisId, |
| QwtAxisId | yAxisId | ||
| ) |
Set both axes.
Set X and Y axes.
| void QwtPlotItem::setItemAttribute | ( | ItemAttribute | attribute, |
| bool | on = true |
||
| ) |
Set an item attribute.
| void QwtPlotItem::setItemInterest | ( | ItemInterest | interest, |
| bool | on = true |
||
| ) |
Set an item interest.
| void QwtPlotItem::setLegendIconSize | ( | const QSize & | size | ) |
Set the legend icon size.
Set the size of the legend icon.
| void QwtPlotItem::setRenderHint | ( | RenderHint | hint, |
| bool | on = true |
||
| ) |
Set a render hint.
| void QwtPlotItem::setRenderThreadCount | ( | uint | numThreads | ) |
Set the number of render threads.
| void QwtPlotItem::setTitle | ( | const QString & | title | ) |
Set the title using a QString.
|
virtual |
Set the visibility.
Set the visibility of the item.
| void QwtPlotItem::setXAxis | ( | QwtAxisId | axisId | ) |
Set the x-axis.
Set the X axis.
| void QwtPlotItem::setYAxis | ( | QwtAxisId | axisId | ) |
Set the y-axis.
Set the Y axis.
| void QwtPlotItem::setZ | ( | double | z | ) |
Set the z-value.
| void QwtPlotItem::show | ( | ) |
Show the item.
| bool QwtPlotItem::testItemAttribute | ( | ItemAttribute | attribute | ) | const |
Test an item attribute.
| bool QwtPlotItem::testItemInterest | ( | ItemInterest | interest | ) | const |
Test an item interest.
| bool QwtPlotItem::testRenderHint | ( | RenderHint | hint | ) | const |
Test a render hint.
| const QwtText & QwtPlotItem::title | ( | ) | const |
Get the title.
Get the title of the item.
|
virtual |
Update the item with changes of the legend.
Update the item to changes of the legend info.
Reimplemented in QwtPlotLegendItem.
|
virtual |
Update the item with new scale divisions.
Update the item to changes of the axes scale division.
Reimplemented in QwtPlotScaleItem, QwtPlotSeriesItem, and QwtPlotGrid.
| QwtAxisId QwtPlotItem::xAxis | ( | ) | const |
Get the x-axis.
Get the X axis.
| QwtAxisId QwtPlotItem::yAxis | ( | ) | const |
Get the y-axis.
Get the Y axis.
| double QwtPlotItem::z | ( | ) | const |
Get the z-value.