| 92 | } |
| 93 | |
| 94 | QPair<int, int> VisualGroup::positionOf(const QModelIndex& index) const |
| 95 | { |
| 96 | int y = 0; |
| 97 | for (auto& row : rows) { |
| 98 | for (auto x = 0; x < row.items.size(); x++) { |
| 99 | if (row.items[x] == index) { |
| 100 | return qMakePair(x, y); |
| 101 | } |
| 102 | } |
| 103 | y++; |
| 104 | } |
| 105 | qWarning() << "Item" << index.row() << index.data(Qt::DisplayRole).toString() << "not found in visual group" << text; |
| 106 | return qMakePair(0, 0); |
| 107 | } |
| 108 | |
| 109 | int VisualGroup::rowTopOf(const QModelIndex& index) const |
| 110 | { |
no test coverage detected