23#ifndef QTRADINGVIEW_ISERIES_H
24#define QTRADINGVIEW_ISERIES_H
26#include "QTradingView/qtradingview_global.h"
32namespace QTradingView {
37enum class SeriesType {
55 explicit Series(SeriesType type) : m_type(type) {};
95 virtual bool hitTest(
const QPointF& point,
int& outIndex)
const = 0;
104 virtual void calculateRange(
int startIndex,
int endIndex,
double& outMin,
double& outMax)
const = 0;
Abstract base class for value-to-pixel scaling in QTradingView.
Definition IScale.h:37
Abstract base class for data series in QTradingView charts.
Definition Series.h:49
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.
virtual ~Series()=default
Virtual destructor for Series.
virtual int dataCount() const =0
Returns the number of data points in the series.
Series(SeriesType type)
Constructs a Series of the given type.
Definition Series.h:55
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.
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.
Manages the visible range and pixel mapping for chart bars.
Definition ViewPort.h:39