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

Method indexAt

launcher/ui/instanceview/InstanceView.cpp:763–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763QModelIndex InstanceView::indexAt(const QPoint &point) const
764{
765 const_cast<InstanceView*>(this)->executeDelayedItemsLayout();
766
767 for (int i = 0; i < model()->rowCount(); ++i)
768 {
769 QModelIndex index = model()->index(i, 0);
770 if (visualRect(index).contains(point))
771 {
772 return index;
773 }
774 }
775 return QModelIndex();
776}
777
778void InstanceView::setSelection(const QRect &rect, const QItemSelectionModel::SelectionFlags commands)
779{

Callers 2

childAtMethod · 0.80

Calls 4

QModelIndexClass · 0.85
rowCountMethod · 0.45
indexMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected