15 #ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATATREEMODEL_H
16 #define BORNAGAIN_GUI_VIEW_IMPORT_REALDATATREEMODEL_H
18 #include <QAbstractItemModel>
30 QModelIndex
index(
int row,
int column,
31 const QModelIndex&
parent = QModelIndex())
const override;
33 QModelIndex
parent(
const QModelIndex&
index)
const override;
35 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
36 QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole)
const override;
37 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
38 bool setData(
const QModelIndex&
index,
const QVariant& value,
int role)
override;
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
The RealDataModel class is a model to store all imported RealDataItem's.
Tree model for real data item selection. Used for the tree in the import view.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QModelIndex parent(const QModelIndex &index) const override
QModelIndex indexForItem(RealDataItem *item) const
QSet< int > m_visibleRanks
Qt::ItemFlags flags(const QModelIndex &index) const override
bool setData(const QModelIndex &index, const QVariant &value, int role) override
void refreshAfterModelChange()
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
RealDataItem * insertIntensityDataItem()
bool isHeadline(const QModelIndex &index) const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
RealDataTreeModel(QObject *parent, RealDataModel *model)
RealDataItem * topMostItem() const
The topmost visible item. Can be null of course.
RealDataItem * insertSpecularDataItem()
RealDataItem * itemForIndex(const QModelIndex &index) const
QVector< RealDataItem * > m_items[2]
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
void onContentsProcessed(RealDataItem *item)
void updateSubscriptions()
void removeItem(RealDataItem *item)
void setVisibleRanks(QSet< int > visibleRanks)
QModelIndex indexOfHeadline(int rank) const
RealDataItem * insertDataItem(int rank)