! \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
| 15489 | QCPAbstractPlottable base class. |
| 15490 | */ |
| 15491 | bool 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 |