15 #ifndef BORNAGAIN_GUI_SUPPORT_IO_ABSTRACTDATALOADERRESULTMODEL_H
16 #define BORNAGAIN_GUI_SUPPORT_IO_ABSTRACTDATALOADERRESULTMODEL_H
18 #include <QAbstractItemModel>
32 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
33 int rowCount(
const QModelIndex& parent)
const override;
34 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
35 QVariant
headerData(
int section, Qt::Orientation orientation,
36 int role = Qt::DisplayRole)
const override;
46 virtual bool rowIsSkipped(
const QModelIndex& index)
const;
50 virtual bool rowHasError(
const QModelIndex& index)
const;
Base class for result tables of data loaders. Derive from this class and return an instance in YourDa...
virtual QString headerTextOfCalculatedColumn(int column) const =0
Return the table header text for the given column. For convenience, column starts at 0 for first calc...
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
int firstSectionOfColumnType(ColumnType type) const
Calculates the first real header view section of the given column type. Returns -1 if the column type...
AbstractDataLoaderResultModel()
QVector< int > sectionsOfColumnType(ColumnType type) const
The table header sections which belong to the given column type. Empty if this column type is not pre...
virtual bool rowIsSkipped(const QModelIndex &index) const
Returns whether the row given in the index is a skipped row. Only override this for performance reaso...
int columnCount(const QModelIndex &parent=QModelIndex()) const override
virtual bool rowIsSkipped(int row) const =0
Returns whether the row given in the index is a skipped row. Row counting starts with 0.
virtual QString cellText(ColumnType type, int row, int column) const =0
The text of the given cell. For convenience, column starts at 0 for the given column type,...
virtual bool rowHasError(const QModelIndex &index) const
Returns whether the row given in the index contains errors. Only override this for performance reason...
ColumnType columnType(const QModelIndex &index) const
Calculates the column type of the given index.
virtual int rowCount() const =0
The row count of the result table.
int lastSectionOfColumnType(ColumnType type) const
Calculates the last real header view section of the given column type. Returns -1 if the column type ...
virtual int columnCount(ColumnType type) const =0
The number of existing columns related to the given column type. 0 if the type is not present at all.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
virtual bool rowHasError(int row) const =0
Returns whether the row given in the index contains errors. Row counting starts with 0.