BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Presents imported data (RealDataItem) using stack of different widgets and combo box in the right top corner of ImportDataView, to switch between widgets. More...
Public Types | |
using | factory_function_t = std::function< SessionItemWidget *()> |
Public Member Functions | |
RealDataPresenter (QWidget *parent=nullptr) | |
QList< QAction * > | actionList () |
SessionItem * | currentItem () |
const SessionItem * | currentItem () const |
void | registerWidget (const QString &presentationType, factory_function_t) |
virtual void | setItem (SessionItem *item) |
virtual void | setPresentation (const QString &presentationType) |
Sets stack to show widget corresponding to given presentation. More... | |
void | setToolBarVisible (bool value) |
Protected Member Functions | |
QStringList | activePresentationList (SessionItem *item) |
Returns list of active presentations for given item. More... | |
virtual void | hideEvent (QHideEvent *) |
virtual QString | itemPresentation () const |
Presentation which should be shown for current item. More... | |
virtual QStringList | presentationList (SessionItem *item) |
Returns full list of presentations available for given item. More... | |
QString | selectedPresentation () const |
Presentation selected in combo selector. More... | |
virtual void | showEvent (QShowEvent *) |
void | subscribeToItem () |
virtual void | unsubscribeFromItem () |
Private Slots | |
void | onComboChanged (const QString &name) |
Private Member Functions | |
void | setSizeToCurrentWidget () |
Resizes QStackedWidget to currently active page. More... | |
Private Attributes | |
SessionItemController * | m_itemController |
QMap< QString, SessionItemWidget * > | m_presentationTypeToWidget |
QStackedWidget * | m_stackedWidget |
ItemComboToolBar * | m_toolBar |
IFactory< QString, SessionItemWidget > | m_widgetFactory |
Presents imported data (RealDataItem) using stack of different widgets and combo box in the right top corner of ImportDataView, to switch between widgets.
Definition at line 26 of file RealDataPresenter.h.
|
inherited |
Definition at line 39 of file ItemComboWidget.h.
|
explicit |
Definition at line 25 of file RealDataPresenter.cpp.
References ItemComboWidget::registerWidget().
|
virtual |
Reimplemented from SessionItemWidget.
Definition at line 34 of file RealDataPresenter.cpp.
|
protectedvirtual |
Returns list of active presentations for given item.
Active presentation is the one which is present in QComboBox selector and can be selected. For example, if JobItem is fittable, the list will contain "FitComparisonWidgetName".
Reimplemented from ItemComboWidget.
Definition at line 39 of file RealDataPresenter.cpp.
References ASSERT.
|
inherited |
Definition at line 41 of file SessionItemWidget.cpp.
Referenced by RectangularDetectorEditor::detectorItem(), SphericalDetectorEditor::detectorItem(), FitFlowWidget::fitSuiteItem(), DistributionEditor::groupItem(), DepthProbeInstrumentEditor::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().
|
inherited |
Definition at line 46 of file SessionItemWidget.cpp.
References SessionItemController::currentItem(), and SessionItemWidget::m_itemController.
|
protectedvirtualinherited |
Definition at line 56 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::unsubscribe().
|
protectedvirtualinherited |
Presentation which should be shown for current item.
Reimplemented in JobResultsPresenter, InstrumentPresenter, and DetectorPresenter.
Definition at line 100 of file ItemComboWidget.cpp.
References ItemComboWidget::selectedPresentation().
Referenced by ItemComboWidget::subscribeToItem().
|
privateslotinherited |
Definition at line 119 of file ItemComboWidget.cpp.
References ItemComboWidget::selectedPresentation(), and ItemComboWidget::setPresentation().
Referenced by ItemComboWidget::ItemComboWidget().
|
protectedvirtualinherited |
Returns full list of presentations available for given item.
Reimplemented in JobResultsPresenter.
Definition at line 93 of file ItemComboWidget.cpp.
References ItemComboWidget::activePresentationList().
Referenced by ItemComboWidget::subscribeToItem().
|
inherited |
Definition at line 43 of file ItemComboWidget.cpp.
References ItemComboWidget::m_widgetFactory, and IFactory< Key, AbstractProduct >::registerItem().
Referenced by DetectorPresenter::DetectorPresenter(), InstrumentPresenter::InstrumentPresenter(), JobResultsPresenter::JobResultsPresenter(), and RealDataPresenter().
|
protectedinherited |
Presentation selected in combo selector.
Definition at line 107 of file ItemComboWidget.cpp.
References ItemComboToolBar::currentPresentation(), and ItemComboWidget::m_toolBar.
Referenced by ItemComboWidget::itemPresentation(), JobResultsPresenter::itemPresentation(), and ItemComboWidget::onComboChanged().
|
virtualinherited |
Reimplemented in SpecularPlotCanvas, SpecularDataImportWidget, SpecularDataWidget, IntensityDataWidget, SpecularDataCanvas, ProjectionsWidget, IntensityDataCanvas, ColorMapCanvas, and Plot1DCanvas.
Definition at line 28 of file SessionItemWidget.cpp.
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().
|
virtualinherited |
Sets stack to show widget corresponding to given presentation.
Reimplemented in JobResultsPresenter.
Definition at line 50 of file ItemComboWidget.cpp.
References SessionItemWidget::actionList(), ItemComboWidget::activePresentationList(), ASSERT, IFactory< Key, AbstractProduct >::createItemPtr(), SessionItemWidget::currentItem(), ItemComboWidget::m_presentationTypeToWidget, ItemComboWidget::m_stackedWidget, ItemComboWidget::m_toolBar, ItemComboWidget::m_widgetFactory, ItemComboToolBar::setActionList(), SessionItemWidget::setItem(), ItemComboToolBar::setPresentation(), and ItemComboWidget::setSizeToCurrentWidget().
Referenced by ItemComboWidget::onComboChanged(), JobResultsPresenter::setPresentation(), and ItemComboWidget::subscribeToItem().
|
privateinherited |
Resizes QStackedWidget to currently active page.
Definition at line 126 of file ItemComboWidget.cpp.
References ItemComboWidget::m_stackedWidget.
Referenced by ItemComboWidget::setPresentation().
|
inherited |
Definition at line 76 of file ItemComboWidget.cpp.
References ItemComboWidget::m_toolBar.
Referenced by DetectorPresenter::DetectorPresenter(), and InstrumentPresenter::InstrumentPresenter().
|
protectedvirtualinherited |
Definition at line 51 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::subscribe().
|
protectedvirtualinherited |
Reimplemented from SessionItemWidget.
Definition at line 112 of file ItemComboWidget.cpp.
References ItemComboWidget::activePresentationList(), SessionItemWidget::currentItem(), ItemComboWidget::itemPresentation(), ItemComboWidget::m_toolBar, ItemComboWidget::presentationList(), ItemComboWidget::setPresentation(), and ItemComboToolBar::setPresentationList().
|
inlineprotectedvirtualinherited |
Reimplemented in SpecularPlot, Plot1D, ColorMap, FitComparisonWidget1D, FitComparisonWidget, ProjectionsPropertyPanel, JobPropertiesWidget, ProjectionsPlot, IntensityDataPropertyWidget, IntensityDataProjectionsWidget, SphericalDetectorEditor, SpecularBeamEditor, RectangularDetectorEditor, PolarizationAnalysisEditor, OffSpecularBeamEditor, GISASDetectorEditor, GISASBeamEditor, EnvironmentEditor, DepthProbeInstrumentEditor, RealDataMaskWidget, RunFitControlWidget, and FitFlowWidget.
Definition at line 44 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
|
privateinherited |
Definition at line 49 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget(), SessionItemWidget::currentItem(), SessionItemWidget::hideEvent(), SessionItemWidget::setItem(), and SessionItemWidget::showEvent().
|
privateinherited |
Definition at line 68 of file ItemComboWidget.h.
Referenced by ItemComboWidget::setPresentation().
|
privateinherited |
Definition at line 65 of file ItemComboWidget.h.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::setPresentation(), and ItemComboWidget::setSizeToCurrentWidget().
|
privateinherited |
Definition at line 64 of file ItemComboWidget.h.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::selectedPresentation(), ItemComboWidget::setPresentation(), ItemComboWidget::setToolBarVisible(), and ItemComboWidget::subscribeToItem().
|
privateinherited |
Definition at line 67 of file ItemComboWidget.h.
Referenced by ItemComboWidget::registerWidget(), and ItemComboWidget::setPresentation().