BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
importdataeditor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/importdataview/importdataeditor.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_IMPORTDATAVIEW_IMPORTDATAEDITOR_H
16 #define BORNAGAIN_GUI2_IMPORTDATAVIEW_IMPORTDATAEDITOR_H
17 
18 #include "darefl_export.h"
19 #include <QWidget>
20 #include <string>
21 
22 namespace gui2 {
23 
24 class ExperimentalDataModel;
25 struct GraphImportData;
26 class DataViewModel;
27 class DataSelectionModel;
28 class ImportDataEditorActions;
29 class ImportDataEditorToolBar;
30 class DataSelectorWidget;
31 class GraphCanvasWidget;
32 class CanvasItem;
33 
34 //! Main editor to import user data.
35 
36 class DAREFLCORE_EXPORT ImportDataEditor : public QWidget {
37  Q_OBJECT
38 
39 public:
40  ImportDataEditor(ExperimentalDataModel* model, QWidget* parent = nullptr);
41 
42 private:
43  void setupConnections();
44  void invokeImportDialog();
45 
46  std::pair<std::vector<std::string>, int> canvasInfo() const;
47  void onImportDialogAccept(const std::vector<GraphImportData>& graph_data, CanvasItem* canvas);
48  DataSelectionModel* selectionModel() const;
49 
50  ExperimentalDataModel* m_dataModel{nullptr};
51  DataViewModel* m_viewModel{nullptr};
52  ImportDataEditorActions* m_editorActions{nullptr};
53  ImportDataEditorToolBar* m_editorToolBar{nullptr};
54  DataSelectorWidget* m_dataSelectorWidget{nullptr};
55  GraphCanvasWidget* m_graphCanvasWidget{nullptr};
56 };
57 
58 } // namespace gui2
59 
60 #endif // BORNAGAIN_GUI2_IMPORTDATAVIEW_IMPORTDATAEDITOR_H
Holds a collection of GraphItem's for simultaneous plotting, as well as all information related to pl...
Custom selection model for data view model (AbstractViewModel).
Widget to select graphs and look at their properties.
View model for ExperimentalDataModel with drag-and-drop support.
Definition: dataviewmodel.h:31
The model to store imported reflectometry data.
Widget to show canvas with graph collection.
Actions for ImportDataEditor.
Toolbar for ImportDataEditor.
Main editor to import user data.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20