MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / recomputeColCount

Method recomputeColCount

gui/src/flexgridlayout.cpp:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void FlexGridLayout::recomputeColCount()
210{
211 if(m_activeWidgetList.size() > 0) {
212 auto maxWidth = m_widgetList.at(m_activeWidgetList.at(0))->minimumSizeHint().width();
213 for(int i = 1; i < m_activeWidgetList.size(); i++) {
214 if(m_widgetList.at(m_activeWidgetList.at(i))->minimumSizeHint().width() > maxWidth) {
215 maxWidth = m_widgetList.at(m_activeWidgetList.at(i))->minimumSizeHint().width();
216 }
217 }
218 if(colWidth != maxWidth) {
219 computeCols(maxWidth);
220 }
221 } else {
222 computeCols(0);
223 }
224}
225
226void FlexGridLayout::computeCols(double width) // width of the first active widget
227{

Callers

nothing calls this directly

Calls 1

minimumSizeHintMethod · 0.45

Tested by

no test coverage detected