BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DepthProbeInstrumentEditor Class Reference
Inheritance diagram for DepthProbeInstrumentEditor:
[legend]
Collaboration diagram for DepthProbeInstrumentEditor:
[legend]

Public Member Functions

 DepthProbeInstrumentEditor (QWidget *parent=nullptr)
 
virtual QList< QAction * > actionList ()
 
SessionItemcurrentItem ()
 
const SessionItemcurrentItem () const
 
virtual void setItem (SessionItem *item)
 

Protected Member Functions

virtual void hideEvent (QHideEvent *)
 
virtual void showEvent (QShowEvent *)
 
void subscribeToItem ()
 
void unsubscribeFromItem ()
 

Private Member Functions

DepthProbeInstrumentIteminstrumentItem ()
 
void onDialogRequest (SessionItem *item, const QString &name)
 

Private Attributes

ComponentEditorm_depthAxisEditor
 
QGridLayout * m_gridLayout
 
ComponentEditorm_inclinationEditor
 
SessionItemControllerm_itemController
 
ComponentEditorm_wavelengthEditor
 

Detailed Description

Definition at line 24 of file DepthProbeInstrumentEditor.h.

Constructor & Destructor Documentation

◆ DepthProbeInstrumentEditor()

DepthProbeInstrumentEditor::DepthProbeInstrumentEditor ( QWidget *  parent = nullptr)

Definition at line 31 of file DepthProbeInstrumentEditor.cpp.

32  : SessionItemWidget(parent)
36  , m_gridLayout(new QGridLayout)
37 {
38  m_gridLayout->addWidget(m_wavelengthEditor, 1, 0);
39  m_gridLayout->addWidget(m_inclinationEditor, 1, 1);
40  m_gridLayout->addWidget(m_depthAxisEditor, 1, 2);
41 
42  auto mainLayout = new QVBoxLayout;
43  mainLayout->addWidget(StyleUtils::createDetailsWidget(m_gridLayout, "Parameters"));
44  mainLayout->addStretch();
45  setLayout(mainLayout);
46 
51 }
Component editor for SessionItem.
void dialogRequest(SessionItem *item, const QString &names)
void onDialogRequest(SessionItem *item, const QString &name)
SessionItemWidget(QWidget *parent=0)
QWidget * createDetailsWidget(QWidget *content, const QString &name, bool expanded=true)
Creates details widget holding user content inside.
Definition: StyleUtils.cpp:96

References StyleUtils::createDetailsWidget(), ComponentEditor::dialogRequest(), m_depthAxisEditor, m_gridLayout, m_inclinationEditor, m_wavelengthEditor, and onDialogRequest().

Here is the call graph for this function:

Member Function Documentation

◆ actionList()

QList< QAction * > SessionItemWidget::actionList ( )
virtualinherited

◆ currentItem() [1/2]

SessionItem * SessionItemWidget::currentItem ( )
inherited

Definition at line 41 of file SessionItemWidget.cpp.

42 {
43  return const_cast<SessionItem*>(static_cast<const SessionItemWidget*>(this)->currentItem());
44 }
The SessionItemWidget class is a base for all widgets representing the content of SessionItem.
SessionItem * currentItem()

