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