BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Editor factory for cell editors in Qt trees and tables, relies on EDITORTYPE role stored on board of SessionItem. More...
Public Member Functions | |
RoleDependentEditorFactory () | |
std::unique_ptr< CustomEditor > | createEditor (const QModelIndex &index) const override |
Creates cell editor basing on item role. It is expected that the index belongs to a ViewModel. More... | |
Protected Member Functions | |
std::unique_ptr< CustomEditor > | createItemEditor (const SessionItem *item) const |
Creates cell editor basing on editor type. More... | |
EditorBuilders::builder_t | findBuilder (const std::string &name) const |
void | registerBuilder (const std::string &name, EditorBuilders::builder_t builder) |
Protected Attributes | |
std::map< std::string, EditorBuilders::builder_t > | m_nameToBuilderMap |
Editor factory for cell editors in Qt trees and tables, relies on EDITORTYPE role stored on board of SessionItem.
Definition at line 43 of file defaulteditorfactory.h.
RoleDependentEditorFactory::RoleDependentEditorFactory | ( | ) |
Definition at line 51 of file defaulteditorfactory.cpp.
References ModelView::EditorBuilders::BoolEditorBuilder(), ModelView::Constants::BoolEditorType, ModelView::EditorBuilders::ColorEditorBuilder(), ModelView::Constants::ColorEditorType, ModelView::EditorBuilders::ComboPropertyEditorBuilder(), ModelView::Constants::ComboPropertyEditorType, ModelView::EditorBuilders::DoubleEditorBuilder(), ModelView::Constants::DoubleEditorType, ModelView::EditorBuilders::ExternalPropertyEditorBuilder(), ModelView::Constants::ExternalPropertyEditorType, ModelView::EditorBuilders::IntegerEditorBuilder(), ModelView::Constants::IntegerEditorType, ModelView::AbstractEditorFactory::registerBuilder(), ModelView::Constants::ScientficDoubleEditorType, ModelView::Constants::ScientficSpinBoxEditorType, ModelView::EditorBuilders::ScientificDoubleEditorBuilder(), ModelView::EditorBuilders::ScientificSpinBoxEditorBuilder(), ModelView::EditorBuilders::SelectableComboPropertyEditorBuilder(), and ModelView::Constants::SelectableComboPropertyEditorType.
|
overridevirtual |
Creates cell editor basing on item role. It is expected that the index belongs to a ViewModel.
Implements ModelView::EditorFactoryInterface.
Definition at line 73 of file defaulteditorfactory.cpp.
References createItemEditor().
|
protected |
Creates cell editor basing on editor type.
Definition at line 82 of file defaulteditorfactory.cpp.
References ModelView::SessionItem::editorType(), and ModelView::AbstractEditorFactory::findBuilder().
Referenced by createEditor().
|
protectedinherited |
Definition at line 43 of file defaulteditorfactory.cpp.
References ModelView::AbstractEditorFactory::m_nameToBuilderMap, and RealSpace::Particles::name().
Referenced by ModelView::VariantDependentEditorFactory::createEditor(), and createItemEditor().
|
protectedinherited |
Definition at line 37 of file defaulteditorfactory.cpp.
References ModelView::AbstractEditorFactory::m_nameToBuilderMap, and RealSpace::Particles::name().
Referenced by RoleDependentEditorFactory(), and ModelView::VariantDependentEditorFactory::VariantDependentEditorFactory().
|
protectedinherited |
Definition at line 37 of file defaulteditorfactory.h.
Referenced by ModelView::AbstractEditorFactory::findBuilder(), and ModelView::AbstractEditorFactory::registerBuilder().