! \seebaseclassmethod Note that the association of the linear \a index to the row/column based cells depends on the current setting of \ref setFillOrder. \see rowColToIndex */
| 4617 | \see rowColToIndex |
| 4618 | */ |
| 4619 | QCPLayoutElement *QCPLayoutGrid::takeAt(int index) |
| 4620 | { |
| 4621 | if (QCPLayoutElement *el = elementAt(index)) |
| 4622 | { |
| 4623 | releaseElement(el); |
| 4624 | int row, col; |
| 4625 | indexToRowCol(index, row, col); |
| 4626 | mElements[row][col] = 0; |
| 4627 | return el; |
| 4628 | } else |
| 4629 | { |
| 4630 | qDebug() << Q_FUNC_INFO << "Attempt to take invalid index:" << index; |
| 4631 | return 0; |
| 4632 | } |
| 4633 | } |
| 4634 | |
| 4635 | /* inherits documentation from base class */ |
| 4636 | bool QCPLayoutGrid::take(QCPLayoutElement *element) |