MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / positionOf

Method positionOf

launcher/ui/instanceview/VisualGroup.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94QPair<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
109int VisualGroup::rowTopOf(const QModelIndex& index) const
110{

Callers 2

geometryRectMethod · 0.80
moveCursorMethod · 0.80

Calls 3

sizeMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected