BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealDataModel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/RealDataModel.h
6 //! @brief Defines class RealDataModel
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_REALDATAMODEL_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_REALDATAMODEL_H
17 
19 #include <QPointer>
20 
21 class RealDataItem;
22 class InstrumentModel;
23 
24 //! The RealDataModel class is a model to store all imported RealDataItem's.
25 
26 class RealDataModel : public SessionModel {
27  Q_OBJECT
28 
29 public:
30  explicit RealDataModel(QObject* parent = 0);
32 
33  virtual QVector<SessionItem*> nonXMLItems() const override;
34  virtual void readFrom(QXmlStreamReader* reader, MessageService* messageService = 0) override;
35 
39  QVector<RealDataItem*> realDataItems() const;
40 
41  QVector<RealDataItem*> realDataItems1D() const;
42  QVector<RealDataItem*> realDataItems2D() const;
43 
45 
46 signals:
48 
49 private:
50  void onRowsChange(const QModelIndex& parent, int, int);
51  using SessionModel::itemForIndex; //< hiding this from usage - deprecated!
52  using SessionModel::removeRows; //< hiding this from usage - deprecated!
53 
54 private:
55  QPointer<InstrumentModel> m_instrumentModel;
56 };
57 
58 #endif // BORNAGAIN_GUI_COREGUI_MODELS_REALDATAMODEL_H
Defines class InstrumentModel.
The service to collect messages from different senders.
The RealDataItem class represents intensity data imported from file and intended for fitting.
Definition: RealDataItem.h:35
The RealDataModel class is a model to store all imported RealDataItem's.
Definition: RealDataModel.h:26
void setInstrumentModel(InstrumentModel *instrumentModel)
QVector< RealDataItem * > realDataItems2D() const
RealDataItem * insertIntensityDataItem()
QPointer< InstrumentModel > m_instrumentModel
Definition: RealDataModel.h:55
void onRowsChange(const QModelIndex &parent, int, int)
RealDataItem * insertRealDataItem()
void realDataAddedOrRemoved()
QVector< RealDataItem * > realDataItems() const
InstrumentModel * instrumentModel() const
QVector< RealDataItem * > realDataItems1D() const
RealDataModel(QObject *parent=0)
RealDataItem * insertSpecularDataItem()
virtual QVector< SessionItem * > nonXMLItems() const override
virtual void readFrom(QXmlStreamReader *reader, MessageService *messageService=0) override
virtual QModelIndex parent(const QModelIndex &child) const
SessionItem * itemForIndex(const QModelIndex &index) const
virtual bool removeRows(int row, int count, const QModelIndex &parent)