BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
LayerForm.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/View/SampleDesigner/LayerForm.h
6
//! @brief Defines class LayerForm
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_LAYERFORM_H
16
#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERFORM_H
17
18
#include "
GUI/View/SampleDesigner/FormLayouter.h
"
19
#include <QGroupBox>
20
#include <memory>
21
22
class
LayerItem
;
23
class
SampleEditorController
;
24
class
ParticleLayoutItem
;
25
class
GroupBoxCollapser
;
26
class
WidgetMoverButton
;
27
28
//! Form for editing a layer
29
class
LayerForm
:
public
QGroupBox {
30
Q_OBJECT
31
public
:
32
LayerForm
(QWidget* parent,
LayerItem
* layer,
SampleEditorController
* ec);
33
34
void
enableStructureEditing
(
bool
b);
35
void
updateLayerPositionDependentElements
();
36
void
onLayoutAdded
(
ParticleLayoutItem
* layoutItem);
37
void
onAboutToRemoveLayout
(
ParticleLayoutItem
* layoutItem);
38
LayerItem
*
layerItem
()
const
;
39
void
updateTitle
();
40
void
expand
();
41
42
private
:
43
void
updateColor
();
44
45
private
:
46
GroupBoxCollapser
*
m_collapser
;
47
std::unique_ptr<FormLayouter>
m_layouter
;
48
LayerItem
*
m_layer
;
49
QAction*
m_removeAction
;
50
int
m_roughnessRow
= -1;
51
int
m_thicknessRow
= -1;
52
SampleEditorController
*
m_ec
;
53
QList<QWidget*>
m_structureEditingWidgets
;
54
WidgetMoverButton
*
m_moveButton
;
55
};
56
57
58
#endif
// BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERFORM_H
FormLayouter.h
Defines classes FormLayouter.
GroupBoxCollapser
Add-on to group boxes to make them collapsible.
Definition:
GroupBoxCollapser.h:34
LayerForm
Form for editing a layer.
Definition:
LayerForm.h:29
LayerForm::m_collapser
GroupBoxCollapser * m_collapser
Definition:
LayerForm.h:46
LayerForm::m_thicknessRow
int m_thicknessRow
Definition:
LayerForm.h:51
LayerForm::updateColor
void updateColor()
Definition:
LayerForm.cpp:114
LayerForm::m_removeAction
QAction * m_removeAction
Definition:
LayerForm.h:49
LayerForm::m_layer
LayerItem * m_layer
Definition:
LayerForm.h:48
LayerForm::updateLayerPositionDependentElements
void updateLayerPositionDependentElements()
Definition:
LayerForm.cpp:132
LayerForm::updateTitle
void updateTitle()
Definition:
LayerForm.cpp:120
LayerForm::onAboutToRemoveLayout
void onAboutToRemoveLayout(ParticleLayoutItem *layoutItem)
Definition:
LayerForm.cpp:179
LayerForm::expand
void expand()
Definition:
LayerForm.cpp:127
LayerForm::m_moveButton
WidgetMoverButton * m_moveButton
Definition:
LayerForm.h:54
LayerForm::m_layouter
std::unique_ptr< FormLayouter > m_layouter
Definition:
LayerForm.h:47
LayerForm::m_ec
SampleEditorController * m_ec
Definition:
LayerForm.h:52
LayerForm::LayerForm
LayerForm(QWidget *parent, LayerItem *layer, SampleEditorController *ec)
Definition:
LayerForm.cpp:31
LayerForm::layerItem
LayerItem * layerItem() const
Definition:
LayerForm.cpp:188
LayerForm::enableStructureEditing
void enableStructureEditing(bool b)
Definition:
LayerForm.cpp:103
LayerForm::onLayoutAdded
void onLayoutAdded(ParticleLayoutItem *layoutItem)
Definition:
LayerForm.cpp:171
LayerForm::m_structureEditingWidgets
QList< QWidget * > m_structureEditingWidgets
Definition:
LayerForm.h:53
LayerForm::m_roughnessRow
int m_roughnessRow
Definition:
LayerForm.h:50
LayerItem
Definition:
LayerItem.h:36
ParticleLayoutItem
Definition:
ParticleLayoutItem.h:28
SampleEditorController
Class to modify a sample from the layer oriented sample editor.
Definition:
SampleEditorController.h:50
WidgetMoverButton
Button to move a widget vertically in a layout.
Definition:
WidgetMoverButton.h:35
GUI
View
SampleDesigner
LayerForm.h
Generated by
1.9.1