| 418 | |
| 419 | |
| 420 | QVariant |
| 421 | BreakpointModel::headerData(int section, Qt::Orientation orientation, |
| 422 | int role) const |
| 423 | { |
| 424 | if (orientation == Qt::Vertical) |
| 425 | return QVariant(); |
| 426 | |
| 427 | if (role == Qt::DecorationRole ) { |
| 428 | if (section == 0) |
| 429 | return QIcon::fromTheme(QStringLiteral("dialog-ok-apply")); |
| 430 | else if (section == 1) |
| 431 | return QIcon::fromTheme(QStringLiteral("system-switch-user")); |
| 432 | } |
| 433 | |
| 434 | if (role == Qt::DisplayRole) { |
| 435 | if (section == 0 || section == 1) return QString(); |
| 436 | if (section == 2) return i18n("Type"); |
| 437 | if (section == 3) return i18n("Location"); |
| 438 | if (section == 4) return i18n("Condition"); |
| 439 | } |
| 440 | |
| 441 | if (role == Qt::ToolTipRole) { |
| 442 | if (section == 0) return i18n("Active status"); |
| 443 | if (section == 1) return i18n("State"); |
| 444 | return headerData(section, orientation, Qt::DisplayRole); |
| 445 | |
| 446 | } |
| 447 | return QVariant(); |
| 448 | } |
| 449 | |
| 450 | Qt::ItemFlags BreakpointModel::flags(const QModelIndex &index) const |
| 451 | { |