BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
editorfactoryinterface.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/interfaces/editorfactoryinterface.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_INTERFACES_EDITORFACTORYINTERFACE_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_EDITORFACTORYINTERFACE_H
17 
18 #include "mvvm/viewmodel_export.h"
19 #include <memory>
20 #include <string>
21 
22 class QModelIndex;
23 class QWidget;
24 
25 namespace ModelView {
26 
27 class CustomEditor;
28 
29 //! Interface for custom editor factory.
30 //! Intended for editor construction in cells of tables and trees in the context of delegate.
31 
32 class MVVM_VIEWMODEL_EXPORT EditorFactoryInterface {
33 public:
34  virtual ~EditorFactoryInterface() = default;
35 
36  virtual std::unique_ptr<CustomEditor> createEditor(const QModelIndex& index) const = 0;
37 };
38 
39 } // namespace ModelView
40 
41 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_EDITORFACTORYINTERFACE_H
Base class for all custom variants editors.
Definition: CustomEditors.h:28
Interface for custom editor factory.
virtual std::unique_ptr< CustomEditor > createEditor(const QModelIndex &index) const =0
virtual ~EditorFactoryInterface()=default
materialitems.h Collection of materials to populate MaterialModel.