QwtPlotIntervalCurve(3)

πŸ’… QwtPlotIntervalCurve(3) πŸ’…

okay so bestie, this is from the Library Functions Manual, and it's literally the manual page for QwtPlotIntervalCurve β€” a C++ class that represents a series of samples where every value has an interval attached. no cap, it's giving interval-plot main character energy. πŸ’–


🌸 NAME 🌸

QwtPlotIntervalCurve β€” this class represents a series of samples, where each value is associated with an interval: $[y1,y2] = f(x)$. periodt. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <qwt_plot_intervalcurve.h>

Inherits QwtPlotSeriesItem, and QwtSeriesStore< QwtIntervalSample >.

πŸ’– Public Types πŸ’–

here's the type menu, bestie:

  • enum CurveStyle { NoCurve, Tube, UserCurve = 100 } β€” curve styles. The default setting is QwtPlotIntervalCurve::Tube. slay.
  • enum PaintAttribute { ClipPolygons = 0x01, ClipSymbol = 0x02, TubeAsLines = 0x10 } β€” paint attributes, and yes we're getting into them later. 🫢
  • typedef QFlags< PaintAttribute > PaintAttributes β€” the flags combo type.

πŸ¦‹ Public Types inherited from QwtPlotItem πŸ¦‹

  • 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_PlotUserItem = 1000 } β€” runtime type information. iconic.
  • enum ItemAttribute { Legend = 0x01, AutoScale = 0x02, Margins = 0x04 } β€” plot item attributes.
  • enum ItemInterest { ScaleInterest = 0x01, LegendInterest = 0x02 } β€” plot item interests.
  • enum RenderHint { RenderAntialiased = 0x1 } β€” render hints.
  • typedef QFlags< ItemAttribute > ItemAttributes β€” the item attribute flags type.
  • typedef QFlags< ItemInterest > ItemInterests β€” the item interest flags type.
  • typedef QFlags< RenderHint > RenderHints β€” the render hint flags type.

πŸ’… Public Member Functions πŸ’…

  • QwtPlotIntervalCurve (const QString &title=QString()) β€” constructor vibe.
  • QwtPlotIntervalCurve (const QwtText &title) β€” constructor with a QwtText title.
  • virtual ~QwtPlotIntervalCurve () β€” Destructor. bye bestie, cleanup era.
  • virtual int rtti () const override β€” runtime type info override.
  • void setPaintAttribute (PaintAttribute, bool on=true) β€” set a paint attribute.
  • bool testPaintAttribute (PaintAttribute) const β€” check a paint attribute.
  • void setSamples (const QVector< QwtIntervalSample > &) β€” set samples from a vector.
  • void setSamples (QwtSeriesData< QwtIntervalSample > *) β€” set samples from series data.
  • void setPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine) β€” set the pen from a color, width, and style.
  • void setPen (const QPen &) β€” Assign a pen. πŸ’–
  • const QPen & pen () const β€” get the pen.
  • void setBrush (const QBrush &) β€” set the brush.
  • const QBrush & brush () const β€” get the brush.
  • void setStyle (CurveStyle style) β€” set the curve style.
  • CurveStyle style () const β€” get the curve style.
  • void setSymbol (const QwtIntervalSymbol *) β€” set the interval symbol.
  • const QwtIntervalSymbol * symbol () const β€” get the interval symbol.
  • virtual void drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const override β€” override, bestie.
  • virtual QRectF boundingRect () const override β€” bounding rect override.
  • virtual QwtGraphic legendIcon (int index, const QSizeF &) const override β€” legend icon override.

🌈 Public Member Functions inherited from QwtPlotSeriesItem 🌈

  • QwtPlotSeriesItem (const QString &title=QString()) β€” constructor with a QString title.
  • QwtPlotSeriesItem (const QwtText &title) β€” constructor with a QwtText title.
  • virtual ~QwtPlotSeriesItem () β€” Destructor. cleanup, but make it cute.
  • void setOrientation (Qt::Orientation) β€” set orientation.
  • Qt::Orientation orientation () const β€” get orientation.
  • virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override β€” Draw the complete series. πŸ’…
  • virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) override β€” Update the item to changes of the axes scale division.

πŸ‘‘ Public Member Functions inherited from QwtPlotItem πŸ‘‘

  • QwtPlotItem () β€” default constructor.
  • QwtPlotItem (const QString &title) β€” constructor with a QString title.
  • QwtPlotItem (const QwtText &title) β€” constructor with a QwtText title.
  • virtual ~QwtPlotItem () β€” Destroy the QwtPlotItem.
  • void attach (QwtPlot *plot) β€” Attach the item to a plot.
  • void detach () β€” This method detaches a QwtPlotItem from any QwtPlot it has been associated with.
  • QwtPlot * plot () const β€” Return 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 β€” check an item attribute.
  • void setItemInterest (ItemInterest, bool on=true) β€” set an item interest.
  • bool testItemInterest (ItemInterest) const β€” check an item interest.
  • void setRenderHint (RenderHint, bool on=true) β€” set a render hint.
  • bool testRenderHint (RenderHint) const β€” check a render hint.
  • void setRenderThreadCount (uint numThreads) β€” set the render thread count.
  • uint renderThreadCount () const β€” get the render thread count.
  • 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 visibility.
  • bool isVisible () const β€” check visibility.
  • void setAxes (QwtAxisId xAxis, QwtAxisId yAxis) β€” set both axes.
  • void setXAxis (QwtAxisId) β€” set the x axis.
  • QwtAxisId xAxis () const β€” Return xAxis.
  • void setYAxis (QwtAxisId) β€” set the y axis.
  • QwtAxisId yAxis () const β€” Return yAxis.
  • virtual void itemChanged () β€” item changed signal-ish thing.
  • virtual void legendChanged () β€” legend changed signal-ish thing.
  • virtual void getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const β€” Calculate a hint for the canvas margin.
  • virtual void updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) β€” Update the item to changes of the legend info.
  • QRectF scaleRect (const QwtScaleMap &, const QwtScaleMap &) const β€” Calculate the bounding scale rectangle of 2 maps.
  • QRectF paintRect (const QwtScaleMap &, const QwtScaleMap &) const β€” Calculate the bounding paint rectangle of 2 maps.
  • virtual QList< QwtLegendData > legendData () const β€” Return all information, that is needed to represent the item on the legend.

🧚 Public Member Functions inherited from QwtAbstractSeriesStore 🧚

  • virtual ~QwtAbstractSeriesStore () β€” Destructor. cleanup moment.

πŸ“ Public Member Functions inherited from QwtSeriesStore< QwtIntervalSample > πŸ“

  • QwtSeriesStore () β€” Constructor. The store contains no series.
  • ~QwtSeriesStore () β€” Destructor.
  • void setData (QwtSeriesData< QwtIntervalSample > *series) β€” set the data pointer.
  • QwtSeriesData< QwtIntervalSample > * data () β€” get the data pointer.
  • QwtIntervalSample sample (int index) const β€” get a sample by index.
  • virtual size_t dataSize () const override β€” data size override.
  • virtual QRectF dataRect () const override β€” data rect override.
  • virtual void setRectOfInterest (const QRectF &rect) override β€” set the rect of interest.
  • QwtSeriesData< QwtIntervalSample > * swapData (QwtSeriesData< QwtIntervalSample > *series) β€” swap the data pointer.

πŸ”₯ Protected Member Functions πŸ”₯

  • void init () β€” Initialize internal members.
  • virtual void drawTube (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const β€” draw the tube.
  • virtual void drawSymbols (QPainter *, const QwtIntervalSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const β€” draw the symbols.

🫢 Protected Member Functions inherited from QwtPlotSeriesItem 🫢

  • virtual void dataChanged () override β€” dataChanged() indicates, that the series has been changed.

πŸ’œ Protected Member Functions inherited from QwtPlotItem πŸ’œ

  • QwtGraphic defaultIcon (const QBrush &, const QSizeF &) const β€” Return a default icon from a brush.

✨ Detailed Description ✨

QwtPlotIntervalCurve represents a series of samples, where each value is associated with an interval: $[y1,y2] = f(x)$. yes, we're back on the interval agenda.

The representation depends on the style() and an optional symbol() that is displayed for each interval. QwtPlotIntervalCurve might be used to display error bars or the area between 2 curves. it's giving versatile icon behavior. πŸ’–

Definition at line 27 of file qwt_plot_intervalcurve.h.


πŸŽ€ Member Typedef Documentation πŸŽ€

typedef QFlags<PaintAttribute > QwtPlotIntervalCurve::PaintAttributes

An ORed combination of PaintAttribute values. very flags, very combo, no cap. ✨

Definition at line 98 of file qwt_plot_intervalcurve.h.


🌈 Member Enumeration Documentation 🌈

enum QwtPlotIntervalCurve::CurveStyle

Curve styles. The default setting is QwtPlotIntervalCurve::Tube. slay.

See also setStyle(), style().

Enumerator

  • NoCurve β€” Don't draw a curve. Note: This doesn't affect the symbols. important distinction, bestie.
  • Tube β€” Build 2 curves from the upper and lower limits of the intervals and draw them with the pen(). The area between the curves is filled with the brush(). iconic tube behavior.
  • UserCurve β€” Styles >= QwtPlotIntervalCurve::UserCurve are reserved for derived classes that overload drawSeries() with additional application specific curve types.

Definition at line 38 of file qwt_plot_intervalcurve.h.

enum QwtPlotIntervalCurve::PaintAttribute

Attributes to modify the drawing algorithm. yes ma'am, paint-era controls.

See also setPaintAttribute(), testPaintAttribute().

Enumerator

  • ClipPolygons β€” Clip polygons before painting them. In situations, where points are far outside the visible area (f.e when zooming deep) this might be a substantial improvement for the painting performance.
  • ClipSymbol β€” Check if a symbol is on the plot canvas before painting it.
  • TubeAsLines β€” Fill the tube with horizontal or vertical lines and unite overlapping border lines. This attribute is useful for large data sets, where consecutive samples are often mapped to the same coordinate.

Beside other minor visual differences the filling is always monochrome - using brush().color(). πŸ’…

This algorithm is very fast and effective and can be used inside a replot cycle. In the worst case the number of lines to be rendered will be 5 times the ( width/height - depending on the orientation() ) of the plot canvas.

Note: Has only an effect, when drawing to a paint device in integer coordinates ( f.e. all widgets on screen ).

See also QwtPlotCurve::FilterPointsAggressive.

Definition at line 64 of file qwt_plot_intervalcurve.h.


πŸ’– Constructor & Destructor Documentation πŸ’–

QwtPlotIntervalCurve::QwtPlotIntervalCurve (const QString & title = QString()) [explicit]

Constructor. we love a beginning.

Parameters

  • title β€” Title of the curve.

Definition at line 524 of file qwt_plot_intervalcurve.cpp.

QwtPlotIntervalCurve::QwtPlotIntervalCurve (const QwtText & title) [explicit]

Constructor. another one, and it's giving QwtText title realness.

Parameters

  • title β€” Title of the curve.

Definition at line 514 of file qwt_plot_intervalcurve.cpp.

QwtPlotIntervalCurve::~QwtPlotIntervalCurve () [virtual]

Destructor. cleanup era, bestie. 🫢

Definition at line 531 of file qwt_plot_intervalcurve.cpp.

πŸ’– MEMBER FUNCTION DOCUMENTATION πŸ’–

okay bestie, this is the function-by-function tea β˜• β€” every signature, return, parameter, warning, and source-line receipt is staying exactly as it is. No cap. 🫢

πŸ¦‹ QRectF QwtPlotIntervalCurve::boundingRect () const [override], [virtual]

Returns: the bounding rectangle of all samples. For an empty series, the rectangle is invalid. 😭

Reimplemented from QwtPlotSeriesItem.

  • Definition at line 734 of file qwt_plot_intervalcurve.cpp.

πŸŽ€ const QBrush & QwtPlotIntervalCurve::brush () const

Returns: the brush used to fill the area in Tube style(). πŸ’…

See also: setBrush(), setStyle(), CurveStyle.

  • Definition at line 725 of file qwt_plot_intervalcurve.cpp.

🌸 void QwtPlotIntervalCurve::drawSeries (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int from, int to) const [override], [virtual]

What it does: draws a subset of the samples. ✨

  • painter β€” Painter.
  • xMap β€” Maps x-values into pixel coordinates.
  • yMap β€” Maps y-values into pixel coordinates.
  • canvasRect β€” Contents rectangle of the canvas.
  • from β€” Index of the first sample to be painted.
  • to β€” Index of the last sample to be painted. If to < 0 the series will be painted to its last sample.

See also: drawTube(), drawSymbols().

Implements QwtPlotSeriesItem.

  • Definition at line 756 of file qwt_plot_intervalcurve.cpp.

🧚 void QwtPlotIntervalCurve::drawSymbols (QPainter * painter, const QwtIntervalSymbol & symbol, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int from, int to) const [protected], [virtual]

What it does: draws symbols for a subset of the samples. 🫢

  • painter β€” Painter.
  • symbol β€” Interval symbol.
  • xMap β€” x map.
  • yMap β€” y map.
  • canvasRect β€” Contents rectangle of the canvas.
  • from β€” Index of the first sample to be painted.
  • to β€” Index of the last sample to be painted.

See also: setSymbol(), drawSeries(), drawTube().

  • Definition at line 829 of file qwt_plot_intervalcurve.cpp.

πŸ’œ void QwtPlotIntervalCurve::drawTube (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int from, int to) const [protected], [virtual]

What it does: draws a tube. πŸ§ͺ

Builds 2 curves from the upper and lower limits of the intervals and draws them with the pen(). The area between the curves is filled with the brush().

  • painter β€” Painter.
  • xMap β€” Maps x-values into pixel coordinates.
  • yMap β€” Maps y-values into pixel coordinates.
  • canvasRect β€” Contents rectangle of the canvas.
  • from β€” Index of the first sample to be painted.
  • to β€” Index of the last sample to be painted. If to < 0 the series will be painted to its last sample.

See also: drawSeries(), drawSymbols().

  • Definition at line 797 of file qwt_plot_intervalcurve.cpp.

πŸ“ void QwtPlotIntervalCurve::init () [protected]

What it does: initializes the internal members. ✨

  • Definition at line 537 of file qwt_plot_intervalcurve.cpp.

πŸ‘‘ QwtGraphic QwtPlotIntervalCurve::legendIcon (int index, const QSizeF & size) const [override], [virtual]

Returns: the icon for the legend. πŸŽ€

In case of Tube style() the icon is a plain rectangle filled with the brush(). If a symbol is assigned it is scaled to size.

  • index β€” Index of the legend entry ( ignored as there is only one ).
  • size β€” Icon size.

See also: QwtPlotItem::setLegendIconSize(), QwtPlotItem::legendData().

Reimplemented from QwtPlotItem.

  • Definition at line 896 of file qwt_plot_intervalcurve.cpp.

πŸ’… const QPen & QwtPlotIntervalCurve::pen () const

Returns: the pen used to draw the lines. πŸ–ŠοΈ

See also: setPen(), brush().

  • Definition at line 697 of file qwt_plot_intervalcurve.cpp.

🌈 int QwtPlotIntervalCurve::rtti () const [override], [virtual]

Returns: QwtPlotItem::Rtti_PlotIntervalCurve. ⭐

Reimplemented from QwtPlotItem.

  • Definition at line 549 of file qwt_plot_intervalcurve.cpp.

πŸ¦‹ void QwtPlotIntervalCurve::setBrush (const QBrush & brush)

What it does: assigns a brush. That brush is used to fill the area in Tube style(). πŸ’–

  • brush β€” Brush.

See also: brush(), pen(), setStyle(), CurveStyle.

  • Definition at line 710 of file qwt_plot_intervalcurve.cpp.

✨ void QwtPlotIntervalCurve::setPaintAttribute (PaintAttribute attribute, bool on = true)

What it does: specifies an attribute for how to draw the curve. 🎨

  • attribute β€” Paint attribute.
  • on β€” On/Off.

See also: testPaintAttribute().

  • Definition at line 561 of file qwt_plot_intervalcurve.cpp.

πŸŽ€ void QwtPlotIntervalCurve::setPen (const QColor & color, qreal width = 0.0, Qt::PenStyle style = Qt::SolidLine)

What it does: builds and assigns a pen. πŸ–‹οΈ

Heads up: in Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() ). This method has been introduced to hide this incompatibility.

  • color β€” Pen color.
  • width β€” Pen width.
  • style β€” Pen style.

See also: pen(), brush().

  • Definition at line 672 of file qwt_plot_intervalcurve.cpp.

🌸 void QwtPlotIntervalCurve::setPen (const QPen & pen)

What it does: assigns a pen. πŸ–ŠοΈ

  • pen β€” New pen.

See also: pen(), brush().

  • Definition at line 682 of file qwt_plot_intervalcurve.cpp.

🫢 void QwtPlotIntervalCurve::setSamples (const QVector< QwtIntervalSample > & samples)

What it does: initializes the data with an array of samples. 🧺

  • samples β€” Vector of samples.
  • Definition at line 584 of file qwt_plot_intervalcurve.cpp.

πŸ’œ void QwtPlotIntervalCurve::setSamples (QwtSeriesData< QwtIntervalSample > * data)

What it does: assigns a series of samples. πŸ¦‹

Lowkey, setSamples() is just a wrapper for setData() without any additional value β€” beside that it is easier to find for the developer.

  • data β€” Data.
Warning: The item takes ownership of the data object, deleting it when its not used anymore. πŸ’€
  • Definition at line 600 of file qwt_plot_intervalcurve.cpp.

🌈 void QwtPlotIntervalCurve::setStyle (CurveStyle style)

What it does: sets the curve's drawing style. 🎨

  • style β€” Curve style.

See also: CurveStyle, style().

  • Definition at line 612 of file qwt_plot_intervalcurve.cpp.

⭐ void QwtPlotIntervalCurve::setSymbol (const QwtIntervalSymbol * symbol)

What it does: assigns a symbol. πŸ’«

  • symbol β€” Symbol.

See also: symbol().

  • Definition at line 638 of file qwt_plot_intervalcurve.cpp.

🧚 QwtPlotIntervalCurve::CurveStyle QwtPlotIntervalCurve::style () const

Returns: the style of the curve. πŸŽ€

See also: setStyle().

  • Definition at line 627 of file qwt_plot_intervalcurve.cpp.

πŸ¦‹ const QwtIntervalSymbol * QwtPlotIntervalCurve::symbol () const

Returns: the current symbol or NULL, when no symbol has been assigned. 😭

See also: setSymbol().

  • Definition at line 654 of file qwt_plot_intervalcurve.cpp.

πŸ’– bool QwtPlotIntervalCurve::testPaintAttribute (PaintAttribute attribute) const

Returns: True, when attribute is enabled. βœ…

See also: PaintAttribute, setPaintAttribute().

  • Definition at line 574 of file qwt_plot_intervalcurve.cpp.

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code.

πŸ’– That’s the whole manual, bestie: source/version is Qwt User's Guide, the page is QwtPlotIntervalCurve(3), and the date is whatever Doxygen stamped on it. Bye! πŸ’…βœ¨

πŸ“¦ where this page comes from