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

Method updateGeometries

launcher/ui/instanceview/InstanceView.cpp:173–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void InstanceView::updateGeometries()
174{
175 geometryCache.clear();
176
177 QMap<LocaleString, VisualGroup*> cats;
178
179 for (int i = 0; i < model()->rowCount(); ++i) {
180 const QString groupName = model()->index(i, 0).data(InstanceViewRoles::GroupRole).toString();
181 if (!cats.contains(groupName)) {
182 VisualGroup* old = this->category(groupName);
183 if (old) {
184 auto cat = new VisualGroup(old);
185 cats.insert(groupName, cat);
186 cat->update();
187 } else {
188 auto cat = new VisualGroup(groupName, this);
189 if (fVisibility) {
190 cat->collapsed = fVisibility(groupName);
191 }
192 cats.insert(groupName, cat);
193 cat->update();
194 }
195 }
196 }
197
198 qDeleteAll(m_groups);
199 m_groups = cats.values();
200 updateScrollbar();
201 viewport()->update();
202}
203
204bool InstanceView::isIndexHidden(const QModelIndex& index) const
205{

Callers

nothing calls this directly

Calls 9

categoryMethod · 0.95
insertMethod · 0.80
clearMethod · 0.45
rowCountMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
indexMethod · 0.45
containsMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected