| 71 | } |
| 72 | |
| 73 | QVariant 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 | |
| 90 | QVariant SysInfoModel::headerData(int section, Qt::Orientation orientation, int role) const |
| 91 | { |