QwtPlotTradingCurve(3) | Qwt User's Guide | QwtPlotTradingCurve(3) |
QwtPlotTradingCurve - QwtPlotTradingCurve illustrates movements in the price of a financial instrument over time.
#include <qwt_plot_tradingcurve.h>
Inherits QwtPlotSeriesItem, and QwtSeriesStore< QwtOHLCSample >.
enum SymbolStyle { NoSymbol = -1, Bar,
CandleStick, UserSymbol = 100 }
Symbol styles. enum Direction { Increasing, Decreasing }
Direction of a price movement. enum PaintAttribute { ClipSymbols
= 0x01 }
typedef QFlags< PaintAttribute > PaintAttributes
Paint attributes.
QwtPlotTradingCurve (const QString
&title=QString())
QwtPlotTradingCurve (const QwtText &title)
virtual ~QwtPlotTradingCurve ()
Destructor. virtual int rtti () const
void setPaintAttribute (PaintAttribute, bool on=true)
bool testPaintAttribute (PaintAttribute) const
void setSamples (const QVector< QwtOHLCSample > &)
void setSamples (QwtSeriesData< QwtOHLCSample > *)
void setSymbolStyle (SymbolStyle style)
SymbolStyle symbolStyle () const
void setSymbolPen (const QColor &, qreal width=0.0,
Qt::PenStyle=Qt::SolidLine)
void setSymbolPen (const QPen &)
Set the symbol pen. QPen symbolPen () const
void setSymbolBrush (Direction, const QBrush &)
QBrush symbolBrush (Direction) const
void setSymbolExtent (double)
Set the extent of the symbol. double symbolExtent () const
void setMinSymbolWidth (double)
double minSymbolWidth () const
void setMaxSymbolWidth (double)
double maxSymbolWidth () const
virtual void drawSeries (QPainter *painter, const QwtScaleMap
&xMap, const QwtScaleMap &yMap, const QRectF &canvasRect,
int from, int to) const
virtual QRectF boundingRect () const
virtual QwtGraphic legendIcon (int index, const QSizeF &)
const
void init ()
Initialize internal members. virtual void drawSymbols (QPainter *,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &canvasRect, int from, int to) const
virtual void drawUserSymbol (QPainter *, SymbolStyle, const
QwtOHLCSample &, Qt::Orientation, bool inverted, double
symbolWidth) const
Draw a symbol for a symbol style >= UserSymbol. void drawBar
(QPainter *painter, const QwtOHLCSample &, Qt::Orientation, bool
inverted, double width) const
Draw a bar. void drawCandleStick (QPainter *, const
QwtOHLCSample &, Qt::Orientation, double width) const
Draw a candle stick. virtual double scaledSymbolWidth (const
QwtScaleMap &xMap, const QwtScaleMap &yMap, const
QRectF &canvasRect) const
QwtPlotTradingCurve illustrates movements in the price of a financial instrument over time.
QwtPlotTradingCurve supports candlestick or bar ( OHLC ) charts that are used in the domain of technical analysis.
While the length ( height or width depending on orientation() ) of each symbol depends on the corresponding OHLC sample the size of the other dimension can be controlled using:
The extent is a size in scale coordinates, so that the symbol width is increasing when the plot is zoomed in. Minimum/Maximum width is in widget coordinates independent from the zoom level. When setting the minimum and maximum to the same value, the width of the symbol is fixed.
Direction of a price movement.
Enumerator
Attributes to modify the drawing algorithm.
See also:
Enumerator
Symbol styles. The default setting is QwtPlotSeriesItem::CandleStick.
See also:
Enumerator
See also:
Constructor
Parameters:
Constructor
Parameters:
Returns:
Reimplemented from QwtPlotSeriesItem.
Draw a bar.
Parameters:
See also:
Draw a candle stick.
Parameters:
See also:
Draw an interval of the curve
Parameters:
See also:
Implements QwtPlotSeriesItem.
Draw symbols
Parameters:
See also:
Draw a symbol for a symbol style >= UserSymbol. The implementation does nothing and is intended to be overloaded
Parameters:
Returns:
Parameters:
See also:
Reimplemented from QwtPlotItem.
Returns:
See also:
Returns:
See also:
Returns:
Reimplemented from QwtPlotItem.
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:
Returns:
See also:
Set a maximum for the symbol width
A value <= 0.0 means an unlimited width
Parameters:
See also:
Set a minimum for the symbol width
Parameters:
See also:
Specify an attribute how to draw the curve
Parameters:
See also:
Initialize data with an array of samples.
Parameters:
See also:
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:
Warning:
Set the symbol brush
Parameters:
See also:
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:
See also:
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:
See also:
Set the symbol pen. The symbol pen is used for rendering the lines of the bar or candlestick symbols
See also:
Set the symbol style
Parameters:
See also:
Parameters:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |