BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Presents results of job (JobItem) using stack of different widgets and combo box in the right top corner of JobView, to switch between widgets.
Definition at line 27 of file JobResultsPresenter.h.
Public Types | |
using | factory_function_t = std::function< SessionItemWidget *()> |
Public Slots | |
void | setPresentation (JobViewActivity activity) |
Public Member Functions | |
JobResultsPresenter (QWidget *parent=nullptr) | |
virtual QList< QAction * > | actionList () |
SessionItem * | currentItem () |
const SessionItem * | currentItem () const |
void | registerWidget (const QString &presentationType, factory_function_t) |
void | setItem (SessionItem *item) override |
void | setPresentation (const QString &presentationType) override |
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 presentation types, available for given item. JobItem with fitting abilities is valid for IntensityDataWidget and FitComparisonWidget. More... | |
void | hideEvent (QHideEvent *) override |
QString | itemPresentation () const override |
Presentation which should be shown for current item. More... | |
QStringList | presentationList (SessionItem *item) override |
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 | |
QStringList | defaultActivePresentationsOfInstrument (InstrumentItem *instrumentItem) |
QString | defaultPresentationOfInstrument (InstrumentItem *instrumentItem) |
QString | fitPresentationOfInstrument (InstrumentItem *instrumentItem) |
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 JobResultsPresenter.cpp.
References ItemComboWidget::registerWidget().
|
virtualinherited |
Reimplemented in IntensityDataProjectionsWidget, SpecularDataWidget, SpecularDataCanvas, FitComparisonWidget1D, FitComparisonWidget, IntensityDataWidget, IntensityDataCanvas, SpecularDataImportWidget, RealDataPresenter, and RealDataMaskWidget.
Definition at line 36 of file SessionItemWidget.cpp.
Referenced by ItemComboWidget::setPresentation().
|
overrideprotectedvirtual |
Returns list of presentation types, available for given item. JobItem with fitting abilities is valid for IntensityDataWidget and FitComparisonWidget.
Reimplemented from ItemComboWidget.
Definition at line 85 of file JobResultsPresenter.cpp.
References defaultActivePresentationsOfInstrument(), and fitPresentationOfInstrument().
|
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(), itemPresentation(), FitParameterWidget::jobItem(), ParameterTuningWidget::jobItem(), RunFitControlWidget::jobItem(), FitComparisonWidget::jobItem(), FitComparisonWidget1D::jobItem(), IntensityDataPropertyWidget::jobItem(), SpecularDataPropertyWidget::jobItem(), SpecularDataImportWidget::realDataItem(), ItemComboWidget::setPresentation(), 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.
|
private |
Definition at line 126 of file JobResultsPresenter.cpp.
References InstrumentItem::is().
Referenced by activePresentationList(), and presentationList().
|
private |
Definition at line 117 of file JobResultsPresenter.cpp.
References InstrumentItem::is().
Referenced by setPresentation().
|
private |
Definition at line 134 of file JobResultsPresenter.cpp.
References InstrumentItem::is().
Referenced by activePresentationList(), presentationList(), and setPresentation().
|
overrideprotectedinherited |
Definition at line 56 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::unsubscribe().
|
overrideprotectedvirtual |
Presentation which should be shown for current item.
Reimplemented from ItemComboWidget.
Definition at line 41 of file JobResultsPresenter.cpp.
References SessionItemWidget::currentItem(), and ItemComboWidget::selectedPresentation().
|
privateslotinherited |
Definition at line 134 of file ItemComboWidget.cpp.
References ItemComboWidget::selectedPresentation(), and ItemComboWidget::setPresentation().
Referenced by ItemComboWidget::ItemComboWidget().
|
overrideprotectedvirtual |
Returns full list of presentations available for given item.
Reimplemented from ItemComboWidget.
Definition at line 101 of file JobResultsPresenter.cpp.
References defaultActivePresentationsOfInstrument(), and fitPresentationOfInstrument().
|
inherited |
Definition at line 44 of file ItemComboWidget.cpp.
References ItemComboWidget::m_widgetFactory.
Referenced by JobResultsPresenter(), and RealDataPresenter::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(), itemPresentation(), and ItemComboWidget::onComboChanged().
|
overridevirtual |
Reimplemented from ItemComboWidget.
Definition at line 50 of file JobResultsPresenter.cpp.
References ItemComboWidget::setItem().
Referenced by JobView::onSelectionChanged().
|
overridevirtual |
Sets stack to show widget corresponding to given presentation.
Reimplemented from ItemComboWidget.
Definition at line 55 of file JobResultsPresenter.cpp.
References SessionItemWidget::currentItem(), ItemComboWidget::setPresentation(), and JobItem::setPresentationType().
Referenced by JobView::connectActivityRelated(), JobView::setAppropriateActivityForJob(), and setPresentation().
|
slot |
Definition at line 63 of file JobResultsPresenter.cpp.
References SessionItemWidget::currentItem(), defaultPresentationOfInstrument(), fitPresentationOfInstrument(), Fitting, JobView, RealTime, and setPresentation().
|
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().