Files
Jungfraujoch/viewer/windows/JFJochSettingsWindow.cpp
T
leonarski_fandClaude Opus 4.8 940b7e34d4 viewer: indexing algorithm/refinement radio groups, rotation fix, live job plots
Processing settings:
- Split the spot/index settings widget into two tabs (Spot finding | Indexing)
  via TakeSpotFindingPage()/TakeIndexingPage().
- Indexing tab now exposes the indexing algorithm (Auto/FFBIDX/FFT/FFTW/None) and
  geometry refinement (None/Orientation/Beam center/Pixel refine) as radio groups
  with short explanations.
- Fix: UpdateSpotFindingSettings dropped algorithm + geometry-refinement when
  copying into indexing_settings (the geom checkbox was a no-op); both now flow
  into jobs via curr_experiment.

Processing jobs window:
- Rotation indexing from the job dialog now also sets RotationIndexing(true) on
  the experiment's IndexingSettings; otherwise IndexAndRefine builds no rotation
  indexer and the two-pass pre-pass throws.
- Status cell shows a QProgressBar with "<done> / <expected>".
- Live results: JFJochProcessController::OnImageProcessed accumulates per-image
  results into a JFJochReaderDataset and emits it throttled (~4 Hz) as liveDataset,
  forwarded to the dataset-info plots so they update while a job runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 08:30:49 +02:00

42 lines
2.0 KiB
C++

// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "JFJochSettingsWindow.h"
#include <QTabWidget>
JFJochSettingsWindow::JFJochSettingsWindow(const SpotFindingSettings &spot, const IndexingSettings &indexing,
const AzimuthalIntegrationSettings &azint,
const BraggIntegrationSettings &bragg,
const ScalingSettings &scaling, QWidget *parent)
: JFJochHelperWindow(parent) {
setWindowTitle("Processing settings");
// Reuse the existing spot/index + azimuthal windows: build them (kept hidden) and lift their
// content into tabs, so all their existing widgets, logic and signals keep working.
m_processing = new JFJochViewerProcessingWindow(spot, indexing, this);
m_azint = new JFJochAzIntWindow(azint, this);
m_bragg = new JFJochBraggIntegrationPanel(bragg, this);
m_scaling = new JFJochScalingPanel(scaling, this);
auto *tabs = new QTabWidget(this);
tabs->addTab(m_processing->TakeSpotFindingPage(), "Spot finding");
tabs->addTab(m_processing->TakeIndexingPage(), "Indexing");
tabs->addTab(m_azint->takeCentralWidget(), "Azimuthal");
tabs->addTab(m_bragg, "Bragg integration");
tabs->addTab(m_scaling, "Scaling");
setCentralWidget(tabs);
m_processing->hide(); // the emptied shells stay alive only to drive their signals
m_azint->hide();
connect(m_processing, &JFJochViewerProcessingWindow::settingsChanged,
this, &JFJochSettingsWindow::spotFindingChanged);
connect(m_azint, &JFJochAzIntWindow::settingsChanged,
this, &JFJochSettingsWindow::azintChanged);
connect(m_bragg, &JFJochBraggIntegrationPanel::settingsChanged,
this, &JFJochSettingsWindow::braggChanged);
connect(m_scaling, &JFJochScalingPanel::settingsChanged,
this, &JFJochSettingsWindow::scalingChanged);
}