BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
editorbuilders.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/viewmodel/mvvm/editors/editorbuilders.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_EDITORBUILDERS_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_EDITORBUILDERS_H
17 
18 #include "mvvm/viewmodel_export.h"
19 #include <functional>
20 #include <memory>
21 
22 namespace ModelView {
23 
24 class CustomEditor;
25 class SessionItem;
26 
27 //! Collection of methods to build custom editors for trees/tables cells.
28 //! Used to edit SessionItem data in the context of DefaultEditorFactory.
29 
30 namespace EditorBuilders {
31 
32 using editor_t = std::unique_ptr<CustomEditor>;
33 using builder_t = std::function<editor_t(const SessionItem*)>;
34 
35 //! Builder for boolean property editor.
36 MVVM_VIEWMODEL_EXPORT builder_t BoolEditorBuilder();
37 
38 //! Builder for integer property editor.
39 MVVM_VIEWMODEL_EXPORT builder_t IntegerEditorBuilder();
40 
41 //! Builder for double editor with limits support.
42 MVVM_VIEWMODEL_EXPORT builder_t DoubleEditorBuilder();
43 
44 //! Builder for double editor with scientific notation based on simple text field.
45 MVVM_VIEWMODEL_EXPORT builder_t ScientificDoubleEditorBuilder();
46 
47 //! Builder for double editor with scientific notation and spinbox functionality.
48 MVVM_VIEWMODEL_EXPORT builder_t ScientificSpinBoxEditorBuilder();
49 
50 //! Builder for color property editor.
51 MVVM_VIEWMODEL_EXPORT builder_t ColorEditorBuilder();
52 
53 //! Builder for ComboProperty editor.
54 MVVM_VIEWMODEL_EXPORT builder_t ComboPropertyEditorBuilder();
55 
56 //! Builder for external property editor.
57 MVVM_VIEWMODEL_EXPORT builder_t ExternalPropertyEditorBuilder();
58 
59 //! Builder for ComboProperty editor with multi-selection functionality.
61 
62 } // namespace EditorBuilders
63 
64 } // namespace ModelView
65 
66 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_EDITORBUILDERS_H
Base class for all custom variants editors.
Definition: CustomEditors.h:28
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
MVVM_VIEWMODEL_EXPORT builder_t ColorEditorBuilder()
Builder for color property editor.
MVVM_VIEWMODEL_EXPORT builder_t BoolEditorBuilder()
Builder for boolean property editor.
MVVM_VIEWMODEL_EXPORT builder_t SelectableComboPropertyEditorBuilder()
Builder for ComboProperty editor with multi-selection functionality.
MVVM_VIEWMODEL_EXPORT builder_t ScientificDoubleEditorBuilder()
Builder for double editor with scientific notation based on simple text field.
MVVM_VIEWMODEL_EXPORT builder_t ComboPropertyEditorBuilder()
Builder for ComboProperty editor.
std::function< editor_t(const SessionItem *)> builder_t
MVVM_VIEWMODEL_EXPORT builder_t ScientificSpinBoxEditorBuilder()
Builder for double editor with scientific notation and spinbox functionality.
std::unique_ptr< CustomEditor > editor_t
MVVM_VIEWMODEL_EXPORT builder_t ExternalPropertyEditorBuilder()
Builder for external property editor.
MVVM_VIEWMODEL_EXPORT builder_t IntegerEditorBuilder()
Builder for integer property editor.
MVVM_VIEWMODEL_EXPORT builder_t DoubleEditorBuilder()
Builder for double editor with limits support.
materialitems.h Collection of materials to populate MaterialModel.