BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ItemComboToolbar class is a styled toolbar on top of ItemComboWidget. Contains ComboBox to switch ItemComboWidget, and dynamic list of actions, which are updated according to current state of ItemComboWidget.
Definition at line 28 of file ItemComboToolbar.h.
Signals | |
void | comboChanged (const QString &presentation) |
Public Member Functions | |
ItemComboToolbar (QWidget *parent=nullptr) | |
void | addSpacing (int width=2) |
Width of the spacing between buttons. More... | |
void | addStyledExpand () |
void | addStyledSeparator () |
QString | currentPresentation () const |
void | setActionList (const QList< QAction * > &actionList) |
Sets external actions to tool bar (previous actions will be removed). More... | |
void | setPresentation (const QString &name) |
void | setPresentationList (const QStringList &presentationList, const QStringList &activeList={}) |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *) override |
Private Member Functions | |
void | makeItemsEnabled (const QStringList &activePresentations) |
All items in QComboBox which are not in given list, will be disabled (gray and unselectable). More... | |
void | setComboConnected (bool value) |
Private Attributes | |
QComboBox * | m_comboBox |
QAction * | m_comboBoxAction |
|
explicit |
Definition at line 20 of file ItemComboToolbar.cpp.
References m_comboBox, m_comboBoxAction, and setComboConnected().
|
inherited |
Width of the spacing between buttons.
Definition at line 38 of file StyledToolbar.cpp.
Referenced by setActionList().
|
inherited |
|
inherited |
Definition at line 29 of file StyledToolbar.cpp.
|
signal |
Referenced by ItemComboWidget::ItemComboWidget(), and setComboConnected().
|
overrideprotectedinherited |
Definition at line 52 of file StyledToolbar.cpp.
QString ItemComboToolbar::currentPresentation | ( | ) | const |
Definition at line 58 of file ItemComboToolbar.cpp.
References m_comboBox.
Referenced by ItemComboWidget::selectedPresentation(), and setPresentationList().
|
private |
All items in QComboBox which are not in given list, will be disabled (gray and unselectable).
Definition at line 93 of file ItemComboToolbar.cpp.
References m_comboBox.
Referenced by setPresentationList().
void ItemComboToolbar::setActionList | ( | const QList< QAction * > & | actionList | ) |
Sets external actions to tool bar (previous actions will be removed).
Definition at line 65 of file ItemComboToolbar.cpp.
References StyledToolbar::addSpacing(), StyledToolbar::addStyledExpand(), and m_comboBoxAction.
Referenced by ItemComboWidget::setPresentation().
|
private |
Definition at line 78 of file ItemComboToolbar.cpp.
References comboChanged(), and m_comboBox.
Referenced by ItemComboToolbar(), setPresentation(), and setPresentationList().
void ItemComboToolbar::setPresentation | ( | const QString & | name | ) |
Definition at line 34 of file ItemComboToolbar.cpp.
References m_comboBox, GUI::RealSpace::Particles::name(), and setComboConnected().
Referenced by ItemComboWidget::setPresentation().
void ItemComboToolbar::setPresentationList | ( | const QStringList & | presentationList, |
const QStringList & | activeList = {} |
||
) |
Definition at line 41 of file ItemComboToolbar.cpp.
References currentPresentation(), m_comboBox, makeItemsEnabled(), and setComboConnected().
Referenced by ItemComboWidget::subscribeToItem().
|
private |
Definition at line 50 of file ItemComboToolbar.h.
Referenced by ItemComboToolbar(), currentPresentation(), makeItemsEnabled(), setComboConnected(), setPresentation(), and setPresentationList().
|
private |
Definition at line 51 of file ItemComboToolbar.h.
Referenced by ItemComboToolbar(), and setActionList().