| 21 | } |
| 22 | |
| 23 | QVariant PresetListModel::data(const QModelIndex &index, int role) const |
| 24 | { |
| 25 | if (!index.isValid()) |
| 26 | return QVariant(); |
| 27 | |
| 28 | switch(role) |
| 29 | { |
| 30 | case Qt::DisplayRole: |
| 31 | return presets.at(index.row()); |
| 32 | case Qt::UserRole: |
| 33 | return presets.at(index.row()); |
| 34 | default: |
| 35 | return QVariant(); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void PresetListModel::rescan() |
| 40 | { |