Skip to content
Snippets Groups Projects
Commit 2cdad9a3 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov Committed by Mikhail Svechnikov
Browse files

FitComparisonWidget1D: status label fix

parent f5af7791
Branches
Tags
1 merge request!975GUI: migration from SessionItemWidget, part 1
......@@ -30,7 +30,7 @@ ColorMapCanvas::ColorMapCanvas(QWidget* parent)
layout->setSpacing(0);
layout->addWidget(m_colorMap);
// layout->addWidget(m_statusLabel);
layout->addWidget(m_statusLabel);
setLayout(layout);
......
......@@ -30,10 +30,10 @@
FitComparisonWidget::FitComparisonWidget(QWidget* parent)
: SessionItemWidget(parent)
, m_realDataPlot(new ColorMapCanvas)
, m_simulatedDataPlot(new ColorMapCanvas)
, m_relativeDiffPlot(new ColorMapCanvas)
, m_fitFlowWidget(new FitFlowWidget)
, m_realDataPlot(new ColorMapCanvas(this))
, m_simulatedDataPlot(new ColorMapCanvas(this))
, m_relativeDiffPlot(new ColorMapCanvas(this))
, m_fitFlowWidget(new FitFlowWidget(this))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_propertyWidget(new IntensityDataPropertyWidget(this))
, m_resetViewAction(new QAction(this))
......@@ -57,6 +57,11 @@ FitComparisonWidget::FitComparisonWidget(QWidget* parent)
vlayout->addLayout(gridLayout);
vlayout->addWidget(m_statusLabel);
m_statusLabel->reset();
m_statusLabel->addPlot(m_realDataPlot->colorMap());
m_statusLabel->addPlot(m_simulatedDataPlot->colorMap());
m_statusLabel->addPlot(m_relativeDiffPlot->colorMap());
auto* hlayout = new QHBoxLayout;
hlayout->setContentsMargins(0, 0, 0, 0);
hlayout->setSpacing(0);
......@@ -93,11 +98,6 @@ void FitComparisonWidget::subscribeToItem()
m_relativeDiffPlot->setIntensityItem(diffItem());
m_fitFlowWidget->setItem(jobItem()->fitSuiteItem());
m_statusLabel->reset();
m_statusLabel->addPlot(m_realDataPlot->colorMap());
m_statusLabel->addPlot(m_simulatedDataPlot->colorMap());
m_statusLabel->addPlot(m_relativeDiffPlot->colorMap());
m_propertyWidget->setIntensityItems({simulatedDataItem(),
realDataItem(),
diffItem()});
......
......@@ -30,6 +30,7 @@ FitComparisonWidget1D::FitComparisonWidget1D(QWidget* parent)
, m_data_canvas(new SpecularPlotCanvas(this))
, m_diff_canvas(new SpecularPlotCanvas(this))
, m_fitFlowWidget(new FitFlowWidget(this))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_propertyWidget(new SpecularDataPropertyWidget(this))
, m_resetViewAction(new QAction(this))
{
......@@ -48,6 +49,11 @@ FitComparisonWidget1D::FitComparisonWidget1D(QWidget* parent)
gridLayout->addWidget(m_fitFlowWidget, 1, 2, 1, 1);
vlayout->addLayout(gridLayout);
vlayout->addWidget(m_statusLabel);
m_statusLabel->reset();
m_statusLabel->addPlot(m_data_canvas->specularPlot());
m_statusLabel->addPlot(m_diff_canvas->specularPlot());
auto* hlayout = new QHBoxLayout;
hlayout->setContentsMargins(0, 0, 0, 0);
......
......@@ -17,9 +17,11 @@
#include "GUI/View/Common/DataAccessWidget.h"
class SpecularDataItem;
class FitFlowWidget;
class SpecularDataPropertyWidget;
class SpecularPlotCanvas;
class PlotStatusLabel;
class QAction;
class JobRealBase;
......@@ -46,6 +48,7 @@ private:
SpecularPlotCanvas* m_data_canvas;
SpecularPlotCanvas* m_diff_canvas;
FitFlowWidget* m_fitFlowWidget;
PlotStatusLabel* m_statusLabel;
SpecularDataPropertyWidget* m_propertyWidget;
QAction* m_resetViewAction;
......
......@@ -35,6 +35,8 @@ SpecularDataCanvas::SpecularDataCanvas(QWidget* parent)
setLayout(vlayout);
setStyleSheet("background-color:white;");
m_plot_canvas->setStatusLabelEnabled(true);
initActions();
enableDeprecatedOnMousePress(true); // true for legacy reasons
......
......@@ -35,7 +35,7 @@ SpecularPlotCanvas::SpecularPlotCanvas(QWidget* parent)
setLayout(layout);
setStatusLabelEnabled(true);
setStatusLabelEnabled(false);
}
void SpecularPlotCanvas::setDataItems(const QList<DataItem*>& dataItems)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment