BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Component property widget for SessionItems. More...
Public Slots | |
void | onDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles) |
Public Member Functions | |
ComponentFlatView (QWidget *parent=nullptr) | |
~ComponentFlatView () | |
void | addItem (SessionItem *item) |
void | clearEditor () |
void | setItem (SessionItem *item) |
void | setModel (SessionModel *model) |
void | setShowChildren (bool show) |
Private Member Functions | |
void | clearLayout () |
PropertyWidgetItem * | createWidget (const SessionItem *item) |
void | initGridLayout () |
void | updateItemProperties () |
void | updateItemRoles (SessionItem *item) |
Private Attributes | |
QGridLayout * | m_gridLayout |
QBoxLayout * | m_mainLayout |
SessionModel * | m_model |
bool | m_show_children |
QVector< const SessionItem * > | m_topItems |
QVector< PropertyWidgetItem * > | m_widgetItems |
Component property widget for SessionItems.
On the contrary to ComponentTreeView properties are presented as widgets in grid layout. Shows only PropertyItems and current items of GroupProperties.
Definition at line 31 of file ComponentFlatView.h.
ComponentFlatView::ComponentFlatView | ( | QWidget * | parent = nullptr | ) |
Definition at line 28 of file ComponentFlatView.cpp.
References initGridLayout(), and m_mainLayout.
|
default |
|
virtual |
Reimplemented from ComponentView.
Definition at line 56 of file ComponentFlatView.cpp.
References m_topItems, setItem(), and updateItemProperties().
|
virtual |
Implements ComponentView.
Definition at line 105 of file ComponentFlatView.cpp.
References clearLayout(), and m_topItems.
Referenced by setItem(), SimulationOptionsWidget::setItem(), and DistributionEditor::subscribeToItem().
|
private |
Definition at line 77 of file ComponentFlatView.cpp.
References ASSERT, LayoutUtils::clearGridLayout(), m_gridLayout, and m_widgetItems.
Referenced by clearEditor(), and updateItemProperties().
|
private |
Definition at line 147 of file ComponentFlatView.cpp.
References PropertyEditorFactory::CreateEditor().
Referenced by updateItemProperties().
|
private |
Definition at line 138 of file ComponentFlatView.cpp.
References m_gridLayout, and m_mainLayout.
Referenced by ComponentFlatView().
|
slot |
Definition at line 92 of file ComponentFlatView.cpp.
References ASSERT, SessionFlags::FlagRole, SessionModel::itemForIndex(), m_model, SessionItem::modelType(), updateItemProperties(), and updateItemRoles().
Referenced by setModel().
|
virtual |
Implements ComponentView.
Definition at line 47 of file ComponentFlatView.cpp.
References clearEditor(), m_topItems, SessionItem::model(), setModel(), and updateItemProperties().
Referenced by addItem(), SimulationOptionsWidget::setItem(), and DistributionEditor::subscribeToItem().
void ComponentFlatView::setModel | ( | SessionModel * | model | ) |
Definition at line 66 of file ComponentFlatView.cpp.
References m_model, and onDataChanged().
Referenced by setItem().
void ComponentFlatView::setShowChildren | ( | bool | show | ) |
Definition at line 87 of file ComponentFlatView.cpp.
References m_show_children.
Referenced by ComponentEditor::createComponentView().
|
private |
Definition at line 111 of file ComponentFlatView.cpp.
References clearLayout(), ComponentUtils::componentItems(), createWidget(), m_gridLayout, m_show_children, m_topItems, and m_widgetItems.
Referenced by addItem(), onDataChanged(), and setItem().
|
private |
Definition at line 131 of file ComponentFlatView.cpp.
References m_widgetItems.
Referenced by onDataChanged().
|
private |
Definition at line 58 of file ComponentFlatView.h.
Referenced by clearLayout(), initGridLayout(), and updateItemProperties().
|
private |
Definition at line 57 of file ComponentFlatView.h.
Referenced by ComponentFlatView(), and initGridLayout().
|
private |
Definition at line 60 of file ComponentFlatView.h.
Referenced by onDataChanged(), and setModel().
|
private |
Definition at line 61 of file ComponentFlatView.h.
Referenced by setShowChildren(), and updateItemProperties().
|
private |
Definition at line 62 of file ComponentFlatView.h.
Referenced by addItem(), clearEditor(), setItem(), and updateItemProperties().
|
private |
Definition at line 59 of file ComponentFlatView.h.
Referenced by clearLayout(), updateItemProperties(), and updateItemRoles().