BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
materialeditoractions.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/materialeditor/materialeditoractions.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 Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_MATERIALEDITOR_MATERIALEDITORACTIONS_H
16 #define BORNAGAIN_GUI2_MATERIALEDITOR_MATERIALEDITORACTIONS_H
17 
18 #include "darefl_export.h"
19 #include <QObject>
20 #include <memory>
21 
22 namespace gui2 {
23 
24 class MaterialModel;
25 class MaterialSelectionModel;
26 
27 //! Handles user actions applied to material table.
28 //! Belongs to MaterialEditor.
29 
30 class DAREFLCORE_EXPORT MaterialEditorActions : public QObject {
31  Q_OBJECT
32 
33 public:
34  MaterialEditorActions(QObject* parent = nullptr);
36 
37  void setModel(MaterialModel* model);
38 
39  void onAddMaterial();
40  void onCloneMaterial();
41  void onRemoveMaterial();
42  void onMoveUp();
43  void onMoveDown();
44  void onExport();
45  void onImport();
46 
47  void setMaterialSelectionModel(MaterialSelectionModel* selection_model);
48 
49 private:
51  std::unique_ptr<MaterialEditorActionsImpl> p_impl;
52 };
53 
54 } // namespace gui2
55 
56 #endif // BORNAGAIN_GUI2_MATERIALEDITOR_MATERIALEDITORACTIONS_H
Handles user actions applied to material table.
std::unique_ptr< MaterialEditorActionsImpl > p_impl
Model to hold MaterialItems.
Definition: materialmodel.h:35
Custom selection model for material view model (AbstractViewModel).
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20