BornAgain  1.19.79
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/Model/Model/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_MODEL_MODEL_REALDATAMODEL_H
16 #define BORNAGAIN_GUI_MODEL_MODEL_REALDATAMODEL_H
17 
19 
20 class RealDataItem;
21 
22 //! The RealDataModel class is a model to store all imported RealDataItem's.
23 
24 class RealDataModel : public SessionModel {
25  Q_OBJECT
26 
27 public:
28  explicit RealDataModel(QObject* parent = nullptr);
29 
30  QVector<SessionItem*> nonXMLItems() const override;
31  void readFrom(QXmlStreamReader* reader, MessageService* messageService = nullptr) override;
32 
35  RealDataItem* insertDataItem(int rank);
36  QVector<RealDataItem*> realDataItems() const;
37  QVector<RealDataItem*> realDataItems(int rank) const;
38 
39  QVector<RealDataItem*> realDataItems1D() const;
40  QVector<RealDataItem*> realDataItems2D() const;
41 
42  void remove(RealDataItem* item);
43 
44  QStringList realDataNames() const;
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::removeItem; // hiding this from usage - deprecated!
53  using SessionModel::removeRows; // hiding this from usage - deprecated!
54 };
55 
56 #endif // BORNAGAIN_GUI_MODEL_MODEL_REALDATAMODEL_H
Defines class SessionModel.
The service to collect messages from different senders.
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Definition: RealDataItem.h:33
The RealDataModel class is a model to store all imported RealDataItem's.
Definition: RealDataModel.h:24
QVector< RealDataItem * > realDataItems2D() const
RealDataItem * insertIntensityDataItem()
void readFrom(QXmlStreamReader *reader, MessageService *messageService=nullptr) override
void onRowsChange(const QModelIndex &parent, int, int)
void realDataAddedOrRemoved()
QVector< RealDataItem * > realDataItems() const
RealDataItem * insertDataItem(int rank)
RealDataModel(QObject *parent=nullptr)
QVector< RealDataItem * > realDataItems1D() const
RealDataItem * insertSpecularDataItem()
QStringList realDataNames() const
void remove(RealDataItem *item)
QVector< SessionItem * > nonXMLItems() const override
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
Definition: SessionModel.h:42
QModelIndex parent(const QModelIndex &child) const override
SessionItem * itemForIndex(const QModelIndex &index) const
void removeItem(SessionItem *item)
bool removeRows(int row, int count, const QModelIndex &parent) override