Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/Views/SampleDesigner/LayerForm.h
//! @brief Defines class LayerForm
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2021
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H
#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H
#include "GUI/Views/SampleDesigner/FormLayouter.h"
#include <QGroupBox>
#include <memory>
class LayerItem;
class SampleEditorController;
class ParticleLayoutItem;
class GroupBoxCollapser;
//! Form for editing a layer
class LayerForm : public QGroupBox {
Q_OBJECT
public:
LayerForm(QWidget* parent, LayerItem* layer, SampleEditorController* ec);
void enableStructureEditing(bool b);
void updateLayerPositionDependentElements();
void onLayoutAdded(ParticleLayoutItem* layoutItem);
void onAboutToRemoveLayout(ParticleLayoutItem* layoutItem);
LayerItem* layerItem() const;
void updateTitle();
private:
void updateColor();
private:
GroupBoxCollapser* m_collapser;
std::unique_ptr<FormLayouter> m_layouter;
LayerItem* m_layer;
QAction* m_removeAction;
int m_roughnessRow = -1;
int m_thicknessRow = -1;
SampleEditorController* m_ec;
QList<QWidget*> m_structureEditingWidgets;
};
#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H