| 25 | } |
| 26 | |
| 27 | void MapOverlay::paintEvent(QPaintEvent *) |
| 28 | { |
| 29 | QPainter painter(this); |
| 30 | QString s = bname + QString::asprintf(" [%d,%d]", pos.x, pos.z); |
| 31 | QRect r = painter.fontMetrics() |
| 32 | .boundingRect(0, 0, width(), height(), Qt::AlignRight | Qt::AlignTop, s); |
| 33 | |
| 34 | painter.fillRect(r, QBrush(QColor(0, 0, 0, 128), Qt::SolidPattern)); |
| 35 | painter.setPen(Qt::white); |
| 36 | painter.drawText(r, s); |
| 37 | } |
| 38 | |
| 39 | MapView::MapView(QWidget *parent) |
| 40 | : QWidget(parent) |
nothing calls this directly
no test coverage detected