MCPcopy Create free account
hub / github.com/KDE/kdevelop / headerData

Method headerData

kdevplatform/debugger/breakpoint/breakpointmodel.cpp:420–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418
419
420QVariant
421BreakpointModel::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
450Qt::ItemFlags BreakpointModel::flags(const QModelIndex &index) const
451{

Callers

nothing calls this directly

Calls 2

QVariantClass · 0.70
QStringClass · 0.50

Tested by

no test coverage detected