MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / updateText

Method updateText

src/interface/WidgetMarqueeLabel.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void ScrollText::updateText()
44{
45 timer.stop();
46
47 singleTextWidth = fontMetrics().horizontalAdvance(_text);
48 scrollEnabled = (singleTextWidth > width() - leftMargin);
49
50 if (scrollEnabled)
51 {
52 scrollPos = -64;
53 staticText.setText(_text + _separator);
54 timer.start();
55 }
56 else
57 {
58 staticText.setText(_text);
59 }
60
61 staticText.prepare(QTransform(), font());
62 wholeTextSize = QSize(fontMetrics().horizontalAdvance(staticText.text()), fontMetrics().height());
63}
64
65void ScrollText::paintEvent(QPaintEvent*)
66{

Callers

nothing calls this directly

Calls 5

widthFunction · 0.85
fontFunction · 0.85
startMethod · 0.80
textMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected