MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / insertRow

Method insertRow

3rdparty/qcustomplot/qcustomplot.cpp:4466–4484  ·  view source on GitHub ↗

! Inserts a new row with empty cells at the row index \a newIndex. Valid values for \a newIndex range from 0 (inserts a row at the top) to \a rowCount (appends a row at the bottom). \see insertColumn */

Source from the content-addressed store, hash-verified

4464 \see insertColumn
4465*/
4466void QCPLayoutGrid::insertRow(int newIndex)
4467{
4468 if (mElements.isEmpty() || mElements.first().isEmpty()) // if grid is completely empty, add first cell
4469 {
4470 expandTo(1, 1);
4471 return;
4472 }
4473
4474 if (newIndex < 0)
4475 newIndex = 0;
4476 if (newIndex > rowCount())
4477 newIndex = rowCount();
4478
4479 mRowStretchFactors.insert(newIndex, 1);
4480 QList<QCPLayoutElement*> newRow;
4481 for (int col=0; col<columnCount(); ++col)
4482 newRow.append(nullptr);
4483 mElements.insert(newIndex, newRow);
4484}
4485
4486/*!
4487 Inserts a new column with empty cells at the column index \a newIndex. Valid values for \a

Callers 1

AeqPreviewPlotMethod · 0.45

Calls 5

rowCountFunction · 0.85
columnCountFunction · 0.85
insertMethod · 0.80
appendMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected