// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #include "JFJochMagnifierWindow.h" #include "../image_viewer/JFJochFollowerImage.h" JFJochMagnifierWindow::JFJochMagnifierWindow(QWidget *parent) : JFJochHelperWindow(parent) { setWindowTitle("Magnifier"); m_image = new JFJochFollowerImage(this); setCentralWidget(m_image); resize(320, 320); } void JFJochMagnifierWindow::setFrame(std::shared_ptr frame) { // Just a pointer assignment plus an update() that a hidden window never acts on, so this // needs no visibility guard: there is nothing expensive left to skip. m_image->SetFrame(std::move(frame)); } void JFJochMagnifierWindow::centerAt(QPointF scenePos) { if (!isVisible()) return; m_image->CenterAt(scenePos); }