Skip to content
Snippets Groups Projects
MaterialInplaceForm.h 1.36 KiB
Newer Older
//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      GUI/View/SampleDesigner/MaterialInplaceForm.h
//! @brief     Defines class MaterialInplaceForm
//!
//! @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)
//
//  ************************************************************************************************

Wuttke, Joachim's avatar
Wuttke, Joachim committed
#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
#include <QGridLayout>
Mikhail Svechnikov's avatar
Mikhail Svechnikov committed
#include <QWidget>

class ItemWithMaterial;
class SampleEditorController;

//! Form to select a material and to edit it in-place
class MaterialInplaceForm : public QWidget {
public:
    MaterialInplaceForm(QWidget* parent, ItemWithMaterial* item, SampleEditorController* ec);

    ItemWithMaterial* itemWithMaterial() const;
    void updateValues();

private:
    void selectMaterial();
    void createWidgets();
    void onMaterialChanged();

    ItemWithMaterial* m_item;
    SampleEditorController* m_ec;
    QGridLayout* m_layout;
};


Wuttke, Joachim's avatar
Wuttke, Joachim committed
#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H