MCPcopy Create free account
hub / github.com/LUX-Core/lux / setGraph

Method setGraph

src/qt/qcustomplot.cpp:29646–29662  ·  view source on GitHub ↗

! Sets the QCPGraph this tracer sticks to. The tracer \a position will be set to type QCPItemPosition::ptPlotCoords and the axes will be set to the axes of \a graph. To free the tracer from any graph, set \a graph to 0. The tracer \a position can then be placed freely like any other item position. This is the state the tracer will assume when its graph gets deleted while still attache

Source from the content-addressed store, hash-verified

29644 \see setGraphKey
29645*/
29646void QCPItemTracer::setGraph(QCPGraph *graph)
29647{
29648 if (graph)
29649 {
29650 if (graph->parentPlot() == mParentPlot)
29651 {
29652 position->setType(QCPItemPosition::ptPlotCoords);
29653 position->setAxes(graph->keyAxis(), graph->valueAxis());
29654 mGraph = graph;
29655 updatePosition();
29656 } else
29657 qDebug() << Q_FUNC_INFO << "graph isn't in same QCustomPlot instance as this item";
29658 } else
29659 {
29660 mGraph = 0;
29661 }
29662}
29663
29664/*!
29665 Sets the key of the graph's data point the tracer will be positioned at. This is the only free

Callers

nothing calls this directly

Calls 2

setTypeMethod · 0.80
setAxesMethod · 0.80

Tested by

no test coverage detected