BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ItemStackWidget class contains a stack of widgets presenting top level items of SessionModel. Every item corresponds to its own widget.
This is the base for ItemStackPresenter, which actually contains item specific editor's logic. Used in InstrumentView, ImportDataView, JobView to show editors for currently selected items.
Definition at line 30 of file ItemStackWidget.h.
Public Slots | |
virtual void | onModelAboutToBeReset () |
virtual void | onRowsAboutToBeRemoved (const QModelIndex &parent, int first, int) |
Public Member Functions | |
ItemStackWidget (QWidget *parent=nullptr) | |
QSize | minimumSizeHint () const override |
void | setModel (SessionModel *model) |
void | setSizeHint (const QSize &size_hint) |
QSize | sizeHint () const override |
Protected Member Functions | |
void | connectModel () |
void | disconnectModel () |
virtual void | removeWidgetForItem (SessionItem *item)=0 |
virtual void | removeWidgets ()=0 |
void | validateItem (SessionItem *item) |
Checks if model was set correctly. More... | |
Protected Attributes | |
SessionModel * | m_model |
QSize | m_size_hint |
class QStackedWidget * | m_stackedWidget |
ItemStackWidget::ItemStackWidget | ( | QWidget * | parent = nullptr | ) |
Definition at line 21 of file ItemStackWidget.cpp.
References m_stackedWidget.
|
protected |
Definition at line 74 of file ItemStackWidget.cpp.
References m_model, onModelAboutToBeReset(), and onRowsAboutToBeRemoved().
Referenced by setModel().
|
protected |
Definition at line 86 of file ItemStackWidget.cpp.
References m_model, onModelAboutToBeReset(), and onRowsAboutToBeRemoved().
Referenced by setModel().
|
override |
Definition at line 53 of file ItemStackWidget.cpp.
|
virtualslot |
Definition at line 63 of file ItemStackWidget.cpp.
References removeWidgets().
Referenced by connectModel(), and disconnectModel().
|
virtualslot |
Definition at line 68 of file ItemStackWidget.cpp.
References SessionModel::index(), SessionModel::itemForIndex(), m_model, and removeWidgetForItem().
Referenced by connectModel(), and disconnectModel().
|
protectedpure virtual |
Implemented in ItemStackPresenter< T >, ItemStackPresenter< ParameterTuningWidget >, and ItemStackPresenter< RealDataPresenter >.
Referenced by onRowsAboutToBeRemoved().
|
protectedpure virtual |
Implemented in ItemStackPresenter< T >, ItemStackPresenter< ParameterTuningWidget >, and ItemStackPresenter< RealDataPresenter >.
Referenced by onModelAboutToBeReset().
void ItemStackWidget::setModel | ( | SessionModel * | model | ) |
Definition at line 38 of file ItemStackWidget.cpp.
References connectModel(), disconnectModel(), and m_model.
Referenced by ImportDataView::ImportDataView(), JobRealTimeWidget::JobRealTimeWidget(), and validateItem().
void ItemStackWidget::setSizeHint | ( | const QSize & | size_hint | ) |
Definition at line 58 of file ItemStackWidget.cpp.
References m_size_hint.
Referenced by ImportDataView::ImportDataView().
|
override |
Definition at line 48 of file ItemStackWidget.cpp.
References m_size_hint.
|
protected |
Checks if model was set correctly.
Definition at line 100 of file ItemStackWidget.cpp.
References Error, m_model, SessionItem::model(), and setModel().
|
protected |
Definition at line 55 of file ItemStackWidget.h.
Referenced by connectModel(), disconnectModel(), onRowsAboutToBeRemoved(), setModel(), and validateItem().
|
protected |
Definition at line 56 of file ItemStackWidget.h.
Referenced by setSizeHint(), and sizeHint().
|
protected |
Definition at line 54 of file ItemStackWidget.h.
Referenced by ItemStackWidget().