MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / portWidth

Method portWidth

QtNodeEditor/src/NodeGeometry.cpp:277–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277unsigned int
278NodeGeometry::
279portWidth(PortType portType) const
280{
281 unsigned width = 0;
282
283 for (auto i = 0ul; i < _dataModel->nPorts(portType); ++i)
284 {
285 QString name = _dataModel->dataType(portType, i).name;
286 width = std::max(unsigned(_fontMetrics.width(name)), width);
287 }
288
289 return width;
290}

Callers

nothing calls this directly

Calls 2

dataTypeMethod · 0.80
nPortsMethod · 0.45

Tested by

no test coverage detected