BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Tool widget for MaskEditor.
Definition at line 37 of file MaskEditorPropertyPanel.h.
Signals | |
void | itemContextMenuRequest (const QPoint &point) |
Public Member Functions | |
MaskEditorPropertyPanel (QWidget *parent=nullptr) | |
QSize | minimumSizeHint () const override |
void | resetContext () |
QItemSelectionModel * | selectionModel () |
void | setMaskContext (SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem) |
void | setPanelHidden (bool hidden) |
Show/Hide panel. When panel is hidden, all property editors are disabled. More... | |
QSize | sizeHint () const override |
Private Slots | |
void | onCustomContextMenuRequested (const QPoint &point) |
void | onSelectionChanged (const QItemSelection &selected, const QItemSelection &) |
Private Member Functions | |
void | addMaskCheckBox (const QString &title, function< bool()> getter, function< void(bool)> setter) |
Add a checkbox to edit a mask's boolean value. More... | |
void | addMaskSpinBox (DoubleDescriptor d) |
Add a spinbox to edit a mask's double value. More... | |
void | createMaskEditorUI () |
Creates the UI to edit the current mask's properties. More... | |
MaskItem * | maskItemForIndex (const QModelIndex &index) |
Return the mask item for the given index. nullptr if index invalid or not pointing to a mask item. More... | |
void | setCurrentMaskItem (MaskItem *maskItem) |
Set the current mask and creates the UI to edit the mask's properties. More... | |
Private Attributes | |
MaskItem * | m_currentMaskItem |
the mask item whose properties shall be edited More... | |
bool | m_inhibitSelectionChange |
IntensityDataItem * | m_intensityDataItem |
QListView * | m_listView |
SessionModel * | m_maskModel |
QFormLayout * | m_maskPropertiesLayout |
IntensityDataPropertyWidget * | m_plotPropertyEditor |
QModelIndex | m_rootIndex |
MaskEditorPropertyPanel::MaskEditorPropertyPanel | ( | QWidget * | parent = nullptr | ) |
Definition at line 30 of file MaskEditorPropertyPanel.cpp.
References GroupBoxCollapser::installIntoGroupBox(), m_listView, m_maskPropertiesLayout, m_plotPropertyEditor, and onCustomContextMenuRequested().
|
private |
Add a checkbox to edit a mask's boolean value.
Definition at line 236 of file MaskEditorPropertyPanel.cpp.
References m_currentMaskItem, m_maskPropertiesLayout, SessionItem::mapper(), and ModelMapper::setOnPropertyChange().
Referenced by createMaskEditorUI().
|
private |
Add a spinbox to edit a mask's double value.
Definition at line 223 of file MaskEditorPropertyPanel.cpp.
References DoubleSpinBox::baseValueChanged(), DoubleDescriptor::get, DoubleDescriptor::label, m_currentMaskItem, m_maskPropertiesLayout, SessionItem::mapper(), DoubleDescriptor::set, and ModelMapper::setOnPropertyChange().
Referenced by createMaskEditorUI().
|
private |
Creates the UI to edit the current mask's properties.
Definition at line 178 of file MaskEditorPropertyPanel.cpp.
References addMaskCheckBox(), addMaskSpinBox(), m_currentMaskItem, m_inhibitSelectionChange, m_maskPropertiesLayout, and MaskItem::maskValue().
Referenced by setCurrentMaskItem().
|
signal |
Referenced by onCustomContextMenuRequested(), and MaskEditor::setup_connections().
|
private |
Return the mask item for the given index. nullptr if index invalid or not pointing to a mask item.
Definition at line 254 of file MaskEditorPropertyPanel.cpp.
References SessionModel::itemForIndex(), and m_maskModel.
Referenced by onSelectionChanged(), and setPanelHidden().
|
override |
Definition at line 89 of file MaskEditorPropertyPanel.cpp.
|
privateslot |
Definition at line 161 of file MaskEditorPropertyPanel.cpp.
References itemContextMenuRequest(), and m_listView.
Referenced by MaskEditorPropertyPanel().
|
privateslot |
Definition at line 149 of file MaskEditorPropertyPanel.cpp.
References m_inhibitSelectionChange, maskItemForIndex(), and setCurrentMaskItem().
Referenced by setMaskContext().
void MaskEditorPropertyPanel::resetContext | ( | ) |
Definition at line 113 of file MaskEditorPropertyPanel.cpp.
References m_intensityDataItem, m_listView, m_maskModel, m_plotPropertyEditor, m_rootIndex, setCurrentMaskItem(), and IntensityDataPropertyWidget::setItem().
Referenced by MaskEditor::resetContext().
QItemSelectionModel * MaskEditorPropertyPanel::selectionModel | ( | ) |
Definition at line 123 of file MaskEditorPropertyPanel.cpp.
References m_listView.
Referenced by MaskEditor::setMaskContext(), and setPanelHidden().
|
private |
Set the current mask and creates the UI to edit the mask's properties.
Definition at line 166 of file MaskEditorPropertyPanel.cpp.
References GUI::Util::Layout::clearLayout(), createMaskEditorUI(), m_currentMaskItem, m_maskPropertiesLayout, SessionItem::mapper(), and ModelMapper::unsubscribe().
Referenced by onSelectionChanged(), resetContext(), and setPanelHidden().
void MaskEditorPropertyPanel::setMaskContext | ( | SessionModel * | model, |
const QModelIndex & | maskContainerIndex, | ||
IntensityDataItem * | intensityItem | ||
) |
Definition at line 94 of file MaskEditorPropertyPanel.cpp.
References m_intensityDataItem, m_listView, m_maskModel, m_plotPropertyEditor, m_rootIndex, onSelectionChanged(), and IntensityDataPropertyWidget::setItem().
Referenced by MaskEditor::setMaskContext().
void MaskEditorPropertyPanel::setPanelHidden | ( | bool | hidden | ) |
Show/Hide panel. When panel is hidden, all property editors are disabled.
Definition at line 130 of file MaskEditorPropertyPanel.cpp.
References m_intensityDataItem, m_plotPropertyEditor, m_rootIndex, maskItemForIndex(), selectionModel(), setCurrentMaskItem(), and IntensityDataPropertyWidget::setItem().
Referenced by MaskEditor::MaskEditor(), and MaskEditor::onPropertyPanelRequest().
|
override |
Definition at line 84 of file MaskEditorPropertyPanel.cpp.
|
private |
the mask item whose properties shall be edited
Definition at line 84 of file MaskEditorPropertyPanel.h.
Referenced by addMaskCheckBox(), addMaskSpinBox(), createMaskEditorUI(), and setCurrentMaskItem().
|
private |
Definition at line 85 of file MaskEditorPropertyPanel.h.
Referenced by createMaskEditorUI(), and onSelectionChanged().
|
private |
Definition at line 82 of file MaskEditorPropertyPanel.h.
Referenced by resetContext(), setMaskContext(), and setPanelHidden().
|
private |
Definition at line 78 of file MaskEditorPropertyPanel.h.
Referenced by MaskEditorPropertyPanel(), onCustomContextMenuRequested(), resetContext(), selectionModel(), and setMaskContext().
|
private |
Definition at line 80 of file MaskEditorPropertyPanel.h.
Referenced by maskItemForIndex(), resetContext(), and setMaskContext().
|
private |
Definition at line 83 of file MaskEditorPropertyPanel.h.
Referenced by MaskEditorPropertyPanel(), addMaskCheckBox(), addMaskSpinBox(), createMaskEditorUI(), and setCurrentMaskItem().
|
private |
Definition at line 79 of file MaskEditorPropertyPanel.h.
Referenced by MaskEditorPropertyPanel(), resetContext(), setMaskContext(), and setPanelHidden().
|
private |
Definition at line 81 of file MaskEditorPropertyPanel.h.
Referenced by resetContext(), setMaskContext(), and setPanelHidden().