BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MesoCrystalForm.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/SampleDesigner/MesoCrystalForm.h
6 //! @brief Defines class MesoCrystalForm
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_MESOCRYSTALFORM_H
16 #define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALFORM_H
17 
18 #include <QGroupBox>
19 
20 class MesoCrystalItem;
21 class QAction;
23 class QComboBox;
24 class ItemWithParticles;
25 class QFormLayout;
26 
27 //! Form for editing a mesocrystal
28 class MesoCrystalForm : public QGroupBox {
29 public:
30  MesoCrystalForm(QWidget* parent, MesoCrystalItem* item, SampleEditorController* ec,
31  bool allowRemove = true);
32 
33  void enableStructureEditing(bool b);
35  void createBasisWidgets();
36 
37 private:
38  QComboBox* createBasisCombo(QWidget* parent, ItemWithParticles* current);
39 
40  void onBasisComboChanged();
41 
42  QFormLayout* m_layout;
44  QAction* m_removeAction = nullptr;
46  QComboBox* m_basisCombo;
48 };
49 
50 
51 #endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALFORM_H
Form for editing a mesocrystal.
QComboBox * m_basisCombo
MesoCrystalItem * m_item
MesoCrystalItem * mesoCrystalItem() const
MesoCrystalForm(QWidget *parent, MesoCrystalItem *item, SampleEditorController *ec, bool allowRemove=true)
QComboBox * createBasisCombo(QWidget *parent, ItemWithParticles *current)
QFormLayout * m_layout
SampleEditorController * m_ec
QAction * m_removeAction
void enableStructureEditing(bool b)
Class to modify a sample from the layer oriented sample editor.