BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleCoreShellForm.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/SampleDesigner/ParticleCoreShellForm.h
6 //! @brief Defines class ParticleCoreShellForm
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2021
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
16 #define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
17 
18 #include <QGroupBox>
19 #include <memory>
20 
21 class FormLayouter;
22 class GroupBoxCollapser;
24 class QComboBox;
26 
27 //! Form for editing a core/shell particle
28 class ParticleCoreShellForm : public QGroupBox {
29  Q_OBJECT
30 public:
32  bool allowRemove = true);
33 
34  void enableStructureEditing(bool b);
36 
37  void createCoreWidgets();
38  void createShellWidgets();
39 
40 private:
41  void onCoreComboChanged();
42  void onShellComboChanged();
43 
44  void showCoreInRealSpace();
45  void showShellInRealSpace();
46 
47 private:
49  QAction* m_removeAction = nullptr;
51  struct Location {
52  std::unique_ptr<FormLayouter> layouter;
53  QComboBox* formfactorCombo = nullptr;
55  };
58 };
59 
60 
61 #endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
Utility class to populate a QFormLayout.
Definition: FormLayouter.h:36
Add-on to group boxes to make them collapsible.
Form for editing a core/shell particle.
SampleEditorController * m_ec
ParticleCoreShellItem * coreShellItem() const
ParticleCoreShellItem * m_item
ParticleCoreShellForm(QWidget *parent, ParticleCoreShellItem *item, SampleEditorController *ec, bool allowRemove=true)
Class to modify a sample from the layer oriented sample editor.
std::unique_ptr< FormLayouter > layouter