// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include #include "widgets/JFJochViewerROIList.h" #include "../reader/JFJochReader.h" #include "charts/JFJochSimpleChartView.h" #include "widgets/ResolutionRingWidget.h" class CollapsibleSection; class JFJochViewerSidePanel : public QWidget { Q_OBJECT JFJochViewerROIList *roi_list = nullptr; ResolutionRingWidget *res_rings = nullptr; CollapsibleSection *roiSection = nullptr; // auto-expands when ROIs change // Legend swatches for the two user-adjustable colours, kept so the legend tracks colour picks. QLabel *legend_spot_swatch_ = nullptr; // non-indexed spots QLabel *legend_indexed_swatch_ = nullptr; // indexed spots (feature colour) signals: void showSpots(bool input); void setFeatureColor(QColor input); void setSpotColor(QColor input); void showHighestPixels(int32_t v); void showSaturatedPixels(bool input); void showPredictions(bool input); void highlightIceRings(bool input); void showROILabels(bool input); void showROIFill(bool input); void roisChanged(ROIDefinition rois); void selectedROIChanged(QString name); void downloadROIs(); void uploadROIs(); void maskFromROI(QString name, bool add); void findBeamCenter(const UnitCell &input, bool guess); void analyze(); void imageLoaded(std::shared_ptr image); void writeStatusBar(QString string, int timeout_ms = 0); void ringModeSet(JFJochDiffractionImage::RingMode mode); void resRingsSet(QVector v); public: JFJochViewerSidePanel(QWidget *parent); public slots: void loadImage(std::shared_ptr image); void SetRings(QVector v); void selectROIInList(QString name); private slots: void spotsToggled(bool input); void predictionsToggled(bool input); void highlightIceRingsToggled(bool input); void saturatedPixelsToggled(bool input); };