BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MaterialEditorToolBar.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/coregui/Views/MaterialEditor/MaterialEditorToolBar.h
6
//! @brief Defines class MaterialEditorToolBar
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2018
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#ifndef BORNAGAIN_GUI_COREGUI_VIEWS_MATERIALEDITOR_MATERIALEDITORTOOLBAR_H
16
#define BORNAGAIN_GUI_COREGUI_VIEWS_MATERIALEDITOR_MATERIALEDITORTOOLBAR_H
17
18
#include <QToolBar>
19
20
class
QAction;
21
class
MaterialModel
;
22
class
QItemSelectionModel;
23
class
QPoint;
24
class
QMenu;
25
26
//! Toolbar for MaterialEditor.
27
28
class
MaterialEditorToolBar
:
public
QToolBar {
29
Q_OBJECT
30
public
:
31
MaterialEditorToolBar
(
MaterialModel
* materialModel, QWidget* parent =
nullptr
);
32
33
void
setSelectionModel
(QItemSelectionModel* selectionModel);
34
35
public
slots:
36
void
onCustomContextMenuRequested
(
const
QPoint& point);
37
38
private
slots:
39
void
onNewMaterialAction
();
40
void
onCloneMaterialAction
();
41
void
onRemoveMaterialAction
();
42
43
private
:
44
void
initItemContextMenu
(QMenu& menu);
45
46
MaterialModel
*
m_materialModel
;
47
QItemSelectionModel*
m_selectionModel
;
48
QAction*
m_newMaterialAction
;
49
QAction*
m_cloneMaterialAction
;
50
QAction*
m_removeMaterialAction
;
51
};
52
53
#endif
// BORNAGAIN_GUI_COREGUI_VIEWS_MATERIALEDITOR_MATERIALEDITORTOOLBAR_H
MaterialEditorToolBar
Toolbar for MaterialEditor.
Definition:
MaterialEditorToolBar.h:28
MaterialEditorToolBar::onNewMaterialAction
void onNewMaterialAction()
Definition:
MaterialEditorToolBar.cpp:75
MaterialEditorToolBar::MaterialEditorToolBar
MaterialEditorToolBar(MaterialModel *materialModel, QWidget *parent=nullptr)
Definition:
MaterialEditorToolBar.cpp:28
MaterialEditorToolBar::onRemoveMaterialAction
void onRemoveMaterialAction()
Definition:
MaterialEditorToolBar.cpp:88
MaterialEditorToolBar::setSelectionModel
void setSelectionModel(QItemSelectionModel *selectionModel)
Definition:
MaterialEditorToolBar.cpp:61
MaterialEditorToolBar::m_selectionModel
QItemSelectionModel * m_selectionModel
Definition:
MaterialEditorToolBar.h:47
MaterialEditorToolBar::onCustomContextMenuRequested
void onCustomContextMenuRequested(const QPoint &point)
Definition:
MaterialEditorToolBar.cpp:66
MaterialEditorToolBar::onCloneMaterialAction
void onCloneMaterialAction()
Definition:
MaterialEditorToolBar.cpp:80
MaterialEditorToolBar::m_materialModel
MaterialModel * m_materialModel
Definition:
MaterialEditorToolBar.h:46
MaterialEditorToolBar::m_cloneMaterialAction
QAction * m_cloneMaterialAction
Definition:
MaterialEditorToolBar.h:49
MaterialEditorToolBar::initItemContextMenu
void initItemContextMenu(QMenu &menu)
Definition:
MaterialEditorToolBar.cpp:99
MaterialEditorToolBar::m_newMaterialAction
QAction * m_newMaterialAction
Definition:
MaterialEditorToolBar.h:48
MaterialEditorToolBar::m_removeMaterialAction
QAction * m_removeMaterialAction
Definition:
MaterialEditorToolBar.h:50
MaterialModel
Definition:
MaterialModel.h:23
GUI
coregui
Views
MaterialEditor
MaterialEditorToolBar.h
Generated by
1.9.1