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 variant type stored as DATA role on board of SessionItem. More...
Public Member Functions | |
VariantDependentEditorFactory () | |
std::unique_ptr< CustomEditor > | createEditor (const QModelIndex &index) const override |
Creates cell editor basing on variant name. More... | |
Protected Member Functions | |
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 variant type stored as DATA role on board of SessionItem.
Definition at line 56 of file defaulteditorfactory.h.
VariantDependentEditorFactory::VariantDependentEditorFactory | ( | ) |
Definition at line 90 of file defaulteditorfactory.cpp.
References ModelView::Constants::bool_type_name, ModelView::EditorBuilders::BoolEditorBuilder(), ModelView::EditorBuilders::ColorEditorBuilder(), ModelView::Constants::comboproperty_type_name, ModelView::EditorBuilders::ComboPropertyEditorBuilder(), ModelView::Constants::double_type_name, ModelView::EditorBuilders::ExternalPropertyEditorBuilder(), ModelView::Constants::extproperty_type_name, ModelView::Constants::int_type_name, ModelView::EditorBuilders::IntegerEditorBuilder(), ModelView::Constants::qcolor_type_name, ModelView::AbstractEditorFactory::registerBuilder(), and ModelView::EditorBuilders::ScientificSpinBoxEditorBuilder().
|
overridevirtual |
Creates cell editor basing on variant name.
Implements ModelView::EditorFactoryInterface.
Definition at line 106 of file defaulteditorfactory.cpp.
References ModelView::AbstractEditorFactory::findBuilder(), and ModelView::Utils::VariantName().
|
protectedinherited |
Definition at line 43 of file defaulteditorfactory.cpp.
References ModelView::AbstractEditorFactory::m_nameToBuilderMap, and RealSpace::Particles::name().
Referenced by createEditor(), and ModelView::RoleDependentEditorFactory::createItemEditor().
|
protectedinherited |
Definition at line 37 of file defaulteditorfactory.cpp.
References ModelView::AbstractEditorFactory::m_nameToBuilderMap, and RealSpace::Particles::name().
Referenced by ModelView::RoleDependentEditorFactory::RoleDependentEditorFactory(), and VariantDependentEditorFactory().
|
protectedinherited |
Definition at line 37 of file defaulteditorfactory.h.
Referenced by ModelView::AbstractEditorFactory::findBuilder(), and ModelView::AbstractEditorFactory::registerBuilder().