BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
JobRealTimeToolBar Class Reference

Represents a toolbar with buttons for ParameterTuningWidget. More...

Inheritance diagram for JobRealTimeToolBar:
[legend]
Collaboration diagram for JobRealTimeToolBar:
[legend]

Signals

void resetParameters ()
 

Public Member Functions

 JobRealTimeToolBar (QWidget *parent=nullptr)
 
void addSpacing (int width=2)
 Width of the spacing between buttons. More...
 
void addStyledExpand ()
 
void addStyledSeparator ()
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *)
 

Private Attributes

QToolButton * m_resetParametersButton
 

Detailed Description

Represents a toolbar with buttons for ParameterTuningWidget.

Definition at line 24 of file JobRealTimeToolBar.h.

Constructor & Destructor Documentation

◆ JobRealTimeToolBar()

JobRealTimeToolBar::JobRealTimeToolBar ( QWidget *  parent = nullptr)
explicit

Definition at line 18 of file JobRealTimeToolBar.cpp.

19  : StyledToolBar(parent), m_resetParametersButton(new QToolButton)
20 {
21  setMinimumSize(minimumHeight(), minimumHeight());
22 
23  m_resetParametersButton->setText("Reset values");
24  m_resetParametersButton->setIcon(QIcon(":/images/undo-variant.svg"));
25  m_resetParametersButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
26  m_resetParametersButton->setToolTip("Reset parameter tree to initial values");
27  addWidget(m_resetParametersButton);
28 
29  connect(m_resetParametersButton, &QToolButton::clicked, this,
31 }
QToolButton * m_resetParametersButton
StyledToolBar(QWidget *parent=nullptr)

References m_resetParametersButton, and resetParameters().

Member Function Documentation

◆ addSpacing()

void StyledToolBar::addSpacing ( int  width = 2)
inherited

Width of the spacing between buttons.

Definition at line 37 of file StyledToolBar.cpp.

38 {
39  QString space;
40  space.fill(' ', width);
41  addWidget(new QLabel(space));
42 }

Referenced by ItemComboToolBar::setActionList().

◆ addStyledExpand()

void StyledToolBar::addStyledExpand ( )
inherited

Definition at line 44 of file StyledToolBar.cpp.

45 {
46  QWidget* empty = new QWidget();
47  empty->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
48  addWidget(empty);
49 }

Referenced by ItemComboToolBar::setActionList().

◆ addStyledSeparator()

void StyledToolBar::addStyledSeparator ( )
inherited

Definition at line 28 of file StyledToolBar.cpp.

29 {
30  addWidget(new QLabel(" "));
31  addSeparator();
32  addWidget(new QLabel(" "));
33 }

Referenced by SampleToolBar::SampleToolBar().

◆ contextMenuEvent()

void StyledToolBar::contextMenuEvent ( QContextMenuEvent *  )
protectedinherited

Definition at line 51 of file StyledToolBar.cpp.

52 {
53  // Context menu reimplemented to suppress the default one
54 }

◆ resetParameters

void JobRealTimeToolBar::resetParameters ( )
signal

Member Data Documentation

◆ m_resetParametersButton

QToolButton* JobRealTimeToolBar::m_resetParametersButton
private

Definition at line 34 of file JobRealTimeToolBar.h.

Referenced by JobRealTimeToolBar().


The documentation for this class was generated from the following files: