Skip to content
Snippets Groups Projects
Commit 372fa997 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rename class and sources GUI/View/PlotProgress/FitFlowWidget -> GUI/View/Canvas/ProgressCanvas

parent 0dbc02bf
No related branches found
No related tags found
1 merge request!2142numerous renamings for clearer layering of GUI/View
......@@ -2,8 +2,8 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/PlotProgress/FitFlowWidget.cpp
//! @brief Implement class FitFlowWidget
//! @file GUI/View/Canvas/ProgressCanvas.cpp
//! @brief Implement class ProgressCanvas
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -12,14 +12,14 @@
//
// ************************************************************************************************
#include "GUI/View/PlotProgress/FitFlowWidget.h"
#include "GUI/View/Canvas/ProgressCanvas.h"
#include "Base/Util/Assert.h"
#include "GUI/Model/Job/FitSuiteItem.h"
#include "GUI/Model/Job/JobItem.h"
#include "GUI/View/Plotter/HistogramPlot.h"
#include <QVBoxLayout>
FitFlowWidget::FitFlowWidget(QWidget* parent)
ProgressCanvas::ProgressCanvas(QWidget* parent)
: DataAccessWidget(parent)
, m_histPlot(new HistogramPlot)
{
......@@ -32,16 +32,16 @@ FitFlowWidget::FitFlowWidget(QWidget* parent)
setStyleSheet("background-color:white;");
}
void FitFlowWidget::setJobOrDatafileItem(QObject* job_item)
void ProgressCanvas::setJobOrDatafileItem(QObject* job_item)
{
setBaseItem(job_item);
ASSERT(jobItem());
connect(jobItem()->fitSuiteItem(), &FitSuiteItem::iterationCountChanged, this,
&FitFlowWidget::onIterationCountChanged, Qt::UniqueConnection);
&ProgressCanvas::onIterationCountChanged, Qt::UniqueConnection);
}
void FitFlowWidget::onIterationCountChanged(int iter)
void ProgressCanvas::onIterationCountChanged(int iter)
{
double chi = jobItem()->fitSuiteItem()->chi2();
if (iter == 1)
......
......@@ -2,8 +2,8 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/PlotProgress/FitFlowWidget.h
//! @brief Defines class FitFlowWidget.
//! @file GUI/View/Canvas/ProgressCanvas.h
//! @brief Defines class ProgressCanvas.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -12,8 +12,8 @@
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_VIEW_PLOTPROGRESS_FITFLOWWIDGET_H
#define BORNAGAIN_GUI_VIEW_PLOTPROGRESS_FITFLOWWIDGET_H
#ifndef BORNAGAIN_GUI_VIEW_CANVAS_PROGRESSCANVAS_H
#define BORNAGAIN_GUI_VIEW_CANVAS_PROGRESSCANVAS_H
#include "GUI/View/Access/DataAccessWidget.h"
......@@ -22,10 +22,10 @@ class HistogramPlot;
//! Intended for showing chi2 .vs interation count dependency.
//! The main goal is to fill vacant place in Fit2DFrame.
class FitFlowWidget : public DataAccessWidget {
class ProgressCanvas : public DataAccessWidget {
Q_OBJECT
public:
explicit FitFlowWidget(QWidget* parent = nullptr);
explicit ProgressCanvas(QWidget* parent = nullptr);
void setJobOrDatafileItem(QObject* job_item) override;
......@@ -35,4 +35,4 @@ private:
HistogramPlot* m_histPlot;
};
#endif // BORNAGAIN_GUI_VIEW_PLOTPROGRESS_FITFLOWWIDGET_H
#endif // BORNAGAIN_GUI_VIEW_CANVAS_PROGRESSCANVAS_H
......@@ -152,7 +152,7 @@ void FitSessionController::onFittingError(const QString& text)
void FitSessionController::updateIterationCount(const FitProgressInfo& info)
{
FitSuiteItem* fitSuiteItem = m_jobItem->fitSuiteItem();
// FIXME FitFlowWidget updates chi2 and n_iteration on P_ITERATION_COUNT change
// FIXME ProgressCanvas updates chi2 and n_iteration on P_ITERATION_COUNT change
// The order of two lines below is important
fitSuiteItem->setChi2(info.chi2());
fitSuiteItem->setIterationCount(info.iterationCount());
......
......@@ -22,7 +22,7 @@
#include "GUI/Model/Job/FitSuiteItem.h"
#include "GUI/Model/Job/JobItem.h"
#include "GUI/Model/Project/ProjectDocument.h"
#include "GUI/View/PlotProgress/FitFlowWidget.h"
#include "GUI/View/Canvas/ProgressCanvas.h"
#include "GUI/View/PlotSpecular/SpecularDataPropertyWidget.h"
#include "GUI/View/PlotSpecular/SpecularPlotCanvas.h"
#include "GUI/View/Plotter/PlotStatusLabel.h"
......@@ -34,7 +34,7 @@ Fit1DFrame::Fit1DFrame(QWidget* parent)
: DataAccessWidget(parent)
, m_data_canvas(new SpecularPlotCanvas(this))
, m_diff_canvas(new SpecularPlotCanvas(this))
, m_fitFlowWidget(new FitFlowWidget(this))
, m_fitFlowWidget(new ProgressCanvas(this))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_propertyWidget(new SpecularDataPropertyWidget(this))
, m_resetViewAction(new QAction(this))
......
......@@ -17,7 +17,7 @@
#include "GUI/View/Access/DataAccessWidget.h"
class FitFlowWidget;
class ProgressCanvas;
class JobRealBase;
class PlotStatusLabel;
class QAction;
......@@ -43,7 +43,7 @@ private:
SpecularPlotCanvas* m_data_canvas;
SpecularPlotCanvas* m_diff_canvas;
FitFlowWidget* m_fitFlowWidget;
ProgressCanvas* m_fitFlowWidget;
PlotStatusLabel* m_statusLabel;
SpecularDataPropertyWidget* m_propertyWidget;
......
......@@ -19,8 +19,8 @@
#include "GUI/Model/Data/Data1DItem.h"
#include "GUI/Model/Data/Data2DItem.h"
#include "GUI/Model/Project/ProjectDocument.h"
#include "GUI/View/Canvas/ProgressCanvas.h"
#include "GUI/View/Plot2D/ColorMapCanvas.h"
#include "GUI/View/PlotProgress/FitFlowWidget.h"
#include "GUI/View/Plotter/ColorMap.h"
#include "GUI/View/Plotter/PlotStatusLabel.h"
#include "GUI/View/Plotter/RangeUtil.h"
......@@ -34,7 +34,7 @@ Fit2DFrame::Fit2DFrame(QWidget* parent)
, m_realCanvas(new ColorMapCanvas(this))
, m_simuCanvas(new ColorMapCanvas(this))
, m_diffCanvas(new ColorMapCanvas(this))
, m_fitFlowWidget(new FitFlowWidget(this))
, m_fitFlowWidget(new ProgressCanvas(this))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_propertyWidget(new Scale2DEditor(this))
, m_resetViewAction(new QAction(this))
......
......@@ -18,7 +18,7 @@
#include "GUI/View/Access/DataAccessWidget.h"
class ColorMapCanvas;
class FitFlowWidget;
class ProgressCanvas;
class Scale2DEditor;
class PlotStatusLabel;
class QAction;
......@@ -42,7 +42,7 @@ private:
ColorMapCanvas* m_realCanvas;
ColorMapCanvas* m_simuCanvas;
ColorMapCanvas* m_diffCanvas;
FitFlowWidget* m_fitFlowWidget;
ProgressCanvas* m_fitFlowWidget;
PlotStatusLabel* m_statusLabel;
Scale2DEditor* m_propertyWidget;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment