BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleCompositionForm.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/SampleDesigner/ParticleCompositionForm.h
6 //! @brief Defines class ParticleCompositionForm
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_PARTICLECOMPOSITIONFORM_H
16 #define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
17 
18 #include <QGroupBox>
19 #include <QList>
20 
21 class QAction;
24 class QFormLayout;
25 class ItemWithParticles;
26 
27 //! Form for editing a particle composition
28 class ParticleCompositionForm : public QGroupBox {
29  Q_OBJECT
30 public:
32  SampleEditorController* ec, bool allowRemove = true);
33 
34  void enableStructureEditing(bool b);
38 
39 private:
40  QFormLayout* m_layout;
42  QAction* m_removeAction = nullptr;
44  QList<QWidget*> m_structureEditingWidgets;
45 };
46 
47 #endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
Form for editing a particle composition.
SampleEditorController * m_ec
void onAboutToRemoveParticle(ItemWithParticles *item)
ParticleCompositionItem * m_compositionItem
ParticleCompositionForm(QWidget *parent, ParticleCompositionItem *compositionItem, SampleEditorController *ec, bool allowRemove=true)
ParticleCompositionItem * compositionItem() const
void onParticleAdded(ItemWithParticles *item)
QList< QWidget * > m_structureEditingWidgets
Class to modify a sample from the layer oriented sample editor.