From ad7aa730a4b7bf4a03294b000c21d8a0e96a3a22 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 13 Nov 2025 20:21:31 +0100 Subject: [PATCH] jfjoch_viewer: Rename JFJochAzIntImage --- viewer/CMakeLists.txt | 6 ++---- viewer/JFJochViewerSidePanelChart.cpp | 4 ++-- viewer/JFJochViewerSidePanelChart.h | 4 ++-- .../{JFJochAzIntImageView.cpp => JFJochAzIntImage.cpp} | 10 +++++----- .../{JFJochAzIntImageView.h => JFJochAzIntImage.h} | 4 ++-- 5 files changed, 13 insertions(+), 15 deletions(-) rename viewer/widgets/{JFJochAzIntImageView.cpp => JFJochAzIntImage.cpp} (90%) rename viewer/widgets/{JFJochAzIntImageView.h => JFJochAzIntImage.h} (89%) diff --git a/viewer/CMakeLists.txt b/viewer/CMakeLists.txt index a6c7ec87..e4fd92fd 100644 --- a/viewer/CMakeLists.txt +++ b/viewer/CMakeLists.txt @@ -24,8 +24,6 @@ ADD_EXECUTABLE(jfjoch_viewer jfjoch_viewer.cpp JFJochViewerWindow.cpp JFJochView widgets/TitleLabel.h widgets/JFJochChartView.cpp widgets/JFJochChartView.h - widgets/JFJochAzIntImageView.cpp - widgets/JFJochAzIntImageView.h JFJochViewerImageStatistics.cpp JFJochViewerImageStatistics.h widgets/JFJochSimpleChartView.cpp @@ -50,8 +48,8 @@ ADD_EXECUTABLE(jfjoch_viewer jfjoch_viewer.cpp JFJochViewerWindow.cpp JFJochView JFJochViewerSidePanelChart.h windows/JFJochViewerSpotListWindow.cpp windows/JFJochViewerSpotListWindow.h - widgets/JFJochAzIntImageView.cpp - widgets/JFJochAzIntImageView.h + widgets/JFJochAzIntImage.cpp + widgets/JFJochAzIntImage.h windows/JFJochViewerReflectionListWindow.cpp windows/JFJochViewerReflectionListWindow.h widgets/JFJochOneOverResSqChartView.cpp diff --git a/viewer/JFJochViewerSidePanelChart.cpp b/viewer/JFJochViewerSidePanelChart.cpp index 4383ead4..5001eb2e 100644 --- a/viewer/JFJochViewerSidePanelChart.cpp +++ b/viewer/JFJochViewerSidePanelChart.cpp @@ -22,7 +22,7 @@ JFJochViewerSidePanelChart::JFJochViewerSidePanelChart(QWidget *parent) : QWidge this, &JFJochViewerSidePanelChart::comboBoxSelected); azint_plot = new JFJochSimpleChartView(this); - azint_image = new JFJochAzIntImageView(this); + azint_image = new JFJochAzIntImage(this); one_over_d_sq_plot = new JFJochOneOverResSqChartView(this); stack = new QStackedWidget(this); @@ -34,7 +34,7 @@ JFJochViewerSidePanelChart::JFJochViewerSidePanelChart(QWidget *parent) : QWidge setLayout(layout); - connect(azint_image, &JFJochAzIntImageView::writeStatusBar, + connect(azint_image, &JFJochAzIntImage::writeStatusBar, [&](QString string, int timeout_ms) { emit writeStatusBar(string, timeout_ms); }); diff --git a/viewer/JFJochViewerSidePanelChart.h b/viewer/JFJochViewerSidePanelChart.h index 026f28cb..da2e485f 100644 --- a/viewer/JFJochViewerSidePanelChart.h +++ b/viewer/JFJochViewerSidePanelChart.h @@ -11,14 +11,14 @@ #include "../reader/JFJochReaderImage.h" #include "widgets/JFJochSimpleChartView.h" #include "widgets/JFJochOneOverResSqChartView.h" -#include "widgets/JFJochAzIntImageView.h" +#include "widgets/JFJochAzIntImage.h" class JFJochViewerSidePanelChart : public QWidget { Q_OBJECT QStackedWidget *stack = nullptr; JFJochSimpleChartView *azint_plot = nullptr; - JFJochAzIntImageView *azint_image = nullptr; + JFJochAzIntImage *azint_image = nullptr; JFJochOneOverResSqChartView *one_over_d_sq_plot = nullptr; std::shared_ptr image; diff --git a/viewer/widgets/JFJochAzIntImageView.cpp b/viewer/widgets/JFJochAzIntImage.cpp similarity index 90% rename from viewer/widgets/JFJochAzIntImageView.cpp rename to viewer/widgets/JFJochAzIntImage.cpp index e5e06cf9..e9812d93 100644 --- a/viewer/widgets/JFJochAzIntImageView.cpp +++ b/viewer/widgets/JFJochAzIntImage.cpp @@ -1,16 +1,16 @@ // SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only -#include "JFJochAzIntImageView.h" +#include "JFJochAzIntImage.h" #include #include "../../common/JFJochException.h" -JFJochAzIntImageView::JFJochAzIntImageView(QWidget *parent) +JFJochAzIntImage::JFJochAzIntImage(QWidget *parent) : JFJochImage(parent) { } -void JFJochAzIntImageView::Clear() { +void JFJochAzIntImage::Clear() { W = 0; H = 0; image_fp.clear(); @@ -20,7 +20,7 @@ void JFJochAzIntImageView::Clear() { // data: size = azimuthal_bins * q_bins // Layout: q varies fastest (i % q_bins == q index) -void JFJochAzIntImageView::SetData(const std::vector &data, +void JFJochAzIntImage::SetData(const std::vector &data, const std::vector &in_phi, const std::vector &in_q, int azimuthal_bins) { @@ -75,7 +75,7 @@ void JFJochAzIntImageView::SetData(const std::vector &data, Redraw(); } -void JFJochAzIntImageView::mouseHover(QMouseEvent* event) { +void JFJochAzIntImage::mouseHover(QMouseEvent* event) { if (!scene() || W == 0 || H == 0) return; QPointF scenePos = mapToScene(event->pos()); diff --git a/viewer/widgets/JFJochAzIntImageView.h b/viewer/widgets/JFJochAzIntImage.h similarity index 89% rename from viewer/widgets/JFJochAzIntImageView.h rename to viewer/widgets/JFJochAzIntImage.h index 0ff5d9e5..3fbc52bf 100644 --- a/viewer/widgets/JFJochAzIntImageView.h +++ b/viewer/widgets/JFJochAzIntImage.h @@ -14,7 +14,7 @@ #include "JFJochImage.h" #include "../../common/ColorScale.h" -class JFJochAzIntImageView : public JFJochImage { +class JFJochAzIntImage : public JFJochImage { Q_OBJECT bool auto_range = true; @@ -27,7 +27,7 @@ class JFJochAzIntImageView : public JFJochImage { void mouseHover(QMouseEvent* event) override; public: - explicit JFJochAzIntImageView(QWidget *parent = nullptr); + explicit JFJochAzIntImage(QWidget *parent = nullptr); void Clear(); void SetData(const std::vector &data,