BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ComponentView.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/PropertyEditor/ComponentView.h
6 //! @brief Defines class ComponentView
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
17 
18 #include <QWidget>
19 
20 class SessionItem;
21 
22 //! Base class for ComponentTreeView and ComponentFlatView.
23 
24 class ComponentView : public QWidget {
25  Q_OBJECT
26 public:
27  ComponentView(QWidget* parent = nullptr) : QWidget(parent) {}
28 
29  virtual void clearEditor() = 0;
30  virtual void setItem(SessionItem* item) = 0;
31  virtual void addItem(SessionItem*) {}
32 };
33 
34 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
Base class for ComponentTreeView and ComponentFlatView.
Definition: ComponentView.h:24
ComponentView(QWidget *parent=nullptr)
Definition: ComponentView.h:27
virtual void clearEditor()=0
virtual void setItem(SessionItem *item)=0
virtual void addItem(SessionItem *)
Definition: ComponentView.h:31