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

Method setRowStretchFactors

qcustomplot/qcustomplot.cpp:4293–4308  ·  view source on GitHub ↗

! Sets the stretch \a factors of all rows. \a factors must have the size \ref rowCount. Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see \ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize, \ref QCPLayoutElement::setSizeConstraintRec

Source from the content-addressed store, hash-verified

4291 \see setRowStretchFactor, setColumnStretchFactors
4292*/
4293void QCPLayoutGrid::setRowStretchFactors(const QList<double> &factors)
4294{
4295 if (factors.size() == mRowStretchFactors.size())
4296 {
4297 mRowStretchFactors = factors;
4298 for (int i=0; i<mRowStretchFactors.size(); ++i)
4299 {
4300 if (mRowStretchFactors.at(i) <= 0)
4301 {
4302 qDebug() << Q_FUNC_INFO << "Invalid stretch factor, must be positive:" << mRowStretchFactors.at(i);
4303 mRowStretchFactors[i] = 1;
4304 }
4305 }
4306 } else
4307 qDebug() << Q_FUNC_INFO << "Row count not equal to passed stretch factor count:" << factors;
4308}
4309
4310/*!
4311 Sets the gap that is left blank between columns to \a pixels.

Callers

nothing calls this directly

Calls 2

atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected