BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
layereditoractions.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/layereditor/layereditoractions.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_LAYEREDITOR_LAYEREDITORACTIONS_H
16 #define BORNAGAIN_GUI2_LAYEREDITOR_LAYEREDITORACTIONS_H
17 
18 #include "darefl_export.h"
19 #include <QObject>
20 #include <memory>
21 
22 namespace gui2 {
23 
24 class SampleModel;
25 class LayerSelectionModel;
26 
27 //! Handles user actions applied to layer tree.
28 //! Belongs to LayerEditor.
29 
30 class DAREFLCORE_EXPORT LayerEditorActions : public QObject {
31  Q_OBJECT
32 
33 public:
34  LayerEditorActions(QObject* parent = nullptr);
36 
37  void setModel(SampleModel* model);
38 
39  void onAddLayer();
40  void onAddMultiLayer();
41  void onClone();
42  void onRemove();
43  void onMoveUp();
44  void onMoveDown();
45 
46  void setSelectionModel(LayerSelectionModel* selection_model);
47 
48 private:
50  std::unique_ptr<LayerEditorActionsImpl> p_impl;
51 };
52 
53 } // namespace gui2
54 
55 #endif // BORNAGAIN_GUI2_LAYEREDITOR_LAYEREDITORACTIONS_H
Main model to hold sample items.
Definition: SampleModel.h:24
Handles user actions applied to layer tree.
std::unique_ptr< LayerEditorActionsImpl > p_impl
Custom selection model for layer view model (AbstractViewModel).
Model to hold layers and multi-layers.
Definition: samplemodel.h:24
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20