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

Method insertColumn

3rdparty/qcustomplot/qcustomplot.cpp:4493–4509  ·  view source on GitHub ↗

! Inserts a new column with empty cells at the column index \a newIndex. Valid values for \a newIndex range from 0 (inserts a column at the left) to \a columnCount (appends a column at the right). \see insertRow */

Source from the content-addressed store, hash-verified

4491 \see insertRow
4492*/
4493void QCPLayoutGrid::insertColumn(int newIndex)
4494{
4495 if (mElements.isEmpty() || mElements.first().isEmpty()) // if grid is completely empty, add first cell
4496 {
4497 expandTo(1, 1);
4498 return;
4499 }
4500
4501 if (newIndex < 0)
4502 newIndex = 0;
4503 if (newIndex > columnCount())
4504 newIndex = columnCount();
4505
4506 mColumnStretchFactors.insert(newIndex, 1);
4507 for (int row=0; row<rowCount(); ++row)
4508 mElements[row].insert(newIndex, nullptr);
4509}
4510
4511/*!
4512 Converts the given \a row and \a column to the linear index used by some methods of \ref

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected