15 #ifndef GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H
16 #define GUI_COREGUI_DATALOADERS_ABSTRACTDATALOADERRESULTMODEL_H
18 #include <QAbstractItemModel>
32 virtual int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
33 virtual int rowCount(
const QModelIndex& parent)
const override;
34 virtual QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
35 virtual 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.
virtual QString headerTextOfCalculatedColumn(int column) const =0
Return the table header text for the given column.
virtual 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.
AbstractDataLoaderResultModel()
QVector< int > sectionsOfColumnType(ColumnType type) const
The table header sections which belong to the given column type.
virtual bool rowIsSkipped(const QModelIndex &index) const
Returns whether the row given in the index is a skipped row.
virtual 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.
virtual bool rowHasError(const QModelIndex &index) const
Returns whether the row given in the index contains errors.
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.
virtual int columnCount(ColumnType type) const =0
The number of existing columns related to the given column type.
virtual 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.