MCPcopy Create free account
hub / github.com/KDAB/GammaRay / data

Method data

plugins/sysinfo/sysinfomodel.cpp:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73QVariant SysInfoModel::data(const QModelIndex &index, int role) const
74{
75 if (!index.isValid())
76 return QVariant();
77
78 if (role == Qt::DisplayRole) {
79 switch (index.column()) {
80 case 0:
81 return sysInfoTable()[index.row()].name;
82 case 1:
83 return sysInfoTable()[index.row()].func();
84 }
85 }
86
87 return QVariant();
88}
89
90QVariant SysInfoModel::headerData(int section, Qt::Orientation orientation, int role) const
91{

Callers 1

paintMethod · 0.45

Calls 4

columnMethod · 0.80
rowMethod · 0.80
QVariantClass · 0.50
isValidMethod · 0.45

Tested by

no test coverage detected