QRectFQwtPlotTradingCurve::boundingRect()const[virtual]Returns:
Bounding rectangle of all samples. For an empty series the rectangle is invalid.
Reimplemented from QwtPlotSeriesItem.
voidQwtPlotTradingCurve::drawBar(QPainter*painter,constQwtOHLCSample&sample,Qt::Orientationorientation,boolinverted,doublewidth)const[protected]
Draw a bar.
Parameters:painter Qt painter, initialized with pen/brush
sample Sample, already translated into paint device coordinates
orientation Vertical or horizontal
inverted When inverted is false the open tick is painted to the left/top, otherwise it is painted
right/bottom. The close tick is painted in the opposite direction of the open tick. painted in the
opposite d opposite direction.
width Width or height of the candle, depending on the orientation
Seealso:BarvoidQwtPlotTradingCurve::drawCandleStick(QPainter*painter,constQwtOHLCSample&sample,Qt::Orientationorientation,doublewidth)const[protected]
Draw a candle stick.
Parameters:painter Qt painter, initialized with pen/brush
sample Samples already translated into paint device coordinates
orientation Vertical or horizontal
width Width or height of the candle, depending on the orientation
Seealso:CandleStickvoidQwtPlotTradingCurve::drawSeries(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect,intfrom,intto)const[virtual]
Draw an interval of the curve
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 point to be painted
to Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
Seealso:drawSymbols()
Implements QwtPlotSeriesItem.
voidQwtPlotTradingCurve::drawSymbols(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect,intfrom,intto)const[protected],[virtual]
Draw symbols
Parameters:painter Painter
xMap x map
yMap y map
canvasRect Contents rectangle of the canvas
from Index of the first point to be painted
to Index of the last point to be painted
Seealso:drawSeries()voidQwtPlotTradingCurve::drawUserSymbol(QPainter*painter,SymbolStylesymbolStyle,constQwtOHLCSample&sample,Qt::Orientationorientation,boolinverted,doublesymbolWidth)const[protected],[virtual]
Draw a symbol for a symbol style >= UserSymbol. The implementation does nothing and is intended to be
overloaded
Parameters:painter Qt painter, initialized with pen/brush
symbolStyle Symbol style
sample Samples already translated into paint device coordinates
orientation Vertical or horizontal
inverted True, when the opposite scale ( Qt::Vertical: x, Qt::Horizontal: y ) is increasing in the
opposite direction as QPainter coordinates.
symbolWidth Width of the symbol in paint device coordinates
QwtGraphicQwtPlotTradingCurve::legendIcon(intindex,constQSizeF&size)const[virtual]Returns:
A rectangle filled with the color of the symbol pen
Parameters:index Index of the legend entry ( usually there is only one )
size Icon size
Seealso:setLegendIconSize(), legendData()
Reimplemented from QwtPlotItem.
doubleQwtPlotTradingCurve::maxSymbolWidth()constReturns:
Maximum for the symbol width
Seealso:setMaxSymbolWidth(), minSymbolWidth(), symbolExtent()doubleQwtPlotTradingCurve::minSymbolWidth()constReturns:
Minmum for the symbol width
Seealso:setMinSymbolWidth(), maxSymbolWidth(), symbolExtent()intQwtPlotTradingCurve::rtti()const[virtual]Returns:QwtPlotItem::Rtti_PlotTradingCurve
Reimplemented from QwtPlotItem.
doubleQwtPlotTradingCurve::scaledSymbolWidth(constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect)const[protected],[virtual]
Calculate the symbol width in paint coordinates
The width is calculated by scaling the symbol extent into paint device coordinates bounded by the
minimum/maximum symbol width.
Parameters:xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
canvasRect Contents rectangle of the canvas
Returns:
Symbol width in paint coordinates
Seealso:symbolExtent(), minSymbolWidth(), maxSymbolWidth()voidQwtPlotTradingCurve::setMaxSymbolWidth(doublewidth)
Set a maximum for the symbol width
A value <= 0.0 means an unlimited width
Parameters:width Width in paint device coordinates
Seealso:maxSymbolWidth(), setMinSymbolWidth(), setSymbolExtent()voidQwtPlotTradingCurve::setMinSymbolWidth(doublewidth)
Set a minimum for the symbol width
Parameters:width Width in paint device coordinates
Seealso:minSymbolWidth(), setMaxSymbolWidth(), setSymbolExtent()voidQwtPlotTradingCurve::setPaintAttribute(PaintAttributeattribute,boolon=true)
Specify an attribute how to draw the curve
Parameters:attribute Paint attribute
on On/Off
Seealso:testPaintAttribute()voidQwtPlotTradingCurve::setSamples(constQVector<QwtOHLCSample>&samples)
Initialize data with an array of samples.
Parameters:samples Vector of samples
Seealso:
QwtPlotSeriesItem::setData()
voidQwtPlotTradingCurve::setSamples(QwtSeriesData<QwtOHLCSample>*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.
voidQwtPlotTradingCurve::setSymbolBrush(Directiondirection,constQBrush&brush)
Set the symbol brush
Parameters:direction Direction type
brush Brush used to fill the body of all candlestick symbols with the direction
Seealso:symbolBrush(), setSymbolPen()voidQwtPlotTradingCurve::setSymbolExtent(doubleextent)
Set the extent of the symbol. The width of the symbol is given in scale coordinates. When painting a
symbol the width is scaled into paint device coordinates by scaledSymbolWidth(). The scaled width is
bounded by minSymbolWidth(), maxSymbolWidth()Parameters:extent Symbol width in scale coordinates
Seealso:symbolExtent(), scaledSymbolWidth(), setMinSymbolWidth(), setMaxSymbolWidth()voidQwtPlotTradingCurve::setSymbolPen(constQColor&color,qrealwidth=0.0,Qt::PenStylestyle=Qt::SolidLine)
Build and assign the symbol 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()
voidQwtPlotTradingCurve::setSymbolPen(constQPen&pen)
Set the symbol pen. The symbol pen is used for rendering the lines of the bar or candlestick symbols
Seealso:symbolPen(), setSymbolBrush()voidQwtPlotTradingCurve::setSymbolStyle(SymbolStylestyle)
Set the symbol style
Parameters:style Symbol style
Seealso:symbolStyle(), setSymbolExtent(), setSymbolPen(), setSymbolBrush()QBrushQwtPlotTradingCurve::symbolBrush(Directiondirection)constParameters:directionReturns:
Brush used to fill the body of all candlestick symbols with the direction
Seealso:setSymbolPen(), symbolBrush()doubleQwtPlotTradingCurve::symbolExtent()constReturns:
Extent of a symbol in scale coordinates
Seealso:setSymbolExtent(), scaledSymbolWidth(), minSymbolWidth(), maxSymbolWidth()QPenQwtPlotTradingCurve::symbolPen()constReturns:
Symbol pen
Seealso:setSymbolPen(), symbolBrush()QwtPlotTradingCurve::SymbolStyleQwtPlotTradingCurve::symbolStyle()constReturns:
Symbol style
Seealso:setSymbolStyle(), symbolExtent(), symbolPen(), symbolBrush()boolQwtPlotTradingCurve::testPaintAttribute(PaintAttributeattribute)constReturns:
True, when attribute is enabled
Seealso:PaintAttribute, setPaintAttribute()