| 77 | } |
| 78 | |
| 79 | void SpreadsheetModel::suppressSignals(bool value) { |
| 80 | m_suppressSignals = value; |
| 81 | |
| 82 | // update the headers after all the data was added to the model |
| 83 | // and we start listening to signals again |
| 84 | if (m_suppressSignals) |
| 85 | beginResetModel(); |
| 86 | else { |
| 87 | m_rowCount = m_spreadsheet->rowCount(); |
| 88 | m_columnCount = m_spreadsheet->columnCount(); |
| 89 | updateHorizontalHeader(false); |
| 90 | endResetModel(); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | Qt::ItemFlags SpreadsheetModel::flags(const QModelIndex& index) const { |
| 95 | if (index.isValid()) |