QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
QwtPlotBoxChart Class Reference

Plot item for box-and-whisker (boxplot) visualization. More...

#include <qwt_plot_boxchart.h>

Inheritance diagram for QwtPlotBoxChart:
QwtPlotSeriesItem QwtSeriesStore< QwtBoxSample > QwtPlotItem QwtAbstractSeriesStore QwtAbstractSeriesStore

Classes

class  PrivateData
 

Public Types

enum  BoxStyle { NoBox , Rect , Diamond , Notch }
 Box body display style . More...
 
enum  WhiskerStyle { NoWhiskers , StandardWhisker , MinMaxLine }
 Whisker display style . More...
 
enum  PaintAttribute { ClipBoxes = 0x01 , ClipOutliers = 0x02 , ImageBuffer = 0x04 }
 Paint attributes for performance optimization . More...
 
- 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_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

 QwtPlotBoxChart (const QString &title=QString())
 Constructor .
 
 QwtPlotBoxChart (const QwtText &title)
 Constructor with QwtText title .
 
virtual ~QwtPlotBoxChart ()
 Destructor .
 
virtual int rtti () const override
 Get runtime type information.
 
void setPaintAttribute (PaintAttribute, bool on=true)
 Set a paint attribute.
 
bool testPaintAttribute (PaintAttribute) const
 Test if a paint attribute is enabled.
 
void setSamples (const QVector< QwtBoxSample > &)
 Set box samples from a vector.
 
void setSamples (QwtSeriesData< QwtBoxSample > *)
 Set box samples from series data.
 
void setOutliers (const QVector< QwtBoxOutlierSample > &)
 Set outlier samples from a vector.
 
void setOutliers (QwtSeriesData< QwtBoxOutlierSample > *)
 Set outlier samples from series data.
 
const QwtSeriesData< QwtBoxOutlierSample > * outlierData () const
 Get the outlier data.
 
void setBoxStyle (BoxStyle)
 Set the box style.
 
BoxStyle boxStyle () const
 Get the box style.
 
void setWhiskerStyle (WhiskerStyle)
 Set the whisker style.
 
WhiskerStyle whiskerStyle () const
 Get the whisker style.
 
void setOrientation (Qt::Orientation)
 Set the orientation.
 
Qt::Orientation orientation () const
 Get the orientation.
 
void setBoxExtent (double extent)
 Set the box extent (width in scale coordinates)
 
double boxExtent () const
 Get the box extent.
 
void setMinBoxWidth (double pixels)
 Set the minimum box width in pixels.
 
double minBoxWidth () const
 Get the minimum box width.
 
void setMaxBoxWidth (double pixels)
 Set the maximum box width in pixels.
 
double maxBoxWidth () const
 Get the maximum box width.
 
void setPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
 Set the pen for box outline and whiskers.
 
void setPen (const QPen &)
 Set the pen for box outline and whiskers.
 
const QPen & pen () const
 Get the pen for box outline and whiskers.
 
void setBrush (const QBrush &)
 Set the brush for box body fill.
 
const QBrush & brush () const
 Get the brush for box body fill.
 
void setMedianPen (const QPen &)
 Set the pen for median line.
 
QPen medianPen () const
 Get the pen for median line.
 
void setOutlierSymbol (const QwtSymbol *)
 Set the symbol for outliers.
 
const QwtSymboloutlierSymbol () const
 Get the symbol for outliers.
 
void setMeanSymbol (const QwtSymbol *)
 Set the symbol for mean marker.
 
const QwtSymbolmeanSymbol () const
 Get the symbol for mean marker.
 
void setMedianVisible (bool)
 Set whether the median line is visible.
 
bool isMedianVisible () const
 Check if the median line is visible.
 
void setMeanVisible (bool)
 Set whether the mean marker is visible.
 
bool isMeanVisible () const
 Check if the mean marker is visible.
 
void setOutlierJitter (double jitterWidth)
 Set the outlier jitter width.
 
double outlierJitter () const
 Get the outlier jitter width.
 
virtual void drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const override
 Draw the series.
 
virtual QRectF boundingRect () const override
 Get the bounding rectangle.
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const override
 Get the legend icon.
 
- Public Member Functions inherited from QwtPlotSeriesItem
 QwtPlotSeriesItem (const QString &title=QString())
 Constructor.
 
 QwtPlotSeriesItem (const QwtText &title)
 Constructor.
 
virtual ~QwtPlotSeriesItem ()
 Destructor .
 
void setOrientation (Qt::Orientation)
 Set the orientation of the item.
 
Qt::Orientation orientation () const
 Get the orientation of the plot item.
 
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 scale divisions.
 
