MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / childAt

Method childAt

launcher/ui/instanceview/AccessibleInstanceView.cpp:369–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

indexAtMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected