| 34134 | } |
| 34135 | |
| 34136 | bool QCPPolarAxisAngular::registerPolarGraph(QCPPolarGraph *graph) |
| 34137 | { |
| 34138 | if (mGraphs.contains(graph)) |
| 34139 | { |
| 34140 | qDebug() << Q_FUNC_INFO << "plottable already added:" << reinterpret_cast<quintptr>(graph); |
| 34141 | return false; |
| 34142 | } |
| 34143 | if (graph->keyAxis() != this) |
| 34144 | { |
| 34145 | qDebug() << Q_FUNC_INFO << "plottable not created with this as axis:" << reinterpret_cast<quintptr>(graph); |
| 34146 | return false; |
| 34147 | } |
| 34148 | |
| 34149 | mGraphs.append(graph); |
| 34150 | // possibly add plottable to legend: |
| 34151 | if (mParentPlot->autoAddPlottableToLegend()) |
| 34152 | graph->addToLegend(); |
| 34153 | if (!graph->layer()) // usually the layer is already set in the constructor of the plottable (via QCPLayerable constructor) |
| 34154 | graph->setLayer(mParentPlot->currentLayer()); |
| 34155 | return true; |
| 34156 | } |
| 34157 | /* end of 'src/polar/layoutelement-angularaxis.cpp' */ |
| 34158 | |
| 34159 |
no test coverage detected