- Public Member Functions inherited from QwtPlotItem
 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.
 
QwtPlotplot () 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 QwtTexttitle () const
 Get the title.
 
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 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 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< QwtLegendDatalegendData () const
 Return legend data.
 
- Public Member Functions inherited from QwtSeriesStore< QwtBoxSample >
void setData (QwtSeriesData< QwtBoxSample > *series)
 
QwtSeriesData< QwtBoxSample > * data ()
 
const QwtSeriesData< QwtBoxSample > * data () const
 
QwtBoxSample sample (size_t index) const
 
virtual size_t dataSize () const override
 
virtual QRectF dataRect () const override
 
virtual void setRectOfInterest (const QRectF &rect) override
 Set a the "rectangle of interest" for the stored series.
 
QwtSeriesData< QwtBoxSample > * swapData (QwtSeriesData< QwtBoxSample > *series)
 

Protected Member Functions

void init ()
 Initialize.
 
virtual double scaledBoxWidth (const QwtScaleMap &posMap, const QwtScaleMap &valueMap, const QRectF &canvasRect) const
 Calculate scaled box width in pixels.
 
virtual void drawBox (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw a single box.
 
virtual void drawWhiskers (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw whiskers for a single box.
 
virtual void drawMedian (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw median line for a single box.
 
virtual void drawOutliers (QPainter *, const QwtScaleMap &posMap, const QwtScaleMap &valueMap, const QRectF &canvasRect, int from, int to) const
 Draw outliers for boxes in range.
 
virtual void drawOutlierSymbol (QPainter *, double posPixel, double valuePixel, const QwtSymbol &symbol) const
 Draw a single outlier symbol.
 
- 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
 Create a default icon.
 

Detailed Description

Plot item for box-and-whisker (boxplot) visualization.

Member Enumeration Documentation

◆ BoxStyle

Box body display style .

Enumerator
NoBox 

No box body, only whiskers and outliers.

Rect 

Traditional rectangular box (Q1-Q3)

Diamond 

Diamond shape connecting extremes.

Notch 

Rectangle with notch indentation at median.

◆ PaintAttribute

Paint attributes for performance optimization .

Enumerator
ClipBoxes 

Clip boxes before painting (performance for zoomed views)

ClipOutliers 

Clip outlier symbols before painting.

ImageBuffer 

Use image buffer for rendering (optimization for many boxes)

◆ WhiskerStyle

Whisker display style .

Enumerator
NoWhiskers 

No whisker lines drawn.

StandardWhisker 

Traditional T-bar whiskers with horizontal caps (default)

MinMaxLine 

Simple line from whiskerLower to whiskerUpper.

Constructor & Destructor Documentation

◆ QwtPlotBoxChart() [1/2]

QwtPlotBoxChart::QwtPlotBoxChart ( const QString &  title = QString())
explicit

Constructor .

Constructor.

◆ QwtPlotBoxChart() [2/2]

QwtPlotBoxChart::QwtPlotBoxChart ( const QwtText title)
explicit

Constructor with QwtText title .

Constructor.

◆ ~QwtPlotBoxChart()

QwtPlotBoxChart::~QwtPlotBoxChart ( )
virtual

Destructor .

Destructor

.

Member Function Documentation

◆ boundingRect()

QRectF QwtPlotBoxChart::boundingRect ( ) const
overridevirtual

Get the bounding rectangle.

Reimplemented from QwtPlotSeriesItem.

◆ boxExtent()

double QwtPlotBoxChart::boxExtent ( ) const

Get the box extent.

◆ boxStyle()

QwtPlotBoxChart::BoxStyle QwtPlotBoxChart::boxStyle ( ) const

Get the box style.

◆ brush()

const QBrush & QwtPlotBoxChart::brush ( ) const

Get the brush for box body fill.

◆ drawSeries()

void QwtPlotBoxChart::drawSeries ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect,
int  from,
int  to 
) const
overridevirtual

Draw the series.

Implements QwtPlotSeriesItem.

◆ isMeanVisible()

bool QwtPlotBoxChart::isMeanVisible ( ) const

Check if the mean marker is visible.

◆ isMedianVisible()

bool QwtPlotBoxChart::isMedianVisible ( ) const

Check if the median line is visible.

◆ legendIcon()

QwtGraphic QwtPlotBoxChart::legendIcon ( int  index,
const QSizeF &  size 
) const
overridevirtual

Get the legend icon.

Reimplemented from QwtPlotItem.

◆ maxBoxWidth()

double QwtPlotBoxChart::maxBoxWidth ( ) const

Get the maximum box width.

◆ meanSymbol()

const QwtSymbol * QwtPlotBoxChart::meanSymbol ( ) const

Get the symbol for mean marker.

◆ medianPen()

QPen QwtPlotBoxChart::medianPen ( ) const

Get the pen for median line.

◆ minBoxWidth()

double QwtPlotBoxChart::minBoxWidth ( ) const

Get the minimum box width.

◆ orientation()

Qt::Orientation QwtPlotBoxChart::orientation ( ) const

Get the orientation.

◆ outlierData()

const QwtSeriesData< QwtBoxOutlierSample > * QwtPlotBoxChart::outlierData ( ) const

Get the outlier data.

◆ outlierJitter()

double QwtPlotBoxChart::outlierJitter ( ) const

Get the outlier jitter width.

◆ outlierSymbol()

const QwtSymbol * QwtPlotBoxChart::outlierSymbol ( ) const

Get the symbol for outliers.

◆ pen()

const QPen & QwtPlotBoxChart::pen ( ) const

Get the pen for box outline and whiskers.

◆ rtti()

int QwtPlotBoxChart::rtti ( ) const
overridevirtual

Get runtime type information.

Get the runtime type information.

Reimplemented from QwtPlotItem.

◆ setBoxExtent()

void QwtPlotBoxChart::setBoxExtent ( double  extent)

Set the box extent (width in scale coordinates)

◆ setBoxStyle()

void QwtPlotBoxChart::setBoxStyle ( BoxStyle  style)

Set the box style.

◆ setBrush()

void QwtPlotBoxChart::setBrush ( const QBrush &  brush)

Set the brush for box body fill.

◆ setMaxBoxWidth()

void QwtPlotBoxChart::setMaxBoxWidth ( double  pixels)

Set the maximum box width in pixels.

◆ setMeanSymbol()

void QwtPlotBoxChart::setMeanSymbol ( const QwtSymbol symbol)

Set the symbol for mean marker.

◆ setMeanVisible()

void QwtPlotBoxChart::setMeanVisible ( bool  visible)

Set whether the mean marker is visible.

◆ setMedianPen()

void QwtPlotBoxChart::setMedianPen ( const QPen &  pen)

Set the pen for median line.

◆ setMedianVisible()

void QwtPlotBoxChart::setMedianVisible ( bool  visible)

Set whether the median line is visible.

◆ setMinBoxWidth()

void QwtPlotBoxChart::setMinBoxWidth ( double  pixels)

Set the minimum box width in pixels.

◆ setOrientation()

void QwtPlotBoxChart::setOrientation ( Qt::Orientation  orient)

Set the orientation.

◆ setOutlierJitter()

void QwtPlotBoxChart::setOutlierJitter ( double  jitterWidth)

Set the outlier jitter width.

◆ setOutliers() [1/2]

void QwtPlotBoxChart::setOutliers ( const QVector< QwtBoxOutlierSample > &  samples)

Set outlier samples from a vector.

◆ setOutliers() [2/2]

void QwtPlotBoxChart::setOutliers ( QwtSeriesData< QwtBoxOutlierSample > *  data)

Set outlier samples from series data.

◆ setOutlierSymbol()

void QwtPlotBoxChart::setOutlierSymbol ( const QwtSymbol symbol)

Set the symbol for outliers.

◆ setPaintAttribute()

void QwtPlotBoxChart::setPaintAttribute ( PaintAttribute  attr,
bool  on = true 
)

Set a paint attribute.

◆ setPen() [1/2]

void QwtPlotBoxChart::setPen ( const QColor &  color,
qreal  width = 0.0,
Qt::PenStyle  style = Qt::SolidLine 
)

Set the pen for box outline and whiskers.

◆ setPen() [2/2]

void QwtPlotBoxChart::setPen ( const QPen &  pen)

Set the pen for box outline and whiskers.

◆ setSamples() [1/2]

void QwtPlotBoxChart::setSamples ( const QVector< QwtBoxSample > &  samples)

Set box samples from a vector.

◆ setSamples() [2/2]

void QwtPlotBoxChart::setSamples ( QwtSeriesData< QwtBoxSample > *  data)

Set box samples from series data.

◆ setWhiskerStyle()

void QwtPlotBoxChart::setWhiskerStyle ( WhiskerStyle  style)

Set the whisker style.

◆ testPaintAttribute()

bool QwtPlotBoxChart::testPaintAttribute ( PaintAttribute  attr) const

Test if a paint attribute is enabled.

◆ whiskerStyle()

QwtPlotBoxChart::WhiskerStyle QwtPlotBoxChart::whiskerStyle ( ) const

Get the whisker style.


The documentation for this class was generated from the following files: