| 29 | } |
| 30 | |
| 31 | void MagnifyingGlass::updateImage(int x, int y) |
| 32 | { |
| 33 | auto *const viewer = qobject_cast<const Viewer *>(parentWidget()); |
| 34 | QImage img = viewer->grabMagnifiedRegion(QPoint(x, y), size(), zoomLevel); |
| 35 | setPixmap(QPixmap::fromImage(img)); |
| 36 | move(static_cast<int>(x - float(width()) / 2), static_cast<int>(y - float(height()) / 2)); |
| 37 | } |
| 38 | |
| 39 | void MagnifyingGlass::updateImage() |
| 40 | { |
no test coverage detected