Renders crosshair lines and labels on the chart.
More...
#include <CrosshairRenderer.h>
|
|
| CrosshairRenderer () |
| | Constructs a CrosshairRenderer with default settings.
|
| |
| void | setCrosshairColor (const QColor &color) |
| | Sets the color of the crosshair lines.
|
| |
| void | setLabelBackgroundColor (const QColor &color) |
| | Sets the background color of the crosshair label.
|
| |
| void | setLabelTextColor (const QColor &color) |
| | Sets the text color of the crosshair label.
|
| |
| void | setFont (const QFont &font) |
| | Sets the font used for crosshair labels.
|
| |
| void | render (QPainter *painter, const QPointF &position, const ViewPort &viewport, const Pane *pane, const Series *series, double xAxisY=-1.0) |
| | Renders the crosshair and its labels on the chart.
|
| |
Renders crosshair lines and labels on the chart.
CrosshairRenderer draws vertical and horizontal crosshair lines at the mouse position, along with price and time labels. It supports customization of colors and fonts for the crosshair and labels.
◆ render()
| void QTradingView::CrosshairRenderer::render |
( |
QPainter * |
painter, |
|
|
const QPointF & |
position, |
|
|
const ViewPort & |
viewport, |
|
|
const Pane * |
pane, |
|
|
const Series * |
series, |
|
|
double |
xAxisY = -1.0 |
|
) |
| |
Renders the crosshair and its labels on the chart.
- Parameters
-
| painter | The QPainter instance used for drawing. |
| position | The position of the crosshair. |
| viewport | The current viewport settings. |
| pane | The pane being rendered. |
| series | The data series being displayed. |
| xAxisY | Optional Y position for the X-axis (default -1.0). |
◆ setCrosshairColor()
| void QTradingView::CrosshairRenderer::setCrosshairColor |
( |
const QColor & |
color | ) |
|
Sets the color of the crosshair lines.
- Parameters
-
| color | The crosshair color. |
◆ setFont()
| void QTradingView::CrosshairRenderer::setFont |
( |
const QFont & |
font | ) |
|
Sets the font used for crosshair labels.
- Parameters
-
◆ setLabelBackgroundColor()
| void QTradingView::CrosshairRenderer::setLabelBackgroundColor |
( |
const QColor & |
color | ) |
|
Sets the background color of the crosshair label.
- Parameters
-
| color | The label background color. |
◆ setLabelTextColor()
| void QTradingView::CrosshairRenderer::setLabelTextColor |
( |
const QColor & |
color | ) |
|
Sets the text color of the crosshair label.
- Parameters
-
| color | The label text color. |
The documentation for this class was generated from the following files: