BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Updates bin values inside IntensityData to display current mask state. Returns IntensityData to original state when requested.
Definition at line 30 of file MaskResultsPresenter.h.
Public Member Functions | |
MaskResultsPresenter (QWidget *parent=nullptr) | |
void | resetContext () |
void | setMaskContext (SessionModel *maskModel, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem) |
void | updatePresenter (MaskEditorFlags::PresentationType presentationType) |
Private Member Functions | |
void | backup_data () |
Datafield * | createMaskPresentation () const |
Constructs Datafield which contains original intensity data except masked areas, and areas outside of ROI, where bin content is set to zero. More... | |
void | setOriginalMode () |
Restores original state of IntensityDataItem. More... | |
void | setShowMaskMode () |
Update IntensityDataItem in SessionModel to represent masked areas. Corresponding bins of Datafield will be put to zero. More... | |
Private Attributes | |
std::unique_ptr< Datafield > | m_dataBackup |
IntensityDataItem * | m_intensityDataItem |
bool | m_interpolation_flag_backup |
QModelIndex | m_maskContainerIndex |
SessionModel * | m_maskModel |
MaskResultsPresenter::MaskResultsPresenter | ( | QWidget * | parent = nullptr | ) |
Definition at line 23 of file MaskResultsPresenter.cpp.
|
private |
Definition at line 78 of file MaskResultsPresenter.cpp.
References DataItem::getDatafield(), IntensityDataItem::isInterpolated(), m_dataBackup, m_intensityDataItem, and m_interpolation_flag_backup.
Referenced by setShowMaskMode().
|
private |
Constructs Datafield which contains original intensity data except masked areas, and areas outside of ROI, where bin content is set to zero.
Definition at line 87 of file MaskResultsPresenter.cpp.
References DataItem::getDatafield(), SessionModel::index(), SessionModel::itemForIndex(), m_intensityDataItem, m_maskContainerIndex, m_maskModel, and SessionModel::rowCount().
Referenced by setShowMaskMode().
void MaskResultsPresenter::resetContext | ( | ) |
Definition at line 38 of file MaskResultsPresenter.cpp.
References setMaskContext().
void MaskResultsPresenter::setMaskContext | ( | SessionModel * | maskModel, |
const QModelIndex & | maskContainerIndex, | ||
IntensityDataItem * | intensityItem | ||
) |
Definition at line 29 of file MaskResultsPresenter.cpp.
References m_intensityDataItem, m_maskContainerIndex, and m_maskModel.
Referenced by resetContext(), and MaskEditorCanvas::setMaskContext().
|
private |
Restores original state of IntensityDataItem.
Definition at line 70 of file MaskResultsPresenter.cpp.
References m_dataBackup, m_intensityDataItem, m_interpolation_flag_backup, IntensityDataItem::setDatafield(), and IntensityDataItem::setInterpolated().
Referenced by updatePresenter().
|
private |
Update IntensityDataItem in SessionModel to represent masked areas. Corresponding bins of Datafield will be put to zero.
Definition at line 57 of file MaskResultsPresenter.cpp.
References backup_data(), createMaskPresentation(), m_dataBackup, m_intensityDataItem, IntensityDataItem::setDatafield(), and IntensityDataItem::setInterpolated().
Referenced by updatePresenter().
void MaskResultsPresenter::updatePresenter | ( | MaskEditorFlags::PresentationType | presentationType | ) |
Definition at line 43 of file MaskResultsPresenter.cpp.
References m_maskContainerIndex, MaskEditorFlags::MASK_EDITOR, MaskEditorFlags::MASK_PRESENTER, setOriginalMode(), and setShowMaskMode().
Referenced by MaskEditorCanvas::onPresentationTypeRequest().
|
private |
Definition at line 50 of file MaskResultsPresenter.h.
Referenced by backup_data(), setOriginalMode(), and setShowMaskMode().
|
private |
Definition at line 49 of file MaskResultsPresenter.h.
Referenced by backup_data(), createMaskPresentation(), setMaskContext(), setOriginalMode(), and setShowMaskMode().
|
private |
Definition at line 51 of file MaskResultsPresenter.h.
Referenced by backup_data(), and setOriginalMode().
|
private |
Definition at line 48 of file MaskResultsPresenter.h.
Referenced by createMaskPresentation(), setMaskContext(), and updatePresenter().
|
private |
Definition at line 47 of file MaskResultsPresenter.h.
Referenced by createMaskPresentation(), and setMaskContext().