Skip to content
Snippets Groups Projects
Commit d7d7f434 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

add LayerContainerForm

parent 53495eec
No related branches found
No related tags found
1 merge request!2741GUI sample builder supports periodic stacks (#20)
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/Sample/LayerContainerForm.cpp
//! @brief Implements class LayerContainerForm.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2024
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include "GUI/View/Sample/LayerContainerForm.h"
#include "Base/Util/Assert.h"
#include "Base/Util/Vec.h"
#include "GUI/Model/Sample/ItemWithLayers.h"
#include "GUI/Model/Sample/SampleItem.h"
#include "GUI/View/Sample/HeinzFormLayout.h"
#include "GUI/View/Sample/SampleEditorController.h"
LayerContainerForm::LayerContainerForm(QWidget* parent, ItemWithLayers* item,
SampleEditorController* ec)
: CollapsibleGroupBox(parent, item->expandGroupbox)
, m_layout(new HeinzFormLayout(ec))
, m_item(item)
, m_ec(ec)
{
}
void LayerContainerForm::expand()
{
setExpanded(true);
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/Sample/LayerContainerForm.h
//! @brief Defines class LayerContainerForm.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2024
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_VIEW_SAMPLE_LAYERCONTAINERFORM_H
#define BORNAGAIN_GUI_VIEW_SAMPLE_LAYERCONTAINERFORM_H
#include "GUI/View/Widget/GroupBoxes.h"
class HeinzFormLayout;
class ItemWithLayers;
class SampleEditorController;
class WidgetMoverButton;
//! Base form for editing layers and stacks
class LayerContainerForm : public CollapsibleGroupBox {
Q_OBJECT
public:
LayerContainerForm(QWidget* parent, ItemWithLayers* item, SampleEditorController* ec);
virtual void updateTitle() = 0;
void expand();
protected:
HeinzFormLayout* m_layout;
ItemWithLayers* m_item;
QAction* m_duplicate_action;
QAction* m_remove_action;
SampleEditorController* m_ec;
QVector<QWidget*> m_structure_editing_widgets;
WidgetMoverButton* m_move_button;
};
#endif // BORNAGAIN_GUI_VIEW_SAMPLE_LAYERCONTAINERFORM_H
......@@ -16,7 +16,6 @@
#define BORNAGAIN_GUI_VIEW_SAMPLE_LAYERFORM_H
#include "GUI/View/Widget/GroupBoxes.h"
#include <memory>
class HeinzFormLayout;
class LayerItem;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment