BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
layereditortoolbar.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/layereditor/layereditortoolbar.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_LAYEREDITORTOOLBAR_H
16 #define BORNAGAIN_GUI2_LAYEREDITOR_LAYEREDITORTOOLBAR_H
17 
18 #include "darefl_export.h"
19 #include <QToolBar>
20 #include <QWidget>
21 #include <map>
22 #include <string>
23 
24 namespace gui2 {
25 
26 class LayerEditorActions;
27 
28 //! Layer editor toolbar.
29 
30 class DAREFLCORE_EXPORT LayerEditorToolBar : public QToolBar {
31  Q_OBJECT
32 
33 public:
34  LayerEditorToolBar(LayerEditorActions* actions, QWidget* parent = nullptr);
35  ~LayerEditorToolBar() = default;
36 
37  void updateToolButtonStates(bool first_present, bool last_present);
38 
39 private:
40  QMenu* create_layer_menu(LayerEditorActions* editor_actions);
41  std::map<std::string, QWidget*> m_toolbarWidgets;
42 };
43 
44 } // namespace gui2
45 
46 #endif // BORNAGAIN_GUI2_LAYEREDITOR_LAYEREDITORTOOLBAR_H
Handles user actions applied to layer tree.
Layer editor toolbar.
std::map< std::string, QWidget * > m_toolbarWidgets
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20