Build Packages / Unit tests (push) Successful in 1h11m40s
Build Packages / build:windows:nocuda (push) Successful in 17m39s
Build Packages / build:windows:cuda (push) Successful in 20m10s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m2s
Build Packages / build:viewer-tgz:cuda (push) Successful in 11m28s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 9m4s
Build Packages / build:rugnux:windows (push) Successful in 11m20s
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 7m46s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m15s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 16m21s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m1s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m19s
Build Packages / build:rpm (rocky8) (push) Successful in 18m17s
Build Packages / build:rpm (rocky9) (push) Successful in 18m48s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 15m59s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 16m19s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m2s
Build Packages / Generate python client (push) Successful in 1m3s
Build Packages / Build documentation (push) Successful in 1m28s
Build Packages / Create release (push) Successful in 18s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m50s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m15s
The magnifier moves from a helper window into its own dock below the inspector. It has three fixed zoom levels (x64 and x32 with the pixel values written on the pixels, x10 without) instead of wheel zoom, and follows the cursor only while Shift is held over the diffraction image. Meanwhile the diffraction view draws a frame around the area it covers, just outside that area so it stays visible at low zoom without hiding the pixels; releasing Shift (seen by the application-wide key filter, so wherever the focus is), moving without it or leaving the image hides it. A "Pop out" button moves the magnifier into a separate window and back. Qt's own dock floating stays disabled: a floated dock is placed off-screen on WSLg. Whether it was popped out, and the window geometry, persist across sessions. The inspector's image statistics become a collapsible section so a small screen can give the space to the magnifier. kLayoutVersion is bumped for the new dock. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
70 lines
3.5 KiB
C++
70 lines
3.5 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include "JFJochMouseShortcutsWindow.h"
|
|
|
|
#include <QTextBrowser>
|
|
#include <QVBoxLayout>
|
|
|
|
namespace {
|
|
struct Shortcut { QString action; QString effect; };
|
|
struct Section { QString title; QVector<Shortcut> rows; };
|
|
|
|
QString BuildHtml() {
|
|
const QVector<Section> sections = {
|
|
// JFJochImage / JFJochDiffractionImage mouse handling
|
|
{"Diffraction image", {
|
|
{"Wheel", "Zoom in / out, centred on the cursor"},
|
|
{"Shift + wheel", "Move the foreground (upper contrast limit) in linear steps"},
|
|
{"Ctrl + wheel", "Move the foreground in multiplicative steps (×1.15 per notch)"},
|
|
{"F held + wheel", "Same as Shift + wheel, for as long as F is held"},
|
|
{"A", "Apply auto-contrast once; press again to switch on continuous Auto"},
|
|
{"Home / End", "Jump to the first / last image in the dataset"},
|
|
{"Page Up / Page Down", "Step one image forward / back"},
|
|
{"Hover", "Status bar shows the pixel position, its value and the resolution"},
|
|
{"Drag", "Pan the image"},
|
|
{"Shift + move", "Move the magnifier panel to the cursor; a frame shows the area it covers"},
|
|
{"Shift + drag", "Draw a rectangular ROI"},
|
|
{"Shift + Ctrl + drag", "Draw a circular ROI"},
|
|
{"Drag an ROI or its handle", "Move or resize the selected ROI"},
|
|
{"Right click", "Copy / save the image, fit to view, clear the ROI"},
|
|
}},
|
|
// JFJochGridScanImage
|
|
{"Grid scan", {
|
|
{"Hover", "Status bar shows the image number, the grid position and its value"},
|
|
{"Shift + hover", "Load the image under the cursor while moving over the grid"},
|
|
{"Double click", "Load the image under the cursor"},
|
|
}},
|
|
{"Other views", {
|
|
{"2D azimuthal image: double click", "Zoom the diffraction image on the corresponding detector position"},
|
|
{"Dataset-info plot: hover", "Status bar shows the image number and the plotted value"},
|
|
{"Dataset-info plot: Shift + hover", "Load the hovered image"},
|
|
{"Spot / reflection list: double click", "Zoom the diffraction image on that spot or prediction"},
|
|
{"Image list: double click", "Load that image"},
|
|
}},
|
|
};
|
|
|
|
QString html = "<html><body>";
|
|
for (const auto §ion : sections) {
|
|
html += "<h3>" + section.title + "</h3>";
|
|
html += "<table cellspacing='0' cellpadding='4' width='100%'>";
|
|
for (const auto &row : section.rows)
|
|
html += "<tr><td width='38%'><b>" + row.action + "</b></td><td>" + row.effect + "</td></tr>";
|
|
html += "</table>";
|
|
}
|
|
html += "</body></html>";
|
|
return html;
|
|
}
|
|
}
|
|
|
|
JFJochMouseShortcutsWindow::JFJochMouseShortcutsWindow(QWidget *parent) : QDialog(parent) {
|
|
setWindowTitle("Mouse Shortcuts");
|
|
resize(620, 620);
|
|
|
|
auto *browser = new QTextBrowser(this);
|
|
browser->setHtml(BuildHtml());
|
|
|
|
auto *layout = new QVBoxLayout(this);
|
|
layout->addWidget(browser);
|
|
}
|