Revert "Viewer: read the data-analysis algorithm documentation from Help"
Build Packages / build:viewer-tgz:cpu (push) Successful in 7m14s
Build Packages / build:viewer-tgz:cuda (push) Successful in 8m3s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m29s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m30s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m42s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m20s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m16s
Build Packages / build:rpm (rocky8) (push) Successful in 10m49s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m25s
Build Packages / build:rpm (rocky9) (push) Successful in 11m46s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m21s
Build Packages / Generate python client (push) Successful in 25s
Build Packages / Build documentation (push) Successful in 1m2s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m30s
Build Packages / XDS test (durin plugin) (push) Successful in 7m52s
Build Packages / DIALS test (push) Successful in 12m25s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m38s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m16s
Build Packages / Unit tests (push) Successful in 1h2m14s
Build Packages / build:windows:nocuda (push) Canceled after 0s
Build Packages / build:windows:cuda (push) Canceled after 0s

This reverts commit 681e80e46.

Dropped for now: QTextBrowser::setMarkdown leaves the inline LaTeX in
CPU_DATA_ANALYSIS.md as raw "$...$" source, and the document's own HTML/math
rendering wants sorting out first. Reverted rather than rewritten so the
implementation stays available in history to bring back afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 22:08:45 +02:00
co-authored by Claude Opus 5
parent 6f15ae04b7
commit 38f1c1a387
6 changed files with 0 additions and 59 deletions
-2
View File
@@ -87,8 +87,6 @@ ADD_EXECUTABLE(jfjoch_viewer jfjoch_viewer.cpp JFJochViewerWindow.cpp JFJochView
windows/JFJochHelperWindow.h
windows/JFJochLicenseWindow.cpp
windows/JFJochLicenseWindow.h
windows/JFJochAlgorithmDocWindow.cpp
windows/JFJochAlgorithmDocWindow.h
image_viewer/JFJochImage.cpp
image_viewer/JFJochImage.h
image_viewer/JFJochFollowerImage.cpp
-13
View File
@@ -17,7 +17,6 @@
#include <QDockWidget>
#include "JFJochViewerWindow.h"
#include "windows/JFJochAlgorithmDocWindow.h"
#include "windows/JFJochLicenseWindow.h"
#include "../common/GitInfo.h"
#include "../common/CUDAWrapper.h"
@@ -82,9 +81,6 @@ JFJochViewerMenu::JFJochViewerMenu(QWidget *parent) : QMenuBar(parent) {
const QAction *aboutAction = helpMenu->addAction("About");
connect(aboutAction, &QAction::triggered, this, &JFJochViewerMenu::aboutSelected);
const QAction *algorithmDocAction = helpMenu->addAction("Data Analysis Algorithms");
connect(algorithmDocAction, &QAction::triggered, this, &JFJochViewerMenu::algorithmDocSelected);
const QAction *licensesAction = helpMenu->addAction("Third-party Licenses");
connect(licensesAction, &QAction::triggered, this, &JFJochViewerMenu::licensesSelected);
}
@@ -152,15 +148,6 @@ void JFJochViewerMenu::licensesSelected() {
licenseWindow->activateWindow();
}
void JFJochViewerMenu::algorithmDocSelected() {
// Same pattern as the licence window: created once, then raised.
if (algorithmDocWindow == nullptr)
algorithmDocWindow = new JFJochAlgorithmDocWindow(window());
algorithmDocWindow->show();
algorithmDocWindow->raise();
algorithmDocWindow->activateWindow();
}
void JFJochViewerMenu::openSelected() {
QString fileName = QFileDialog::getOpenFileName(
this,
-3
View File
@@ -7,7 +7,6 @@
#include "windows/JFJochHelperWindow.h"
class JFJochAlgorithmDocWindow;
class JFJochLicenseWindow;
class QDockWidget;
@@ -22,7 +21,6 @@ class JFJochViewerMenu : public QMenuBar {
QMenu *windowMenu = nullptr;
JFJochLicenseWindow *licenseWindow = nullptr;
JFJochAlgorithmDocWindow *algorithmDocWindow = nullptr;
public:
explicit JFJochViewerMenu(QWidget *parent = nullptr);
~JFJochViewerMenu() override = default;
@@ -52,7 +50,6 @@ signals:
private slots:
void aboutSelected();
void licensesSelected();
void algorithmDocSelected();
void quitSelected();
void closeSelected();
-3
View File
@@ -7,9 +7,6 @@
<qresource prefix="/">
<file>jfjoch.png</file>
<file>third_party_licenses.html</file>
<!-- The algorithm documentation is shown in-app (Help > Data Analysis Algorithms);
aliased so the viewer does not depend on the docs/ directory at runtime. -->
<file alias="cpu_data_analysis.md">../../docs/CPU_DATA_ANALYSIS.md</file>
<file>psi_01.png</file>
<file>psi_02.png</file>
<file>psi_03.png</file>
@@ -1,23 +0,0 @@
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "JFJochAlgorithmDocWindow.h"
#include <QFile>
#include <QTextBrowser>
#include <QVBoxLayout>
JFJochAlgorithmDocWindow::JFJochAlgorithmDocWindow(QWidget *parent) : QDialog(parent) {
setWindowTitle("Data Analysis Algorithms");
resize(900, 700);
auto *browser = new QTextBrowser(this);
browser->setOpenExternalLinks(true);
QFile file(":/cpu_data_analysis.md");
if (file.open(QIODevice::ReadOnly | QIODevice::Text))
browser->setMarkdown(QString::fromUtf8(file.readAll()));
auto *layout = new QVBoxLayout(this);
layout->addWidget(browser);
}
-15
View File
@@ -1,15 +0,0 @@
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <QDialog>
// Modeless window showing the data-analysis algorithm documentation, rendered from the copy of
// docs/CPU_DATA_ANALYSIS.md baked into the binary (:/cpu_data_analysis.md), so it is available
// wherever the viewer runs and always matches the build.
class JFJochAlgorithmDocWindow : public QDialog {
Q_OBJECT
public:
explicit JFJochAlgorithmDocWindow(QWidget *parent = nullptr);
};