Referenced by RectangularDetectorEditor::detectorItem(), SphericalDetectorEditor::detectorItem(), FitFlowWidget::fitSuiteItem(), DistributionEditor::groupItem(), instrumentItem(), EnvironmentEditor::instrumentItem(), GISASBeamEditor::instrumentItem(), GISASDetectorEditor::instrumentItem(), GISASInstrumentEditor::instrumentItem(), OffSpecularBeamEditor::instrumentItem(), OffSpecularInstrumentEditor::instrumentItem(), PolarizationAnalysisEditor::instrumentItem(), SpecularBeamEditor::instrumentItem(), SpecularInstrumentEditor::instrumentItem(), RealDataMaskWidget::intensityDataItem(), IntensityDataCanvas::intensityDataItem(), IntensityDataProjectionsWidget::intensityDataItem(), IntensityDataWidget::intensityDataItem(), ProjectionsPlot::intensityItem(), ColorMap::intensityItem(), DetectorPresenter::itemPresentation(), InstrumentPresenter::itemPresentation(), JobResultsPresenter::itemPresentation(), FitComparisonWidget::jobItem(), FitComparisonWidget1D::jobItem(), FitParameterWidget::jobItem(), RunFitControlWidget::jobItem(), JobPropertiesWidget::jobItem(), ParameterTuningWidget::jobItem(), SpecularDataImportWidget::realDataItem(), ItemComboWidget::setPresentation(), JobResultsPresenter::setPresentation(), SpecularDataCanvas::specularDataItem(), SpecularDataImportWidget::specularDataItem(), SpecularDataWidget::specularDataItem(), SpecularPlot::specularItem(), ItemComboWidget::subscribeToItem(), DistributionEditor::subscribeToItem(), GISASDetectorEditor::subscribeToItem(), PolarizationAnalysisEditor::subscribeToItem(), IntensityDataPropertyWidget::subscribeToItem(), JobPropertiesWidget::subscribeToItem(), ProjectionsPropertyPanel::subscribeToItem(), ProjectionsPlot::unsubscribeFromChildren(), and Plot1D::viewItem().

◆ currentItem() [2/2]

const SessionItem * SessionItemWidget::currentItem ( ) const
inherited

Definition at line 46 of file SessionItemWidget.cpp.

47 {
48  return m_itemController->currentItem();
49 }
SessionItemController * m_itemController

References SessionItemController::currentItem(), and SessionItemWidget::m_itemController.

Here is the call graph for this function:

◆ hideEvent()

void SessionItemWidget::hideEvent ( QHideEvent *  )
protectedvirtualinherited

Definition at line 56 of file SessionItemWidget.cpp.

57 {
59 }
void unsubscribe()
Fully unsubscribes the parent from listening item's signals.

References SessionItemWidget::m_itemController, and SessionItemController::unsubscribe().

Here is the call graph for this function:

◆ instrumentItem()

DepthProbeInstrumentItem * DepthProbeInstrumentEditor::instrumentItem ( )
private

Definition at line 74 of file DepthProbeInstrumentEditor.cpp.

75 {
76  return dynamic_cast<DepthProbeInstrumentItem*>(currentItem());
77 }

References SessionItemWidget::currentItem().

Referenced by subscribeToItem().

Here is the call graph for this function:

◆ onDialogRequest()

void DepthProbeInstrumentEditor::onDialogRequest ( SessionItem item,
const QString &  name 
)
private

Definition at line 79 of file DepthProbeInstrumentEditor.cpp.

80 {
81  if (!item)
82  return;
83 
84  auto dialog = new DistributionDialog(this);
85  dialog->setItem(item);
86  dialog->setNameOfEditor(name);
87  dialog->show();
88 }
The dialog which shows an editor to change parameters of DistributionItem.
QString const & name(EShape k)
Definition: particles.cpp:21

References RealSpace::Particles::name().

Referenced by DepthProbeInstrumentEditor().

Here is the call graph for this function:

◆ setItem()

void SessionItemWidget::setItem ( SessionItem item)
virtualinherited

Reimplemented in SpecularPlotCanvas, SpecularDataImportWidget, SpecularDataWidget, IntensityDataWidget, SpecularDataCanvas, ProjectionsWidget, IntensityDataCanvas, ColorMapCanvas, and Plot1DCanvas.

Definition at line 28 of file SessionItemWidget.cpp.

29 {
31 
32  if (isVisible())
34 }
void setItem(SessionItem *item)
void subscribe()
Subscribe parent to item's signals.

References SessionItemWidget::m_itemController, SessionItemController::setItem(), and SessionItemController::subscribe().

Referenced by IntensityDataWidget::onFFTAction(), JobSelectorWidget::onSelectionChanged(), ProjectionsEditor::resetContext(), ProjectionsEditor::setContext(), MaskGraphicsProxy::setIntensityItem(), FitSessionWidget::setItem(), Plot1DCanvas::setItem(), InstrumentEditorWidget::setItem(), ColorMapCanvas::setItem(), IntensityDataCanvas::setItem(), ProjectionsWidget::setItem(), SpecularDataCanvas::setItem(), DistributionDialog::setItem(), IntensityDataWidget::setItem(), SpecularDataWidget::setItem(), SpecularDataImportWidget::setItem(), SpecularPlotCanvas::setItem(), ItemComboWidget::setPresentation(), GISASInstrumentEditor::subscribeToItem(), OffSpecularInstrumentEditor::subscribeToItem(), SpecularInstrumentEditor::subscribeToItem(), FitComparisonWidget::subscribeToItem(), FitComparisonWidget1D::subscribeToItem(), and GISASDetectorEditor::updateDetectorPresenter().

Here is the call graph for this function:

◆ showEvent()

void SessionItemWidget::showEvent ( QShowEvent *  )
protectedvirtualinherited

Definition at line 51 of file SessionItemWidget.cpp.

52 {
54 }

References SessionItemWidget::m_itemController, and SessionItemController::subscribe().

Here is the call graph for this function:

◆ subscribeToItem()

void DepthProbeInstrumentEditor::subscribeToItem ( )
protectedvirtual

Reimplemented from SessionItemWidget.

Definition at line 53 of file DepthProbeInstrumentEditor.cpp.

54 {
55  const auto beam_item = instrumentItem()->getItem(DepthProbeInstrumentItem::P_BEAM);
56 
57  auto wavelengthItem = beam_item->getItem(SpecularBeamItem::P_WAVELENGTH);
59 
60  auto inclinationItem = beam_item->getItem(SpecularBeamItem::P_INCLINATION_ANGLE);
62  inclinationItem->getItem(SpecularBeamInclinationItem::P_DISTRIBUTION));
64  inclinationItem->getItem(SpecularBeamInclinationItem::P_ALPHA_AXIS));
66 }
static const QString P_DISTRIBUTION
static const QString P_WAVELENGTH
Definition: BeamItems.h:29
static const QString P_INCLINATION_ANGLE
Definition: BeamItems.h:30
void addItem(SessionItem *item)
void setItem(SessionItem *item)
DepthProbeInstrumentItem * instrumentItem()
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.

References ComponentEditor::addItem(), SessionItem::getItem(), instrumentItem(), m_depthAxisEditor, m_inclinationEditor, m_wavelengthEditor, SpecularBeamInclinationItem::P_ALPHA_AXIS, DepthProbeInstrumentItem::P_BEAM, BeamDistributionItem::P_DISTRIBUTION, BeamItem::P_INCLINATION_ANGLE, BeamItem::P_WAVELENGTH, DepthProbeInstrumentItem::P_Z_AXIS, and ComponentEditor::setItem().

Here is the call graph for this function:

◆ unsubscribeFromItem()

void DepthProbeInstrumentEditor::unsubscribeFromItem ( )
protectedvirtual

Reimplemented from SessionItemWidget.

Definition at line 68 of file DepthProbeInstrumentEditor.cpp.

References ComponentEditor::clearEditor(), m_inclinationEditor, and m_wavelengthEditor.

Here is the call graph for this function:

Member Data Documentation

◆ m_depthAxisEditor

ComponentEditor* DepthProbeInstrumentEditor::m_depthAxisEditor
private

Definition at line 40 of file DepthProbeInstrumentEditor.h.

Referenced by DepthProbeInstrumentEditor(), and subscribeToItem().

◆ m_gridLayout

QGridLayout* DepthProbeInstrumentEditor::m_gridLayout
private

Definition at line 41 of file DepthProbeInstrumentEditor.h.

Referenced by DepthProbeInstrumentEditor().

◆ m_inclinationEditor

ComponentEditor* DepthProbeInstrumentEditor::m_inclinationEditor
private

◆ m_itemController

◆ m_wavelengthEditor

ComponentEditor* DepthProbeInstrumentEditor::m_wavelengthEditor
private

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