QwtPlotMultiBarChart(3)
π QwtPlotMultiBarChart(3) π
From the Library Functions Manual, bestie. This is the whole page, full detail, no skips. π«Ά
πΈ NAME πΈ
QwtPlotMultiBarChart β okay so this plot item displays a series of samples, and each sample consists of a set of values. Thatβs the vibe. π
β¨ SYNOPSIS β¨
#include <qwt_plot_multi_barchart.h>
Inherits QwtPlotAbstractBarChart, and QwtSeriesStore< QwtSetSample >.
π Public Types π
enum ChartStyle { Grouped, Stacked }β chart styles, bestie.
π¦ Public Types inherited from QwtPlotAbstractBarChart
enum LayoutPolicy { AutoAdjustSamples, ScaleSamplesToAxes, ScaleSampleToCanvas, FixedSampleSize }β mode how to calculate the bar width.
π¦ 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.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 > ItemAttributestypedef QFlags< ItemInterest > ItemIntereststypedef QFlags< RenderHint > RenderHints
π Public Member Functions π
QwtPlotMultiBarChart (const QString &title=QString())QwtPlotMultiBarChart (const QwtText &title)virtual ~QwtPlotMultiBarChart ()β destructor.virtual int rtti () const overridevoid setBarTitles (const QList< QwtText > &)β sets the titles for the bars.QList< QwtText > barTitles () constvoid setSamples (const QVector< QwtSetSample > &)void setSamples (const QVector< QVector< double > > &)void setSamples (QwtSeriesData< QwtSetSample > *)void setStyle (ChartStyle style)ChartStyle style () constvoid setSymbol (int valueIndex, QwtColumnSymbol *)β adds a symbol to the symbol map.const QwtColumnSymbol * symbol (int valueIndex) constvoid resetSymbolMap ()virtual void drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const overridevirtual QRectF boundingRect () const overridevirtual QList< QwtLegendData > legendData () const overridevirtual QwtGraphic legendIcon (int index, const QSizeF &) const override
π Public Member Functions inherited from QwtPlotAbstractBarChart
QwtPlotAbstractBarChart (const QwtText &title)virtual ~QwtPlotAbstractBarChart ()β destructor.void setLayoutPolicy (LayoutPolicy)LayoutPolicy layoutPolicy () constvoid setLayoutHint (double)double layoutHint () constvoid setSpacing (int)β sets the spacing.int spacing () constvoid setMargin (int)β sets the margin.int margin () constvoid setBaseline (double)β sets the baseline.double baseline () constvirtual void getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const overrideβ calculates a hint for the canvas margin.
π Public Member Functions inherited from QwtPlotSeriesItem
QwtPlotSeriesItem (const QString &title=QString())QwtPlotSeriesItem (const QwtText &title)virtual ~QwtPlotSeriesItem ()β destructor.void setOrientation (Qt::Orientation)Qt::Orientation orientation () constvirtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const overrideβ draws the complete series.virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) overrideβ updates the item to changes of the axes scale division.
π Public Member Functions inherited from QwtPlotItem
QwtPlotItem ()QwtPlotItem (const QString &title)QwtPlotItem (const QwtText &title)virtual ~QwtPlotItem ()β destroys theQwtPlotItem.void attach (QwtPlot *plot)β attaches the item to a plot.void detach ()β this method detaches aQwtPlotItemfrom anyQwtPlotit has been associated with.QwtPlot * plot () constβ returns the attached plot.void setTitle (const QString &title)void setTitle (const QwtText &title)const QwtText & title () constvoid setItemAttribute (ItemAttribute, bool on=true)bool testItemAttribute (ItemAttribute) constvoid setItemInterest (ItemInterest, bool on=true)bool testItemInterest (ItemInterest) constvoid setRenderHint (RenderHint, bool on=true)bool testRenderHint (RenderHint) constvoid setRenderThreadCount (uint numThreads)uint renderThreadCount () constvoid setLegendIconSize (const QSize &)QSize legendIconSize () constdouble z () constvoid setZ (double z)β sets the z value.void show ()β shows the item.void hide ()β hides the item.virtual void setVisible (bool)bool isVisible () constvoid setAxes (QwtAxisId xAxis, QwtAxisId yAxis)void setXAxis (QwtAxisId)QwtAxisId xAxis () constβ returnsxAxis.void setYAxis (QwtAxisId)QwtAxisId yAxis () constβ returnsyAxis.virtual void itemChanged ()virtual void legendChanged ()virtual void updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &)β updates the item to changes of the legend info.QRectF scaleRect (const QwtScaleMap &, const QwtScaleMap &) constβ calculates the bounding scale rectangle of 2 maps.QRectF paintRect (const QwtScaleMap &, const QwtScaleMap &) constβ calculates the bounding paint rectangle of 2 maps.
π Public Member Functions inherited from QwtAbstractSeriesStore
virtual ~QwtAbstractSeriesStore ()β destructor.
π Public Member Functions inherited from QwtSeriesStore< QwtSetSample >
QwtSeriesStore ()β constructor. The store contains no series.~QwtSeriesStore ()β destructor.void setData (QwtSeriesData< QwtSetSample > *series)QwtSeriesData< QwtSetSample > * data ()QwtSetSample sample (int index) constvirtual size_t dataSize () const overridevirtual QRectF dataRect () const overridevirtual void setRectOfInterest (const QRectF &rect) overrideQwtSeriesData< QwtSetSample > * swapData (QwtSeriesData< QwtSetSample > *series)
π§ Protected Member Functions π§
QwtColumnSymbol * symbol (int valueIndex)virtual QwtColumnSymbol * specialSymbol (int sampleIndex, int valueIndex) constβ creates a symbol for special values.virtual void drawSample (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, const QwtInterval &boundingInterval, int index, const QwtSetSample &) constvirtual void drawBar (QPainter *, int sampleIndex, int valueIndex, const QwtColumnRect &) constvoid drawStackedBars (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int index, double sampleWidth, const QwtSetSample &) constvoid drawGroupedBars (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int index, double sampleWidth, const QwtSetSample &) const
π Protected Member Functions inherited from QwtPlotAbstractBarChart
double sampleWidth (const QwtScaleMap &map, double canvasSize, double boundingSize, double value) const
π 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β returns a default icon from a brush.
π Detailed Description π
Okay so QwtPlotMultiBarChart displays a series of samples, and each sample consists of a set of values. Iconic. π
Each value is displayed as a bar, and the bars of each set can be organized side by side or accumulated.
Each bar of a set is rendered by a QwtColumnSymbol, that is set by setSymbol(). The bars of different sets use the same symbols. Exceptions are possible by overloading specialSymbol() or overloading drawBar().
Depending on its orientation() the bars are displayed horizontally or vertically. The bars cover the interval between the baseline() and the value.
In opposite to most other plot items, QwtPlotMultiBarChart returns more than one entry for the legend β one for each symbol. Not me being extra, thatβs literally the design. π
See also: QwtPlotBarChart, QwtPlotHistogram QwtPlotSeriesItem::orientation(), QwtPlotAbstractBarChart::baseline() β go peek at those too.
Definition at line 41 of file qwt_plot_multi_barchart.h.
π·οΈ Member Enumeration Documentation π·οΈ
enum QwtPlotMultiBarChart::ChartStyle
Chart styles. The default setting is QwtPlotMultiBarChart::Grouped.
See also: setStyle(), style()
Enumerator
Groupedβ the bars of a set are displayed side by side.Stackedβ the bars are displayed on top of each other accumulating to a single bar. All values of a set need to have the same sign.
Definition at line 52 of file qwt_plot_multi_barchart.h.
π§Έ Constructor & Destructor Documentation π§Έ
QwtPlotMultiBarChart::QwtPlotMultiBarChart (const QString & title = QString()) [explicit]
Constructor.
Parameters: title β title of the chart
Definition at line 62 of file qwt_plot_multi_barchart.cpp.
QwtPlotMultiBarChart::QwtPlotMultiBarChart (const QwtText & title) [explicit]
Constructor.
Parameters: title β title of the chart
Definition at line 52 of file qwt_plot_multi_barchart.cpp.
QwtPlotMultiBarChart::~QwtPlotMultiBarChart () [virtual]
Destructor.
Definition at line 69 of file qwt_plot_multi_barchart.cpp.
π MEMBER FUNCTION DOCUMENTATION π
π QList< QwtText > QwtPlotMultiBarChart::barTitles () const π
okay bestie, this one just hands you the bar titles, no cap.
- Returns: Bar titles
- See also:
setBarTitles(),legendData() - Definition at line 148 of file
qwt_plot_multi_barchart.cpp.
π¦ QRectF QwtPlotMultiBarChart::boundingRect () const [override], [virtual] π¦
This gives you the bounding rectangle of, like, all the samples. For an empty series the rectangle is invalid β so if itβs empty, donβt expect a cute little box, bestie.
- Returns: Bounding rectangle of all samples. For an empty series the rectangle is invalid.
- Reimplemented from:
QwtPlotSeriesItem - Definition at line 302 of file
qwt_plot_multi_barchart.cpp.
πΈ void QwtPlotMultiBarChart::drawBar (QPainter * painter, int sampleIndex, int valueIndex, const QwtColumnRect & rect) const [protected], [virtual] πΈ
Draw a bar. Literally the bar-drawing moment. Iconic.
painterβ PaintersampleIndexβ Index of the sample - might be-1when the bar is painted for the legendvalueIndexβ Index of a value in a setrectβ Directed target rectangle for the bar- See also:
drawSeries() - Definition at line 652 of file
qwt_plot_multi_barchart.cpp.
π void QwtPlotMultiBarChart::drawGroupedBars (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int index, double sampleWidth, const QwtSetSample & sample) const [protected] π
Draw a grouped sample. Group-chat energy but for bars, fr fr.
painterβ PainterxMapβ x mapyMapβ y mapcanvasRectβ Contents rectangle of the canvasindexβ Index of the sample to be paintedsampleWidthβ Bounding width for all bars of the samplesampleβ Sample- See also:
drawSeries(),sampleWidth() - Definition at line 461 of file
qwt_plot_multi_barchart.cpp.
π void QwtPlotMultiBarChart::drawSample (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, const QwtInterval & boundingInterval, int index, const QwtSetSample & sample) const [protected], [virtual] π
Draw a sample. This is the main-character sample-painting function, periodt.
painterβ PainterxMapβ x mapyMapβ y mapcanvasRectβ Contents rectangle of the canvasboundingIntervalβ Bounding interval of sample valuesindexβ Index of the sample to be paintedsampleβ Sample value- See also:
drawSeries() - Definition at line 415 of file
qwt_plot_multi_barchart.cpp.
π void QwtPlotMultiBarChart::drawSeries (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int from, int to) const [override], [virtual] π
Draw an interval of the bar chart. The way this handles from and to is lowkey important, bestie.
painterβ PainterxMapβ Maps x-values into pixel coordinates.yMapβ Maps y-values into pixel coordinates.canvasRectβ Contents rectangle of the canvasfromβ Index of the first point to be paintedtoβ Index of the last point to be painted. Ifto < 0the curve will be painted to its last point.- See also:
drawSymbols() - Implements:
QwtPlotSeriesItem - Definition at line 374 of file
qwt_plot_multi_barchart.cpp.
π void QwtPlotMultiBarChart::drawStackedBars (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect, int index, double sampleWidth, const QwtSetSample & sample) const [protected] π
Draw a stacked sample. Stacked bars are giving structured chaos, and we love that for them.
painterβ PainterxMapβ x mapyMapβ y mapcanvasRectβ Contents rectangle of the canvasindexβ Index of the sample to be paintedsampleWidthβ Width of the barssampleβ Sample- See also:
drawSeries(),sampleWidth() - Definition at line 541 of file
qwt_plot_multi_barchart.cpp.
π QList< QwtLegendData > QwtPlotMultiBarChart::legendData () const [override], [virtual] π
This returns the info that gets displayed on the legend. The chart is represented by a list of entries β one for each bar title. Each element contains a bar title and an icon showing its corresponding bar. Cute, useful, iconic.
- Returns: Information to be displayed on the legend
- See also:
barTitles(),legendIcon(),legendIconSize() - Reimplemented from:
QwtPlotItem - Definition at line 687 of file
qwt_plot_multi_barchart.cpp.
π§ QwtGraphic QwtPlotMultiBarChart::legendIcon (int index, const QSizeF & size) const [override], [virtual] π§
This is the icon that represents a bar on the legend. Tiny legend bar icon moment.
indexβ Index of the barsizeβ Icon size- Returns: Icon for representing a bar on the legend
- Returns: An icon showing a bar
- See also:
drawBar(),legendData() - Reimplemented from:
QwtPlotItem - Definition at line 720 of file
qwt_plot_multi_barchart.cpp.
π«Ά void QwtPlotMultiBarChart::resetSymbolMap () π«Ά
Remove all symbols from the symbol map. Clean slate, bestie. No leftover symbol clutter.
- Definition at line 237 of file
qwt_plot_multi_barchart.cpp.
π int QwtPlotMultiBarChart::rtti () const [override], [virtual] π
Returns the runtime type info, and itβs QwtPlotItem::Rtti_PlotBarChart. Slay.
- Returns:
QwtPlotItem::Rtti_PlotBarChart - Reimplemented from:
QwtPlotItem - Definition at line 82 of file
qwt_plot_multi_barchart.cpp.
π void QwtPlotMultiBarChart::setBarTitles (const QList< QwtText > & titles) π
Set the titles for the bars. The titles are used for the legend. So yes, this is where the legend gets its whole naming situation.
titlesβ Bar titles- See also:
barTitles(),legendData() - Definition at line 138 of file
qwt_plot_multi_barchart.cpp.
β¨ void QwtPlotMultiBarChart::setSamples (const QVector< QVector< double > > & samples) β¨
Initialize data with an array of samples. Vector of points, vector of points β you know the vibe.
samplesβ Vector of points- Definition at line 101 of file
qwt_plot_multi_barchart.cpp.
πΈ void QwtPlotMultiBarChart::setSamples (const QVector< QwtSetSample > & samples) πΈ
Initialize data with an array of samples. Same energy, different container, bestie.
samplesβ Vector of points- Definition at line 91 of file
qwt_plot_multi_barchart.cpp.
π¦ void QwtPlotMultiBarChart::setSamples (QwtSeriesData< QwtSetSample > * data) π¦
Assign a series of samples.
setSamples() is just a wrapper for setData() without any additional value - beside that it is easier to find for the developer. Honestly? Very findable. Very developer-friendly. Very that.
dataβ Data
Warning, bestie: The item takes ownership of the data object, deleting it when its not used anymore.
- Definition at line 123 of file
qwt_plot_multi_barchart.cpp.
π
void QwtPlotMultiBarChart::setStyle (ChartStyle style) π
Set the style of the chart. Chart style is the whole aesthetic, okay?
styleβ Chart style- See also:
style() - Definition at line 278 of file
qwt_plot_multi_barchart.cpp.
π₯ void QwtPlotMultiBarChart::setSymbol (int valueIndex, QwtColumnSymbol * symbol) π₯
Add a symbol to the symbol map. Assign a default symbol for drawing the bar representing all values with the same index in a set. Symbol-map business, fr fr.
valueIndexβ Index of a value in a setsymbolβ Symbol used for drawing a bar- See also:
symbol(),resetSymbolMap(),specialSymbol() - Definition at line 164 of file
qwt_plot_multi_barchart.cpp.
π§ QwtColumnSymbol * QwtPlotMultiBarChart::specialSymbol (int sampleIndex, int valueIndex) const [protected], [virtual] π§
Create a symbol for special values. Usually the symbols for displaying a bar are set by setSymbols() and common for all sets. By overloading specialSymbol() it is possible to create a temporary symbol() for displaying a special value.
The symbol has to be created by new each time specialSymbol() is called. As soon as the symbol is painted this symbol gets deleted. So like⦠temporary icon era.
When no symbol ( NULL ) is returned, the value will be displayed with the standard symbol that is used for all symbols with the same valueIndex.
sampleIndexβ Index of the samplevalueIndexβ Index of the value in the set- Returns:
NULL, meaning that the value is not special - Definition at line 263 of file
qwt_plot_multi_barchart.cpp.
π QwtPlotMultiBarChart::ChartStyle QwtPlotMultiBarChart::style () const π
Returns the style of the chart. The aesthetic check, basically.
- Returns: Style of the chart
- See also:
setStyle() - Definition at line 293 of file
qwt_plot_multi_barchart.cpp.
π QwtColumnSymbol * QwtPlotMultiBarChart::symbol (int valueIndex) [protected] π
Find a symbol in the symbol map.
valueIndexβ Index of a value in a set- Returns: The symbol, that had been set by
setSymbol()orNULL. - See also:
setSymbol(),specialSymbol(),drawBar() - Definition at line 226 of file
qwt_plot_multi_barchart.cpp.
π const QwtColumnSymbol * QwtPlotMultiBarChart::symbol (int valueIndex) const π
Find a symbol in the symbol map β but make it const, bestie.
valueIndexβ Index of a value in a set- Returns: The symbol, that had been set by
setSymbol()orNULL. - See also:
setSymbol(),specialSymbol(),drawBar() - Definition at line 210 of file
qwt_plot_multi_barchart.cpp.
β¨ AUTHOR β¨
Generated automatically by Doxygen for Qwt User's Guide from the source code.
π Source: Qwt User's Guide; page/version: QwtPlotMultiBarChart(3); date: not listed on the footer, bestie β but this sign-off is still iconic. Mwah! π
π¦ 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