MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / registerGraph

Method registerGraph

qcustomplot/qcustomplot.cpp:15491–15506  ·  view source on GitHub ↗

! \internal In order to maintain the simplified graph interface of QCustomPlot, this method is called by the QCPGraph constructor to register itself with this QCustomPlot's internal graph list. Returns true on success, i.e. if \a graph is valid and wasn't already registered with this QCustomPlot. This graph specific registration happens in addition to the call to \ref registerPlottab

Source from the content-addressed store, hash-verified

15489 QCPAbstractPlottable base class.
15490*/
15491bool QCustomPlot::registerGraph(QCPGraph *graph)
15492{
15493 if (!graph)
15494 {
15495 qDebug() << Q_FUNC_INFO << "passed graph is zero";
15496 return false;
15497 }
15498 if (mGraphs.contains(graph))
15499 {
15500 qDebug() << Q_FUNC_INFO << "graph already registered with this QCustomPlot";
15501 return false;
15502 }
15503
15504 mGraphs.append(graph);
15505 return true;
15506}
15507
15508
15509/*! \internal

Callers 1

QCPGraphMethod · 0.80

Calls 2

containsMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected