BornAgain
1.19.79
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.
Definition at line 26 of file RealDataPresenter.h.
Public Types | |
using | factory_function_t = std::function< SessionItemWidget *()> |
Public Member Functions | |
RealDataPresenter (QWidget *parent=nullptr) | |
QList< QAction * > | actionList () override |
SessionItem * | currentItem () |
const SessionItem * | currentItem () const |
void | registerWidget (const QString &presentationType, factory_function_t) |
void | setItem (SessionItem *item) override |
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) override |
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". More... | |
void | hideEvent (QHideEvent *) override |
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... | |
void | showEvent (QShowEvent *) override |
void | subscribeToItem () override |
virtual void | unsubscribeFromItem () |
Private Slots | |
void | onComboChanged (const QString &name) |
Private Member Functions | |
void | setSizeToCurrentWidget () |
Resizes QStackedWidget to currently active page. More... | |
Private Attributes | |
QWidget * | m_blankWidget |
SessionItemController * | m_itemController |
QMap< QString, SessionItemWidget * > | m_presentationTypeToWidget |
QStackedWidget * | m_stackedWidget |
ItemComboToolbar * | m_toolbar |
IFactory< QString, SessionItemWidget > | m_widgetFactory |
|
inherited |
Definition at line 42 of file ItemComboWidget.h.
|
explicit |
Definition at line 25 of file RealDataPresenter.cpp.
References ItemComboWidget::registerWidget().
|
overridevirtual |
Reimplemented from SessionItemWidget.
Definition at line 35 of file RealDataPresenter.cpp.
|
overrideprotectedvirtual |
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 40 of file RealDataPresenter.cpp.
References Error.
|
inherited |
Definition at line 41 of file SessionItemWidget.cpp.
Referenced by FitFlowWidget::fitSuiteItem(), RealDataMaskWidget::intensityDataItem(), IntensityDataCanvas::intensityDataItem(), IntensityDataWidget::intensityDataItem(), IntensityDataProjectionsWidget::intensityDataItem(), ProjectionsPlot::intensityItem(), ColorMap::intensityItem(), JobResultsPresenter::itemPresentation(), FitParameterWidget::jobItem(), ParameterTuningWidget::jobItem(), RunFitControlWidget::jobItem(), FitComparisonWidget::jobItem(), FitComparisonWidget1D::jobItem(), IntensityDataPropertyWidget::jobItem(), SpecularDataPropertyWidget::jobItem(), SpecularDataImportWidget::realDataItem(), ItemComboWidget::setPresentation(), JobResultsPresenter::setPresentation(), SpecularDataImportWidget::specularDataItem(), SpecularDataCanvas::specularDataItem(), SpecularDataWidget::specularDataItem(), SpecularPlot::specularItem(), ItemComboWidget::subscribeToItem(), ProjectionsPlot::unsubscribeFromChildren(), and Plot1D::viewItem().
|
inherited |
Definition at line 46 of file SessionItemWidget.cpp.
References SessionItemController::currentItem(), and SessionItemWidget::m_itemController.
|
overrideprotectedinherited |
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.
Definition at line 115 of file ItemComboWidget.cpp.
References ItemComboWidget::selectedPresentation().
Referenced by ItemComboWidget::setItem(), and ItemComboWidget::subscribeToItem().
|
privateslotinherited |
Definition at line 134 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 108 of file ItemComboWidget.cpp.
References ItemComboWidget::activePresentationList().
Referenced by ItemComboWidget::subscribeToItem().
|
inherited |
Definition at line 44 of file ItemComboWidget.cpp.
References ItemComboWidget::m_widgetFactory.
Referenced by JobResultsPresenter::JobResultsPresenter(), and RealDataPresenter().
|
protectedinherited |
Presentation selected in combo selector.
Definition at line 122 of file ItemComboWidget.cpp.
References ItemComboToolbar::currentPresentation(), and ItemComboWidget::m_toolbar.
Referenced by ItemComboWidget::itemPresentation(), JobResultsPresenter::itemPresentation(), and ItemComboWidget::onComboChanged().
|
overridevirtualinherited |
Reimplemented from SessionItemWidget.
Reimplemented in JobResultsPresenter.
Definition at line 88 of file ItemComboWidget.cpp.
References ItemComboWidget::itemPresentation(), ItemComboWidget::m_blankWidget, ItemComboWidget::m_stackedWidget, SessionItemWidget::setItem(), and ItemComboWidget::setToolbarVisible().
Referenced by JobResultsPresenter::setItem().
|
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(), SessionItemWidget::currentItem(), ItemComboWidget::m_blankWidget, ItemComboWidget::m_presentationTypeToWidget, ItemComboWidget::m_stackedWidget, ItemComboWidget::m_toolbar, ItemComboWidget::m_widgetFactory, ItemComboToolbar::setActionList(), SessionItemWidget::setItem(), ItemComboToolbar::setPresentation(), ItemComboWidget::setSizeToCurrentWidget(), and ItemComboWidget::setToolbarVisible().
Referenced by ItemComboWidget::onComboChanged(), JobResultsPresenter::setPresentation(), and ItemComboWidget::subscribeToItem().
|
privateinherited |
Resizes QStackedWidget to currently active page.
Definition at line 141 of file ItemComboWidget.cpp.
References ItemComboWidget::m_stackedWidget.
Referenced by ItemComboWidget::setPresentation().
|
inherited |
Definition at line 83 of file ItemComboWidget.cpp.
References ItemComboWidget::m_toolbar.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::setItem(), and ItemComboWidget::setPresentation().
|
overrideprotectedinherited |
Definition at line 51 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::subscribe().
|
overrideprotectedvirtualinherited |
Reimplemented from SessionItemWidget.
Definition at line 127 of file ItemComboWidget.cpp.
References ItemComboWidget::activePresentationList(), SessionItemWidget::currentItem(), ItemComboWidget::itemPresentation(), ItemComboWidget::m_toolbar, ItemComboWidget::presentationList(), ItemComboWidget::setPresentation(), and ItemComboToolbar::setPresentationList().
|
inlineprotectedvirtualinherited |
Reimplemented in ProjectionsPlot, IntensityDataProjectionsWidget, ColorMap, SpecularPlot, Plot1D, FitFlowWidget, FitComparisonWidget1D, FitComparisonWidget, RealDataMaskWidget, and RunFitControlWidget.
Definition at line 44 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
|
privateinherited |
Definition at line 70 of file ItemComboWidget.h.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::setItem(), and ItemComboWidget::setPresentation().
|
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 69 of file ItemComboWidget.h.
Referenced by ItemComboWidget::setPresentation().
|
privateinherited |
Definition at line 67 of file ItemComboWidget.h.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::setItem(), ItemComboWidget::setPresentation(), and ItemComboWidget::setSizeToCurrentWidget().
|
privateinherited |
Definition at line 66 of file ItemComboWidget.h.
Referenced by ItemComboWidget::ItemComboWidget(), ItemComboWidget::selectedPresentation(), ItemComboWidget::setPresentation(), ItemComboWidget::setToolbarVisible(), and ItemComboWidget::subscribeToItem().
|
privateinherited |
Definition at line 68 of file ItemComboWidget.h.
Referenced by ItemComboWidget::registerWidget(), and ItemComboWidget::setPresentation().