BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SampleDesigner.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SampleDesigner/SampleDesigner.h
6 //! @brief Defines class SampleDesigner
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_SAMPLEDESIGNER_SAMPLEDESIGNER_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_SAMPLEDESIGNER_H
17 
20 #include <QObject>
21 #include <QStackedWidget>
22 
23 class DesignerScene;
24 class DesignerWidgetFactory;
25 class InstrumentModel;
26 class SampleModel;
28 class ApplicationModels;
29 
30 //! sample designer interface
31 class SampleDesignerInterface : public QObject {
32  Q_OBJECT
33 
34 public:
35  SampleDesignerInterface(QObject* parent = 0) : QObject(parent) {}
37 
38  // virtual DesignerScene *getScene() const = 0;
39  // virtual DesignerView *getView() const = 0;
40 };
41 
42 //! sample designer provide central window with graphic scene to drag and drop
44  Q_OBJECT
45 
46 public:
47  SampleDesigner(QWidget* parent = 0);
48  virtual ~SampleDesigner();
49 
50  DesignerScene* getScene() const { return m_designerScene; }
51  DesignerView* getView() const { return m_designerView; }
52 
53  QWidget* getCentralWidget() { return m_designerView; }
54 
55  void setModels(ApplicationModels* models);
56  void setSelectionModel(QItemSelectionModel* model, FilterPropertyProxy* proxy);
57 
58 private:
59  DesignerScene* m_designerScene; //! scene which holds all objects
60  DesignerView* m_designerView; //! graphical representation of scene with object
61 };
62 
63 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_SAMPLEDESIGNER_H
Defines class DesignerScene.
Defines class DesignerView.
Main class which represents SessionModel on graphics scene.
Definition: DesignerScene.h:37
The DesignerView class provides widget for displaying the contents of DesignerScene.
Definition: DesignerView.h:30
The FilterPropertyProxy class filters out all PropertyItem's and similar from SessionModel to have on...
sample designer interface
virtual ~SampleDesignerInterface()
SampleDesignerInterface(QObject *parent=0)
sample designer provide central window with graphic scene to drag and drop
DesignerScene * getScene() const
DesignerScene * m_designerScene
virtual ~SampleDesigner()
void setModels(ApplicationModels *models)
QWidget * getCentralWidget()
SampleDesigner(QWidget *parent=0)
DesignerView * m_designerView
scene which holds all objects
DesignerView * getView() const
void setSelectionModel(QItemSelectionModel *model, FilterPropertyProxy *proxy)
Main model to hold sample items.
Definition: SampleModel.h:24