MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / scrollTo

Method scrollTo

launcher/ui/instanceview/InstanceView.cpp:1004–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004void InstanceView::scrollTo(const QModelIndex& index, ScrollHint hint)
1005{
1006 if (!index.isValid())
1007 return;
1008
1009 const QRect rect = visualRect(index);
1010 if (hint == EnsureVisible && viewport()->rect().contains(rect)) {
1011 viewport()->update(rect);
1012 return;
1013 }
1014
1015 verticalScrollBar()->setValue(verticalScrollToValue(index, rect, hint));
1016}
1017
1018int InstanceView::verticalScrollToValue([[maybe_unused]] const QModelIndex& index, const QRect& rect, QListView::ScrollHint hint) const
1019{

Callers 5

VersionSelectWidgetMethod · 0.80
selectCurrentMethod · 0.80
selectRecommendedMethod · 0.80
delayed_scrollMethod · 0.80
delayed_scrollMethod · 0.80

Calls 5

rectMethod · 0.80
setValueMethod · 0.80
isValidMethod · 0.45
containsMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected