MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / getMinimumRowColSizes

Method getMinimumRowColSizes

qcustomplot/qcustomplot.cpp:4774–4792  ·  view source on GitHub ↗

! \internal Places the minimum column widths and row heights into \a minColWidths and \a minRowHeights respectively. The minimum height of a row is the largest minimum height of any element's outer rect in that row. The minimum width of a column is the largest minimum width of any element's outer rect in that column. This is a helper function for \ref updateLayout. \see g

Source from the content-addressed store, hash-verified

4772 \see getMaximumRowColSizes
4773*/
4774void QCPLayoutGrid::getMinimumRowColSizes(QVector<int> *minColWidths, QVector<int> *minRowHeights) const
4775{
4776 *minColWidths = QVector<int>(columnCount(), 0);
4777 *minRowHeights = QVector<int>(rowCount(), 0);
4778 for (int row=0; row<rowCount(); ++row)
4779 {
4780 for (int col=0; col<columnCount(); ++col)
4781 {
4782 if (QCPLayoutElement *el = mElements.at(row).at(col))
4783 {
4784 QSize minSize = getFinalMinimumOuterSize(el);
4785 if (minColWidths->at(col) < minSize.width())
4786 (*minColWidths)[col] = minSize.width();
4787 if (minRowHeights->at(row) < minSize.height())
4788 (*minRowHeights)[row] = minSize.height();
4789 }
4790 }
4791 }
4792}
4793
4794/*! \internal
4795

Callers

nothing calls this directly

Calls 3

columnCountFunction · 0.85
rowCountFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected