| 284 | } |
| 285 | |
| 286 | bool TreeModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) { |
| 287 | if (role != Qt::EditRole && role != Qt::DisplayRole && orientation != Qt::Horizontal) |
| 288 | return false; |
| 289 | |
| 290 | bool result = rootItem->setData(section, value); |
| 291 | |
| 292 | if (result) |
| 293 | Q_EMIT headerDataChanged(orientation, section, section); |
| 294 | |
| 295 | return result; |
| 296 | } |
| 297 | |
| 298 | int TreeModel::compareStrings(const QString& value, const int row, const int column, const QModelIndex& parent) { |
| 299 | QModelIndex plotIndex = index(row, column, parent); |