BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ItemComboToolbar.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/View/Common/ItemComboToolbar.h
6
//! @brief Defines class ItemComboToolbar
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_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
16
#define BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
17
18
#include "
GUI/View/Common/StyledToolbar.h
"
19
#include <QList>
20
21
class
QAction;
22
class
QComboBox;
23
24
//! The ItemComboToolbar class is a styled toolbar on top of ItemComboWidget. Contains
25
//! ComboBox to switch ItemComboWidget, and dynamic list of actions, which are updated
26
//! according to current state of ItemComboWidget.
27
28
class
ItemComboToolbar
:
public
StyledToolbar
{
29
Q_OBJECT
30
31
public
:
32
explicit
ItemComboToolbar
(QWidget* parent =
nullptr
);
33
34
void
setPresentation
(
const
QString&
name
);
35
36
void
setPresentationList
(
const
QStringList& presentationList,
37
const
QStringList& activeList = {});
38
39
QString
currentPresentation
()
const
;
40
41
void
setActionList
(
const
QList<QAction*>& actionList);
42
43
signals:
44
void
comboChanged
(
const
QString& presentation);
45
46
private
:
47
void
setComboConnected
(
bool
value);
48
void
makeItemsEnabled
(
const
QStringList& activePresentations);
49
50
QComboBox*
m_comboBox
;
51
QAction*
m_comboBoxAction
;
52
};
53
54
#endif
// BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
StyledToolbar.h
Defines class StyledToolbar.
ItemComboToolbar
The ItemComboToolbar class is a styled toolbar on top of ItemComboWidget. Contains ComboBox to switch...
Definition:
ItemComboToolbar.h:28
ItemComboToolbar::currentPresentation
QString currentPresentation() const
Definition:
ItemComboToolbar.cpp:58
ItemComboToolbar::setPresentation
void setPresentation(const QString &name)
Definition:
ItemComboToolbar.cpp:34
ItemComboToolbar::comboChanged
void comboChanged(const QString &presentation)
ItemComboToolbar::setPresentationList
void setPresentationList(const QStringList &presentationList, const QStringList &activeList={})
Definition:
ItemComboToolbar.cpp:41
ItemComboToolbar::setActionList
void setActionList(const QList< QAction * > &actionList)
Sets external actions to tool bar (previous actions will be removed).
Definition:
ItemComboToolbar.cpp:65
ItemComboToolbar::m_comboBoxAction
QAction * m_comboBoxAction
Definition:
ItemComboToolbar.h:51
ItemComboToolbar::m_comboBox
QComboBox * m_comboBox
Definition:
ItemComboToolbar.h:50
ItemComboToolbar::makeItemsEnabled
void makeItemsEnabled(const QStringList &activePresentations)
All items in QComboBox which are not in given list, will be disabled (gray and unselectable).
Definition:
ItemComboToolbar.cpp:93
ItemComboToolbar::setComboConnected
void setComboConnected(bool value)
Definition:
ItemComboToolbar.cpp:78
ItemComboToolbar::ItemComboToolbar
ItemComboToolbar(QWidget *parent=nullptr)
Definition:
ItemComboToolbar.cpp:20
StyledToolbar
The StyledToolbar class represents our standard narrow toolbar with the height 24 pixels.
Definition:
StyledToolbar.h:22
GUI::RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:20
GUI
View
Common
ItemComboToolbar.h
Generated by
1.9.1