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

Method childAt

launcher/ui/instanceview/AccessibleInstanceView.cpp:363–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363QAccessibleInterface* AccessibleInstanceView::childAt(int x, int y) const
364{
365 QPoint viewportOffset = view()->viewport()->mapTo(view(), QPoint(0, 0));
366 QPoint indexPosition = view()->mapFromGlobal(QPoint(x, y) - viewportOffset);
367 // FIXME: if indexPosition < 0 in one coordinate, return header
368
369 QModelIndex index = view()->indexAt(indexPosition);
370 if (index.isValid()) {
371 return child(logicalIndex(index));
372 }
373 return 0;
374}
375
376int AccessibleInstanceView::childCount() const
377{

Callers

nothing calls this directly

Calls 2

indexAtMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected