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

The dialog which shows an editor to change parameters of DistributionItem. More...

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

Public Member Functions

 DistributionDialog (QWidget *parent=0)
 
virtual ~DistributionDialog ()
 
void setItem (SessionItem *item)
 
void setNameOfEditor (const QString &name)
 

Private Attributes

DistributionEditorm_editor
 

Detailed Description

The dialog which shows an editor to change parameters of DistributionItem.

Definition at line 23 of file DistributionDialog.h.

Constructor & Destructor Documentation

◆ DistributionDialog()

DistributionDialog::DistributionDialog ( QWidget *  parent = 0)

Definition at line 22 of file DistributionDialog.cpp.

23  : QDialog(parent), m_editor(new DistributionEditor)
24 {
25  setMinimumSize(256, 256);
26  resize(700, 480);
27  setWindowTitle("Select Distribution");
28  // setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
29  setModal(true);
30 
31  QVBoxLayout* layout = new QVBoxLayout;
32  QPushButton* button = new QPushButton("Close", this);
33  button->setAutoDefault(false);
34  connect(button, &QPushButton::clicked, this, &DistributionDialog::close);
35 
36  QHBoxLayout* buttonLayout = new QHBoxLayout;
37  buttonLayout->addStretch(1);
38  buttonLayout->setContentsMargins(4, 4, 4, 4);
39  buttonLayout->addWidget(button);
40 
41  layout->addWidget(m_editor);
42  layout->addLayout(buttonLayout);
43 
44  layout->setContentsMargins(0, 0, 0, 0);
45  setLayout(layout);
46 
47  setAttribute(Qt::WA_DeleteOnClose, true);
49 }
DistributionEditor * m_editor
The DistributionEditor class, being a child of DistributionDialog, contains a widget to show Distribu...
void setResizable(QDialog *dialog)
Make modal dialog resizable.
Definition: StyleUtils.cpp:87

References m_editor, and StyleUtils::setResizable().

Here is the call graph for this function:

◆ ~DistributionDialog()

virtual DistributionDialog::~DistributionDialog ( )
inlinevirtual

Definition at line 28 of file DistributionDialog.h.

28 {}

Member Function Documentation

◆ setItem()

void DistributionDialog::setItem ( SessionItem item)

Definition at line 51 of file DistributionDialog.cpp.

52 {
53  m_editor->setItem(item);
54 }
virtual void setItem(SessionItem *item)

References m_editor, and SessionItemWidget::setItem().

Here is the call graph for this function:

◆ setNameOfEditor()

void DistributionDialog::setNameOfEditor ( const QString &  name)

Definition at line 56 of file DistributionDialog.cpp.

57 {
59 }
void setNameOfEditor(QString name)
QString const & name(EShape k)
Definition: particles.cpp:21

References m_editor, RealSpace::Particles::name(), and DistributionEditor::setNameOfEditor().

Here is the call graph for this function:

Member Data Documentation

◆ m_editor

DistributionEditor* DistributionDialog::m_editor
private

Definition at line 34 of file DistributionDialog.h.

Referenced by DistributionDialog(), setItem(), and setNameOfEditor().


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