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

Method setSelection

launcher/ui/instanceview/InstanceView.cpp:778–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778void InstanceView::setSelection(const QRect &rect, const QItemSelectionModel::SelectionFlags commands)
779{
780 executeDelayedItemsLayout();
781
782 for (int i = 0; i < model()->rowCount(); ++i)
783 {
784 QModelIndex index = model()->index(i, 0);
785 QRect itemRect = visualRect(index);
786 if (itemRect.intersects(rect))
787 {
788 selectionModel()->select(index, commands);
789 update(itemRect.translated(-offset()));
790 }
791 }
792}
793
794QPixmap InstanceView::renderToPixmap(const QModelIndexList &indices, QRect *r) const
795{

Callers

nothing calls this directly

Calls 2

rowCountMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected