MCPcopy Create free account
hub / github.com/Kitware/ParaView / sizeHint

Method sizeHint

Qt/Python/pqPythonLineNumberArea.cxx:27–36  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

25
26//-----------------------------------------------------------------------------
27QSize pqPythonLineNumberArea::sizeHint() const
28{
29 const std::uint32_t numberOfDigits =
30 ::getNumberOfDigits(std::max(1, this->TextEdit.document()->blockCount()));
31
32 const std::int32_t space = 2 * this->TextEdit.fontMetrics().horizontalAdvance(' ') +
33 numberOfDigits * this->TextEdit.fontMetrics().horizontalAdvance(QLatin1Char('9'));
34
35 return QSize{ space, this->TextEdit.height() };
36}
37
38//-----------------------------------------------------------------------------
39void pqPythonLineNumberArea::paintEvent(QPaintEvent* event)

Callers 1

paintEventMethod · 0.95

Calls 3

getNumberOfDigitsFunction · 0.85
maxFunction · 0.85
heightMethod · 0.80

Tested by

no test coverage detected