Skip to content
Snippets Groups Projects
MaterialInplaceForm.h 1.44 KiB
Newer Older
  • Learn to ignore specific revisions
  • //  ************************************************************************************************
    //
    //  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)
    //
    //  ************************************************************************************************
    
    #ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
    #define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
    
    #include <QWidget>
    
    class ItemWithMaterial;
    class SampleEditorController;
    class QGridLayout;
    
    
    //! Form to select a material and to edit it in-place
    class MaterialInplaceForm : public QWidget {
        Q_OBJECT
    public:
        MaterialInplaceForm(QWidget* parent, ItemWithMaterial* item, SampleEditorController* ec);
    
    
        ItemWithMaterial* itemWithMaterial() const;
        void updateValues();
    
    
    private:
        void selectMaterial();
        void createWidgets();
    
        void onMaterialChanged(MaterialItem* materialItem);
    
    
        ItemWithMaterial* m_item;
        SampleEditorController* m_ec;
        QGridLayout* m_layout;
    };
    
    
    #endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H