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

Method getMaximumRowColSizes

qcustomplot/qcustomplot.cpp:4807–4825  ·  view source on GitHub ↗

! \internal Places the maximum column widths and row heights into \a maxColWidths and \a maxRowHeights respectively. The maximum height of a row is the smallest maximum height of any element's outer rect in that row. The maximum width of a column is the smallest maximum width of any element's outer rect in that column. This is a helper function for \ref updateLayout. \see

Source from the content-addressed store, hash-verified

4805 \see getMinimumRowColSizes
4806*/
4807void QCPLayoutGrid::getMaximumRowColSizes(QVector<int> *maxColWidths, QVector<int> *maxRowHeights) const
4808{
4809 *maxColWidths = QVector<int>(columnCount(), QWIDGETSIZE_MAX);
4810 *maxRowHeights = QVector<int>(rowCount(), QWIDGETSIZE_MAX);
4811 for (int row=0; row<rowCount(); ++row)
4812 {
4813 for (int col=0; col<columnCount(); ++col)
4814 {
4815 if (QCPLayoutElement *el = mElements.at(row).at(col))
4816 {
4817 QSize maxSize = getFinalMaximumOuterSize(el);
4818 if (maxColWidths->at(col) > maxSize.width())
4819 (*maxColWidths)[col] = maxSize.width();
4820 if (maxRowHeights->at(row) > maxSize.height())
4821 (*maxRowHeights)[row] = maxSize.height();
4822 }
4823 }
4824 }
4825}
4826
4827
4828////////////////////////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

columnCountFunction · 0.85
rowCountFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected