BornAgain
1.19.0
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/coregui/Views/CommonWidgets/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_COREGUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
16
#define BORNAGAIN_GUI_COREGUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
17
18
#include "
GUI/coregui/mainwindow/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 = 0);
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_COREGUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
StyledToolBar.h
Defines class StyledToolBar.
ItemComboToolBar
The ItemComboToolBar class is a styled toolbar on top of ItemComboWidget.
Definition:
ItemComboToolBar.h:28
ItemComboToolBar::comboChanged
void comboChanged(const QString &presentation)
ItemComboToolBar::setActionList
void setActionList(const QList< QAction * > &actionList)
Sets external actions to tool bar (previous actions will be removed).
Definition:
ItemComboToolBar.cpp:66
ItemComboToolBar::ItemComboToolBar
ItemComboToolBar(QWidget *parent=0)
Definition:
ItemComboToolBar.cpp:21
ItemComboToolBar::m_comboBox
QComboBox * m_comboBox
Definition:
ItemComboToolBar.h:50
ItemComboToolBar::setComboConnected
void setComboConnected(bool value)
Definition:
ItemComboToolBar.cpp:79
ItemComboToolBar::setPresentation
void setPresentation(const QString &name)
Definition:
ItemComboToolBar.cpp:33
ItemComboToolBar::setPresentationList
void setPresentationList(const QStringList &presentationList, const QStringList &activeList={})
Definition:
ItemComboToolBar.cpp:40
ItemComboToolBar::m_comboBoxAction
QAction * m_comboBoxAction
Definition:
ItemComboToolBar.h:51
ItemComboToolBar::currentPresentation
QString currentPresentation() const
Definition:
ItemComboToolBar.cpp:59
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:94
StyledToolBar
The StyledToolBar class represents our standard narrow toolbar with the height 24 pixels.
Definition:
StyledToolBar.h:22
RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:21
GUI
coregui
Views
CommonWidgets
ItemComboToolBar.h
Generated by
1.9.1