| 58 | } |
| 59 | |
| 60 | QVariant Model::data(const QModelIndex &index, int role) const |
| 61 | { |
| 62 | if (role != Qt::DisplayRole || index.parent().isValid() || index.column() > 1 || index.row() >= m_data.count()) { |
| 63 | return QVariant(); |
| 64 | } |
| 65 | if (index.column() == 0) { |
| 66 | return index.row() * s_stepWidth; |
| 67 | } else { |
| 68 | return m_data.at(index.row()); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // slot |
| 73 | void Model::setFunction(Function f) |
no test coverage detected