| 68 | } |
| 69 | |
| 70 | QPair<int, int> VisualGroup::positionOf(const QModelIndex &index) const |
| 71 | { |
| 72 | int y = 0; |
| 73 | for (auto & row: rows) |
| 74 | { |
| 75 | for(auto x = 0; x < row.items.size(); x++) |
| 76 | { |
| 77 | if(row.items[x] == index) |
| 78 | { |
| 79 | return qMakePair(x,y); |
| 80 | } |
| 81 | } |
| 82 | y++; |
| 83 | } |
| 84 | qWarning() << "Item" << index.row() << index.data(Qt::DisplayRole).toString() << "not found in visual group" << text; |
| 85 | return qMakePair(0, 0); |
| 86 | } |
| 87 | |
| 88 | int VisualGroup::rowTopOf(const QModelIndex &index) const |
| 89 | { |
no test coverage detected