BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ApplicationModels.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/ApplicationModels.h
6 //! @brief Defines class holding all application models
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_MODELS_APPLICATIONMODELS_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_APPLICATIONMODELS_H
17 
18 #include <QObject>
19 
20 class SessionModel;
21 class SessionItem;
22 class DocumentModel;
23 class MaterialModel;
24 class InstrumentModel;
25 class RealDataModel;
26 class SampleModel;
27 class JobModel;
29 class MessageService;
30 
31 class ApplicationModels : public QObject {
32  Q_OBJECT
33 public:
34  explicit ApplicationModels(QObject* parent = nullptr);
36 
42  JobModel* jobModel();
43 
44  void resetModels();
45 
46  void writeTo(class QXmlStreamWriter* writer);
47  void readFrom(class QXmlStreamReader* reader, MessageService* messageService);
48 
49  QList<SessionModel*> modelList();
50 
51  //! Returns all non-XML items
52  QVector<SessionItem*> nonXMLItems() const;
53 
54 signals:
55  void modelChanged();
56 
57 private:
58  void connectModel(SessionModel* model);
59 
67 };
68 
69 #endif // BORNAGAIN_GUI_COREGUI_MODELS_APPLICATIONMODELS_H
SampleModel * sampleModel()
MaterialPropertyController * m_materialPropertyController
RealDataModel * realDataModel()
SampleModel * m_sampleModel
MaterialModel * materialModel()
QList< SessionModel * > modelList()
Returns the list of all GUI models.
void connectModel(SessionModel *model)
QVector< SessionItem * > nonXMLItems() const
Returns all non-XML items.
MaterialModel * m_materialModel
void readFrom(class QXmlStreamReader *reader, MessageService *messageService)
RealDataModel * m_realDataModel
void writeTo(class QXmlStreamWriter *writer)
Writes all model in file one by one.
ApplicationModels(QObject *parent=nullptr)
DocumentModel * m_documentModel
DocumentModel * documentModel()
InstrumentModel * instrumentModel()
void resetModels()
reset all models to initial state
InstrumentModel * m_instrumentModel
The DocumentModel class is a model with GUI settings related to the opened project.
Definition: DocumentModel.h:25
Listens MaterialModel for changes in MaterialItems and then updates MaterialProperties in all related...
The service to collect messages from different senders.
The RealDataModel class is a model to store all imported RealDataItem's.
Definition: RealDataModel.h:26
Main model to hold sample items.
Definition: SampleModel.h:24