// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include "../image_viewer/JFJochFollowerImage.h" // ADXV-style magnifier, its own dock below the inspector: a close-up of the diffraction image // that moves when the cursor moves over the image with Shift held. It displays the frame the main // view has already rendered, so it always agrees with it on colour map, contrast and HDR mode. // Three fixed zoom levels: large value labels, small value labels over a wider field, and a still // wider field with no labels. class JFJochViewerMagnifier : public QWidget { Q_OBJECT JFJochFollowerImage *image_; QToolButton *pop_out_; signals: void fieldChanged(QSizeF size); // Move to a window of its own, or back into the dock. Qt's own dock floating is disabled in // this viewer (a floated dock goes dead on WSLg), so the main window moves the widget itself. void popOutClicked(); public: explicit JFJochViewerMagnifier(QWidget *parent = nullptr); void setPoppedOut(bool on); public slots: void setFrame(std::shared_ptr frame); void setPixelValues(std::shared_ptr> pixels); void centerAt(QPointF scenePos); };