BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
sldeditortoolbar.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/sldeditor/sldeditortoolbar.cpp
6 //! @brief Implements 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 
19 #include <QAction>
20 #include <QToolButton>
21 
22 namespace gui2 {
23 
24 SLDEditorToolBar::SLDEditorToolBar(SLDEditorActions*, QWidget* parent) : QToolBar(parent)
25 {
27 
28  auto reset_view = new QToolButton;
29  reset_view->setToolTip("Set axes to default range.");
30  reset_view->setIcon(QIcon(":/icons/aspect-ratio.svg"));
31  addWidget(reset_view);
32  connect(reset_view, &QToolButton::clicked, [this]() { resetViewport(); });
33 }
34 
35 } // namespace gui2
Handles user actions applied to SLDEditor.
SLDEditorToolBar(SLDEditorActions *actions, QWidget *parent=nullptr)
Defines class CLASS?
DAREFLCORE_EXPORT void SetToolBarStyleTextBesides(QToolBar *toolbar)
Set common style for a toolbar.
Definition: styleutils.cpp:39
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20
Defines class CLASS?
Defines class CLASS?
Defines class CLASS?