MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / paintEvent

Method paintEvent

ASAP/ScaleBar.cpp:71–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void ScaleBar::paintEvent(QPaintEvent *event) {
72 QPainter painter(this);
73 painter.setPen(QPen(QColor("black")));
74 painter.setBrush(QColor(255, 255, 255, 80));
75 QRectF bar = QRectF(0, 0, _currentWidth, 20);
76 painter.drawRect(bar);
77 painter.drawText(bar, Qt::AlignCenter, _currentLabel);
78}
79
80QSize ScaleBar::sizeHint() const {
81 QSize size(_currentWidth + 1, 21);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected