BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The result model of a QREDataLoader (for showing the import results in a table view).
Definition at line 22 of file QREDataLoaderResultModel.h.
Public Types | |
enum class | ColumnType { none , line , fileContent , raw , processed , error } |
Public Member Functions | |
QREDataLoaderResultModel (QREDataLoader::ImportResult *importResult) | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
int | rowCount (const QModelIndex &parent) const override |
QVector< int > | sectionsOfColumnType (ColumnType type) const |
The table header sections which belong to the given column type. Empty if this column type is not present at all. More... | |
Protected Member Functions | |
QString | cellText (ColumnType type, int row, int col) const override |
The text of the given cell. For convenience, column starts at 0 for the given column type, therefore it is not the same as the "real" section in the table header. This method will not be called for every row/column present in the table. Instead, optimizations will be done before calling it. E.g. the calculated values for lines which contain errors will never be called. Also raw or calculated contents will not be queried if a line is skipped. More... | |
int | columnCount (ColumnType type) const override |
The number of existing columns related to the given column type. 0 if the type is not present at all. More... | |
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. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QString | headerTextOfCalculatedColumn (int column) const override |
Return the table header text for the given column. For convenience, column starts at 0 for first calculated column, therefore it is not the same as the "real" section in the table header. More... | |
int | rowCount () const override |
The row count of the result table. More... | |
virtual int | rowCount () const=0 |
The row count of the result table. More... | |
int | rowCount (const QModelIndex &parent) const override |
virtual bool | rowHasError (const QModelIndex &index) const |
Returns whether the row given in the index contains errors. Only override this for performance reasons. More... | |
virtual bool | rowHasError (const QModelIndex &index) const |
Returns whether the row given in the index contains errors. Only override this for performance reasons. More... | |
bool | rowHasError (int row) const override |
Returns whether the row given in the index contains errors. Row counting starts with 0. More... | |
virtual bool | rowHasError (int row) const=0 |
Returns whether the row given in the index contains errors. Row counting starts with 0. More... | |
virtual bool | rowIsSkipped (const QModelIndex &index) const |
Returns whether the row given in the index is a skipped row. Only override this for performance reasons. More... | |
virtual bool | rowIsSkipped (const QModelIndex &index) const |
Returns whether the row given in the index is a skipped row. Only override this for performance reasons. More... | |
bool | rowIsSkipped (int row) const override |
Returns whether the row given in the index is a skipped row. Row counting starts with 0. More... | |
virtual bool | rowIsSkipped (int row) const=0 |
Returns whether the row given in the index is a skipped row. Row counting starts with 0. More... | |
Private Member Functions | |
ColumnType | columnType (const QModelIndex &index) const |
Calculates the column type of the given index. More... | |
ColumnType | columnType (int section) const |
Calculates the column type of the real header view section. More... | |
int | firstSectionOfColumnType (ColumnType type) const |
Calculates the first real header view section of the given column type. Returns -1 if the column type does not exist. More... | |
int | lastSectionOfColumnType (ColumnType type) const |
Calculates the last real header view section of the given column type. Returns -1 if the column type does not exist. More... | |
Private Attributes | |
QREDataLoader::ImportResult * | m_importResult |
QIcon | m_warningIcon |
|
stronginherited |
Enumerator | |
---|---|
none | |
line | |
fileContent | |
raw | |
processed | |
error |
Definition at line 26 of file AbstractDataLoaderResultModel.h.
QREDataLoaderResultModel::QREDataLoaderResultModel | ( | QREDataLoader::ImportResult * | importResult | ) |
Definition at line 17 of file QREDataLoaderResultModel.cpp.
|
overrideprotectedvirtual |
The text of the given cell. For convenience, column starts at 0 for the given column type, therefore it is not the same as the "real" section in the table header. This method will not be called for every row/column present in the table. Instead, optimizations will be done before calling it. E.g. the calculated values for lines which contain errors will never be called. Also raw or calculated contents will not be queried if a line is skipped.
Implements AbstractDataLoaderResultModel.
Definition at line 73 of file QREDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::error, QREDataLoader::ImportResult::errorText(), QREDataLoader::ImportResult::eValues, AbstractDataLoaderResultModel::fileContent, QREDataLoader::ImportResult::lines, m_importResult, AbstractDataLoaderResultModel::processed, QREDataLoader::ImportResult::qValues, AbstractDataLoaderResultModel::raw, QREDataLoader::ImportResult::rawValues, and QREDataLoader::ImportResult::rValues.
|
overrideprotectedvirtual |
The number of existing columns related to the given column type. 0 if the type is not present at all.
Implements AbstractDataLoaderResultModel.
Definition at line 53 of file QREDataLoaderResultModel.cpp.
References QREDataLoader::ImportResult::calculationErrors, QREDataLoader::ImportSettings::columnDefinitions, QREDataLoader::dR, AbstractDataLoaderResultModel::error, AbstractDataLoaderResultModel::fileContent, QREDataLoader::ImportResult::importSettings, AbstractDataLoaderResultModel::line, m_importResult, QREDataLoader::ImportResult::maxColumnCount, AbstractDataLoaderResultModel::processed, and AbstractDataLoaderResultModel::raw.
|
protected |
The number of existing columns related to the given column type. 0 if the type is not present at all.
|
overrideinherited |
Definition at line 43 of file AbstractDataLoaderResultModel.cpp.
Referenced by AbstractDataLoaderResultModel::firstSectionOfColumnType(), and AbstractDataLoaderResultModel::lastSectionOfColumnType().
|
overrideprotected |
Definition at line 32 of file AbstractDataLoaderResultModel.cpp.
|
privateinherited |
Calculates the column type of the given index.
Definition at line 195 of file AbstractDataLoaderResultModel.cpp.
Referenced by AbstractDataLoaderResultModel::data(), and AbstractDataLoaderResultModel::headerData().
|
privateinherited |
Calculates the column type of the real header view section.
Definition at line 177 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::error, AbstractDataLoaderResultModel::fileContent, AbstractDataLoaderResultModel::firstSectionOfColumnType(), AbstractDataLoaderResultModel::lastSectionOfColumnType(), AbstractDataLoaderResultModel::line, AbstractDataLoaderResultModel::none, AbstractDataLoaderResultModel::processed, and AbstractDataLoaderResultModel::raw.
|
overrideinherited |
Definition at line 63 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::cellText(), AbstractDataLoaderResultModel::columnType(), AbstractDataLoaderResultModel::error, AbstractDataLoaderResultModel::fileContent, AbstractDataLoaderResultModel::firstSectionOfColumnType(), AbstractDataLoaderResultModel::line, AbstractDataLoaderResultModel::m_warningIcon, AbstractDataLoaderResultModel::processed, AbstractDataLoaderResultModel::raw, AbstractDataLoaderResultModel::rowHasError(), and AbstractDataLoaderResultModel::rowIsSkipped().
Referenced by AutomaticDataLoader1DResultModel::cellText(), and AutomaticDataLoader1DResultModel::rowCount().
|
privateinherited |
Calculates the first real header view section of the given column type. Returns -1 if the column type does not exist.
Definition at line 200 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::columnCount(), AbstractDataLoaderResultModel::error, AbstractDataLoaderResultModel::fileContent, AbstractDataLoaderResultModel::line, AbstractDataLoaderResultModel::processed, and AbstractDataLoaderResultModel::raw.
Referenced by AbstractDataLoaderResultModel::columnType(), AbstractDataLoaderResultModel::data(), AbstractDataLoaderResultModel::headerData(), AbstractDataLoaderResultModel::lastSectionOfColumnType(), and AbstractDataLoaderResultModel::sectionsOfColumnType().
|
overrideinherited |
Definition at line 140 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::columnType(), AbstractDataLoaderResultModel::error, AbstractDataLoaderResultModel::fileContent, AbstractDataLoaderResultModel::firstSectionOfColumnType(), AbstractDataLoaderResultModel::headerTextOfCalculatedColumn(), AbstractDataLoaderResultModel::line, AbstractDataLoaderResultModel::processed, and AbstractDataLoaderResultModel::raw.
|
overrideprotectedvirtual |
Return the table header text for the given column. For convenience, column starts at 0 for first calculated column, therefore it is not the same as the "real" section in the table header.
Implements AbstractDataLoaderResultModel.
Definition at line 39 of file QREDataLoaderResultModel.cpp.
|
privateinherited |
Calculates the last real header view section of the given column type. Returns -1 if the column type does not exist.
Definition at line 234 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::columnCount(), and AbstractDataLoaderResultModel::firstSectionOfColumnType().
Referenced by AbstractDataLoaderResultModel::columnType(), and AbstractDataLoaderResultModel::sectionsOfColumnType().
|
overrideprotectedvirtual |
The row count of the result table.
Implements AbstractDataLoaderResultModel.
Definition at line 27 of file QREDataLoaderResultModel.cpp.
References QREDataLoader::ImportResult::lines, and m_importResult.
|
protected |
The row count of the result table.
|
overrideinherited |
Definition at line 58 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::rowCount().
|
overrideprotected |
Definition at line 33 of file AbstractDataLoaderResultModel.cpp.
|
protectedvirtualinherited |
Returns whether the row given in the index contains errors. Only override this for performance reasons.
Definition at line 248 of file AbstractDataLoaderResultModel.cpp.
Referenced by AbstractDataLoaderResultModel::data().
|
protected |
Returns whether the row given in the index contains errors. Only override this for performance reasons.
Definition at line 50 of file AbstractDataLoaderResultModel.cpp.
|
overrideprotectedvirtual |
Returns whether the row given in the index contains errors. Row counting starts with 0.
Implements AbstractDataLoaderResultModel.
Definition at line 22 of file QREDataLoaderResultModel.cpp.
References QREDataLoader::ImportResult::calculationErrors, and m_importResult.
|
protected |
Returns whether the row given in the index contains errors. Row counting starts with 0.
|
protectedvirtualinherited |
Returns whether the row given in the index is a skipped row. Only override this for performance reasons.
Definition at line 243 of file AbstractDataLoaderResultModel.cpp.
Referenced by AbstractDataLoaderResultModel::data().
|
protected |
Returns whether the row given in the index is a skipped row. Only override this for performance reasons.
Definition at line 46 of file AbstractDataLoaderResultModel.cpp.
|
overrideprotectedvirtual |
Returns whether the row given in the index is a skipped row. Row counting starts with 0.
Implements AbstractDataLoaderResultModel.
Definition at line 32 of file QREDataLoaderResultModel.cpp.
References QREDataLoader::ImportResult::lines, and m_importResult.
|
protected |
Returns whether the row given in the index is a skipped row. Row counting starts with 0.
|
inherited |
The table header sections which belong to the given column type. Empty if this column type is not present at all.
Definition at line 165 of file AbstractDataLoaderResultModel.cpp.
References AbstractDataLoaderResultModel::firstSectionOfColumnType(), and AbstractDataLoaderResultModel::lastSectionOfColumnType().
Referenced by SpecularDataImportWidget::updatePreview().
|
private |
Definition at line 39 of file QREDataLoaderResultModel.h.
Referenced by cellText(), columnCount(), rowCount(), rowHasError(), and rowIsSkipped().
|
privateinherited |
Definition at line 93 of file AbstractDataLoaderResultModel.h.
Referenced by AbstractDataLoaderResultModel::AbstractDataLoaderResultModel(), and AbstractDataLoaderResultModel::data().