MCPcopy Create free account
hub / github.com/MultiMC/Launcher / setSelection

Method setSelection

launcher/ui/instanceview/InstanceView.cpp:735–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735void InstanceView::setSelection(const QRect &rect, const QItemSelectionModel::SelectionFlags commands)
736{
737 executeDelayedItemsLayout();
738
739 for (int i = 0; i < model()->rowCount(); ++i)
740 {
741 QModelIndex index = model()->index(i, 0);
742 QRect itemRect = visualRect(index);
743 if (itemRect.intersects(rect))
744 {
745 selectionModel()->select(index, commands);
746 update(itemRect.translated(-offset()));
747 }
748 }
749}
750
751QPixmap InstanceView::renderToPixmap(const QModelIndexList &indices, QRect *r) const
752{

Callers

nothing calls this directly

Calls 2

rowCountMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected