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 isQwtPlotIntervalCurve::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 aQwtTexttitle.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 aQStringtitle.QwtPlotSeriesItem (const QwtText &title)β constructor with aQwtTexttitle.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 aQStringtitle.QwtPlotItem (const QwtText &title)β constructor with aQwtTexttitle.virtual ~QwtPlotItem ()β Destroy theQwtPlotItem.void attach (QwtPlot *plot)β Attach the item to a plot.void detach ()β This method detaches aQwtPlotItemfrom anyQwtPlotit has been associated with.QwtPlot * plot () constβ Return attached plot.void setTitle (const QString &title)β set the title from aQString.void setTitle (const QwtText &title)β set the title from aQwtText.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 thepen(). The area between the curves is filled with thebrush(). iconic tube behavior.UserCurveβ Styles >=QwtPlotIntervalCurve::UserCurveare reserved for derived classes that overloaddrawSeries()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. Ifto < 0the 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. Ifto < 0the 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
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms