doubleQwtPlotHistogram::baseline()constReturns:
Value of the baseline
Seealso:setBaseline()QRectFQwtPlotHistogram::boundingRect()const[virtual]Returns:
Bounding rectangle of all samples. For an empty series the rectangle is invalid.
Reimplemented from QwtPlotSeriesItem.
constQBrush&QwtPlotHistogram::brush()constReturns:
Brush used in a style() depending way.
Seealso:setPen(), brush()QwtColumnRectQwtPlotHistogram::columnRect(constQwtIntervalSample&sample,constQwtScaleMap&xMap,constQwtScaleMap&yMap)const[protected],[virtual]
Calculate the area that is covered by a sample
Parameters:sample Sample
xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
Returns:
Rectangle, that is covered by a sample
voidQwtPlotHistogram::drawColumn(QPainter*painter,constQwtColumnRect&rect,constQwtIntervalSample&sample)const[protected],[virtual]
Draw a column for a sample in Columns style().
When a symbol() has been set the symbol is used otherwise the column is displayed as plain rectangle
using pen() and brush().
Parameters:painter Painter
rect Rectangle where to paint the column in paint device coordinates
sample Sample to be displayed
Note:
In applications, where different intervals need to be displayed in a different way ( f.e different
colors or even using different symbols) it is recommended to overload drawColumn().
voidQwtPlotHistogram::drawColumns(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,intfrom,intto)const[protected]
Draw a histogram in Columns style()Parameters:painter Painter
xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
from Index of the first sample to be painted
to Index of the last sample to be painted. If to < 0 the histogram will be painted to its last point.
Seealso:setStyle(), style(), setSymbol(), drawColumn()voidQwtPlotHistogram::drawLines(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,intfrom,intto)const[protected]
Draw a histogram in Lines style()Parameters:painter Painter
xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
from Index of the first sample to be painted
to Index of the last sample to be painted. If to < 0 the histogram will be painted to its last point.
Seealso:setStyle(), style(), setPen()voidQwtPlotHistogram::drawOutline(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,intfrom,intto)const[protected]
Draw a histogram in Outline style()Parameters:painter Painter
xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
from Index of the first sample to be painted
to Index of the last sample to be painted. If to < 0 the histogram will be painted to its last point.
Seealso:setStyle(), style()Warning:
The outline style requires, that the intervals are in increasing order and not overlapping.
voidQwtPlotHistogram::drawSeries(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect,intfrom,intto)const[virtual]
Draw a subset of the histogram samples
Parameters: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.
Seealso:drawOutline(), drawLines(), drawColumns
Implements QwtPlotSeriesItem.
QwtGraphicQwtPlotHistogram::legendIcon(intindex,constQSizeF&size)const[virtual]
A plain rectangle without pen using the brush()Parameters:index Index of the legend entry ( ignored as there is only one )
size Icon size
Returns:
A graphic displaying the icon
Seealso:QwtPlotItem::setLegendIconSize(), QwtPlotItem::legendData()
Reimplemented from QwtPlotItem.
constQPen&QwtPlotHistogram::pen()constReturns:
Pen used in a style() depending way.
Seealso:setPen(), brush()intQwtPlotHistogram::rtti()const[virtual]Returns:QwtPlotItem::Rtti_PlotHistogram
Reimplemented from QwtPlotItem.
voidQwtPlotHistogram::setBaseline(doublevalue)
Set the value of the baseline. Each column representing an QwtIntervalSample is defined by its interval
and the interval between baseline and the value of the sample.
The default value of the baseline is 0.0.
Parameters:value Value of the baseline
Seealso:baseline()voidQwtPlotHistogram::setBrush(constQBrush&brush)
Assign a brush, that is used in a style() depending way.
Parameters:brush New brush
Seealso:pen(), brush()voidQwtPlotHistogram::setPen(constQColor&color,qrealwidth=0.0,Qt::PenStylestyle=Qt::SolidLine)
Build and assign a pen
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.
Parameters:color Pen color
width Pen width
style Pen style
Seealso:pen(), brush()voidQwtPlotHistogram::setPen(constQPen&pen)
Assign a pen, that is used in a style() depending way.
Parameters:pen New pen
Seealso:pen(), brush()voidQwtPlotHistogram::setSamples(constQVector<QwtIntervalSample>&samples)
Initialize data with an array of samples.
Parameters:samples Vector of points
voidQwtPlotHistogram::setSamples(QwtSeriesData<QwtIntervalSample>*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.
Parameters:data Data
Warning:
The item takes ownership of the data object, deleting it when its not used anymore.
voidQwtPlotHistogram::setStyle(HistogramStylestyle)
Set the histogram's drawing style
Parameters:style Histogram style
Seealso:HistogramStyle, style()voidQwtPlotHistogram::setSymbol(constQwtColumnSymbol*symbol)
Assign a symbol. In Column style an optional symbol can be assigned, that is responsible for displaying
the rectangle that is defined by the interval and the distance between baseline() and value. When no
symbol has been defined the area is displayed as plain rectangle using pen() and brush().
Seealso:style(), symbol(), drawColumn(), pen(), brush()Note:
In applications, where different intervals need to be displayed in a different way ( f.e different
colors or even using different symbols) it is recommended to overload drawColumn().
QwtPlotHistogram::HistogramStyleQwtPlotHistogram::style()constReturns:
Style of the histogram
Seealso:HistogramStyle, setStyle()constQwtColumnSymbol*QwtPlotHistogram::symbol()constReturns:
Current symbol or NULL, when no symbol has been assigned
Seealso:setSymbol()