|
QTradingView 1.0.0
A high-performance charting library built with C++ and Qt.
|
Represents a chart pane that contains one or more data series. More...
#include <Pane.h>
Public Member Functions | |
| Pane () | |
| Constructs an empty Pane. | |
| void | addSeries (std::shared_ptr< Series > series) |
| Adds a data series to the pane. | |
| void | removeSeries (std::shared_ptr< Series > series) |
| Removes a data series from the pane. | |
| const std::vector< std::shared_ptr< Series > > & | series () const |
| Returns the list of data series in the pane. | |
| void | setScale (ScaleType type) |
| Sets the Y-axis scale type for the pane. | |
| IScale * | scale () const |
| Returns the current Y-axis scale object. | |
| void | setHeightRatio (double ratio) |
| Sets the height ratio of the pane relative to other panes. | |
| double | heightRatio () const |
| Returns the height ratio of the pane. | |
| void | setRect (const QRectF &rect) |
| Sets the rectangle area for the pane in the chart. | |
| QRectF | rect () const |
| Returns the rectangle area of the pane. | |
| void | calculateRange (int start, int end) |
| Calculates the visible value range for the given data indices. | |
| double | minValue () const |
| Returns the minimum value in the current range. | |
| double | maxValue () const |
| Returns the maximum value in the current range. | |
| void | setManualRange (double minValue, double maxValue) |
| Sets a manual value range for the Y-axis. | |
| void | zoomYAxis (double zoomFactor, double anchorValue) |
| Zooms the Y-axis by a factor, anchored at a specific value. | |
| void | resetAutoRange () |
| Resets the Y-axis to automatic range calculation. | |
| bool | isAutoRange () const |
| Returns true if the Y-axis is in auto-range mode. | |
| void | render (QPainter *painter, const ViewPort &viewport) |
| Renders the pane and its series using the given painter and viewport. | |
Represents a chart pane that contains one or more data series.
Pane manages the layout, scaling, and rendering of its series. It supports automatic and manual Y-axis scaling, zooming, and custom height ratios for multi-pane charts.
| void QTradingView::Pane::addSeries | ( | std::shared_ptr< Series > | series | ) |
Adds a data series to the pane.
| series | Shared pointer to the Series to add. |
| void QTradingView::Pane::calculateRange | ( | int | start, |
| int | end | ||
| ) |
Calculates the visible value range for the given data indices.
| start | Start index of the data range. |
| end | End index of the data range. |
| void QTradingView::Pane::removeSeries | ( | std::shared_ptr< Series > | series | ) |
Removes a data series from the pane.
| series | Shared pointer to the Series to remove. |
| void QTradingView::Pane::render | ( | QPainter * | painter, |
| const ViewPort & | viewport | ||
| ) |
Renders the pane and its series using the given painter and viewport.
| painter | QPainter object for drawing. |
| viewport | The current viewport. |
| void QTradingView::Pane::setHeightRatio | ( | double | ratio | ) |
Sets the height ratio of the pane relative to other panes.
| ratio | The height ratio (e.g., 1.0 for equal height). |
| void QTradingView::Pane::setManualRange | ( | double | minValue, |
| double | maxValue | ||
| ) |
Sets a manual value range for the Y-axis.
| minValue | Minimum value. |
| maxValue | Maximum value. |
| void QTradingView::Pane::setRect | ( | const QRectF & | rect | ) |
Sets the rectangle area for the pane in the chart.
| rect | The rectangle area. |
| void QTradingView::Pane::setScale | ( | ScaleType | type | ) |
Sets the Y-axis scale type for the pane.
| type | The scale type (e.g., linear, logarithmic). |
| void QTradingView::Pane::zoomYAxis | ( | double | zoomFactor, |
| double | anchorValue | ||
| ) |
Zooms the Y-axis by a factor, anchored at a specific value.
| zoomFactor | The zoom factor (>1 to zoom in, <1 to zoom out). |
| anchorValue | The value to anchor the zoom operation. |