|
QTradingView 1.0.0
A high-performance charting library built with C++ and Qt.
|
Abstract base class for data series in QTradingView charts. More...
#include <Series.h>
Public Member Functions | |
| Series (SeriesType type) | |
| Constructs a Series of the given type. | |
| virtual | ~Series ()=default |
| Virtual destructor for Series. | |
| SeriesType | type () const |
| Returns the type of the series. | |
| virtual qint64 | timestampAt (int index) const =0 |
| Returns the timestamp for the data point at the given index. | |
| virtual int | dataCount () const =0 |
| Returns the number of data points in the series. | |
| virtual void | render (QPainter *painter, const ViewPort &viewport, IScale *scale)=0 |
| Renders the series within the given viewport and scale. | |
| virtual bool | hitTest (const QPointF &point, int &outIndex) const =0 |
| Performs hit testing to find the nearest data point to the given position. | |
| virtual void | calculateRange (int startIndex, int endIndex, double &outMin, double &outMax) const =0 |
| Calculates the data range (min/max values) within the given index range. | |
Protected Attributes | |
| SeriesType | m_type |
Abstract base class for data series in QTradingView charts.
Series provides the interface for chart series (line, bar, candlestick), including type, rendering, and data access.
|
inlineexplicit |
Constructs a Series of the given type.
| type | Series type (Line, Bar, CandleStick). |
|
pure virtual |
Calculates the data range (min/max values) within the given index range.
| startIndex | Start index of the range. |
| endIndex | End index of the range. |
| outMin | Output parameter for the minimum value. |
| outMax | Output parameter for the maximum value. |
Implemented in QTradingView::BarSeries, QTradingView::CandleStickSeries, and QTradingView::LineSeries.
|
pure virtual |
Returns the number of data points in the series.
Implemented in QTradingView::BarSeries, QTradingView::CandleStickSeries, and QTradingView::LineSeries.
|
pure virtual |
Performs hit testing to find the nearest data point to the given position.
| point | Position to test. |
| outIndex | Output parameter for the nearest data point index. |
Implemented in QTradingView::BarSeries, QTradingView::CandleStickSeries, and QTradingView::LineSeries.
|
pure virtual |
Renders the series within the given viewport and scale.
| painter | QPainter instance for drawing. |
| viewport | Viewport defining the area to render. |
| scale | Scale used for rendering. |
Implemented in QTradingView::BarSeries, QTradingView::CandleStickSeries, and QTradingView::LineSeries.
|
pure virtual |
Returns the timestamp for the data point at the given index.
| index | Data point index. |
Implemented in QTradingView::BarSeries, QTradingView::CandleStickSeries, and QTradingView::LineSeries.
| SeriesType QTradingView::Series::type | ( | ) | const |
Returns the type of the series.