BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FitSessionWidget Class Reference

Description

Contains all fit settings for given JobItem (fit parameters, minimizer settings). Controlled by FitActivityPanel.

Definition at line 30 of file FitSessionWidget.h.

Inheritance diagram for FitSessionWidget:
[legend]
Collaboration diagram for FitSessionWidget:
[legend]

Public Member Functions

 FitSessionWidget (QWidget *parent=nullptr)
 
void setItem (JobItem *jobItem)
 
void setModelTuningWidget (ParameterTuningWidget *tuningWidget)
 
void setSessionController (FitSessionController *sessionController)
 

Private Member Functions

void onFittingError (const QString &text)
 

Private Attributes

RunFitControlWidgetm_controlWidget
 
FitParameterWidgetm_fitParametersWidget
 
MinimizerSettingsWidgetm_minimizerSettingsWidget
 
FitSessionControllerm_sessionController
 

Constructor & Destructor Documentation

◆ FitSessionWidget()

FitSessionWidget::FitSessionWidget ( QWidget *  parent = nullptr)

Definition at line 25 of file FitSessionWidget.cpp.

26  : QWidget(parent)
27 
31  , m_sessionController(nullptr)
32 {
33  auto* layout = new QVBoxLayout(this);
34  layout->setContentsMargins(0, 0, 0, 0);
35  layout->setMargin(0);
36  layout->setSpacing(0);
37  auto* tabWidget = new QTabWidget(this);
38  tabWidget->addTab(m_fitParametersWidget, "Fit Parameters");
39  tabWidget->addTab(m_minimizerSettingsWidget, "Minimizer");
40 
41  layout->addWidget(tabWidget);
42  layout->addWidget(m_controlWidget);
43 }
The FitParametersWidget class contains a tree view to set fit parameters (fix/release,...
FitSessionController * m_sessionController
MinimizerSettingsWidget * m_minimizerSettingsWidget
RunFitControlWidget * m_controlWidget
FitParameterWidget * m_fitParametersWidget
The MinimizerSettingsWidget contains editor for all minimizer settings and related fit options....
The RunFitControlWidget contains elements to start/stop fitting and to provide minimal diagnostic....

References m_controlWidget, m_fitParametersWidget, and m_minimizerSettingsWidget.

Member Function Documentation

◆ onFittingError()

void FitSessionWidget::onFittingError ( const QString &  text)
private

Definition at line 81 of file FitSessionWidget.cpp.

82 {
84 }
void onFittingError(const QString &what)

References m_controlWidget, and RunFitControlWidget::onFittingError().

Referenced by setSessionController().

Here is the call graph for this function:

◆ setItem()

void FitSessionWidget::setItem ( JobItem jobItem)

Definition at line 45 of file FitSessionWidget.cpp.

46 {
47  ASSERT(jobItem);
50  m_controlWidget->setItem(jobItem);
51 }
void setItem(JobItem *jobItem)
virtual void setItem(SessionItem *item)

References m_controlWidget, m_fitParametersWidget, m_minimizerSettingsWidget, MinimizerSettingsWidget::setItem(), and SessionItemWidget::setItem().

Referenced by FitActivityPanel::setItem().

Here is the call graph for this function:

◆ setModelTuningWidget()

void FitSessionWidget::setModelTuningWidget ( ParameterTuningWidget tuningWidget)

Definition at line 53 of file FitSessionWidget.cpp.

54 {
55  ASSERT(m_fitParametersWidget);
56  ASSERT(tuningWidget);
58 }
void setParameterTuningWidget(ParameterTuningWidget *tuningWidget)
Sets ParameterTuningWidget to be able to provide it with context menu and steer its behaviour in the ...

References m_fitParametersWidget, and FitParameterWidget::setParameterTuningWidget().

Referenced by FitActivityPanel::setItem().

Here is the call graph for this function:

◆ setSessionController()

void FitSessionWidget::setSessionController ( FitSessionController sessionController)

Definition at line 60 of file FitSessionWidget.cpp.

61 {
62  if (m_sessionController) {
63  disconnect(m_sessionController, nullptr, this, nullptr);
64  disconnect(m_controlWidget, nullptr, m_sessionController, nullptr);
65  }
66 
67  m_sessionController = sessionController;
68 
69  if (m_sessionController) {
72  connect(m_sessionController, &QObject::destroyed,
73  [this] { m_sessionController = nullptr; });
78  }
79 }
void fittingError(const QString &message)
void onFittingError(const QString &text)

References FitSessionController::fittingError(), m_controlWidget, m_sessionController, onFittingError(), FitSessionController::onStartFittingRequest(), FitSessionController::onStopFittingRequest(), RunFitControlWidget::startFittingPushed(), and RunFitControlWidget::stopFittingPushed().

Referenced by FitActivityPanel::setItem().

Here is the call graph for this function:

Member Data Documentation

◆ m_controlWidget

RunFitControlWidget* FitSessionWidget::m_controlWidget
private

Definition at line 44 of file FitSessionWidget.h.

Referenced by FitSessionWidget(), onFittingError(), setItem(), and setSessionController().

◆ m_fitParametersWidget

FitParameterWidget* FitSessionWidget::m_fitParametersWidget
private

Definition at line 45 of file FitSessionWidget.h.

Referenced by FitSessionWidget(), setItem(), and setModelTuningWidget().

◆ m_minimizerSettingsWidget

MinimizerSettingsWidget* FitSessionWidget::m_minimizerSettingsWidget
private

Definition at line 46 of file FitSessionWidget.h.

Referenced by FitSessionWidget(), and setItem().

◆ m_sessionController

FitSessionController* FitSessionWidget::m_sessionController
private

Definition at line 47 of file FitSessionWidget.h.

Referenced by setSessionController().


The documentation for this class was generated from the following files: