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

Method visualRegionForSelection

launcher/ui/instanceview/InstanceView.cpp:805–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805QRegion InstanceView::visualRegionForSelection(const QItemSelection &selection) const
806{
807 QRegion region;
808 for (auto &range : selection)
809 {
810 int start_row = range.top();
811 int end_row = range.bottom();
812 for (int row = start_row; row <= end_row; ++row)
813 {
814 int start_column = range.left();
815 int end_column = range.right();
816 for (int column = start_column; column <= end_column; ++column)
817 {
818 QModelIndex index = model()->index(row, column, rootIndex());
819 region += visualRect(index); // OK
820 }
821 }
822 }
823 return region;
824}
825
826QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
827{

Callers

nothing calls this directly

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected