| 19 | } |
| 20 | |
| 21 | QVariant AeqMeasurementModel::data(const QModelIndex &index, int role) const |
| 22 | { |
| 23 | if (!index.isValid()) |
| 24 | return QVariant(); |
| 25 | |
| 26 | if(role == Qt::ItemDataRole::UserRole) |
| 27 | return QVariant::fromValue(items.at(index.row())); |
| 28 | else if (role == Qt::ItemDataRole::DisplayRole) |
| 29 | return items.at(index.row()).name; |
| 30 | else |
| 31 | return QVariant(); |
| 32 | } |
no test coverage detected