BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
JobSelectorToolBar.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/JobWidgets/JobSelectorToolBar.cpp
6 //! @brief Implements class JobSelectorToolBar
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 
17 #include <QToolButton>
18 
20  : StyledToolBar(parent), m_runJobButton(new QToolButton), m_removeJobButton(new QToolButton)
21 {
22  setMinimumSize(minimumHeight(), minimumHeight());
23 
24  m_runJobButton->setText("Run");
25  m_runJobButton->setIcon(QIcon(":/images/play.svg"));
26  m_runJobButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
27  m_runJobButton->setToolTip("Run currently selected job");
28  addWidget(m_runJobButton);
29 
30  m_removeJobButton->setText("Remove");
31  m_removeJobButton->setIcon(QIcon(":/images/delete.svg"));
32  m_removeJobButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
33  m_removeJobButton->setToolTip("Remove currently selected job.");
34  addWidget(m_removeJobButton);
35 
36  connect(m_runJobButton, &QToolButton::clicked, actions, &JobSelectorActions::onRunJob);
37  connect(m_removeJobButton, &QToolButton::clicked, actions, &JobSelectorActions::onRemoveJob);
38 }
Defines class JobSelectorActions.
Defines class JobSelectorToolBar.
The JobSelectorActions class contains actions to run/remove jobs.
QToolButton * m_removeJobButton
JobSelectorToolBar(JobSelectorActions *actions, QWidget *parent=nullptr)
QToolButton * m_runJobButton
The StyledToolBar class represents our standard narrow toolbar with the height 24 pixels.
Definition: StyledToolBar.h:22