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

Method execWithSelection

launcher/ui/dialogs/IconPickerDialog.cpp:138–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138int IconPickerDialog::execWithSelection(QString selection)
139{
140 auto list = APPLICATION->icons();
141 auto contentsWidget = ui->iconView;
142 selectedIconKey = selection;
143
144 int index_nr = list->getIconIndex(selection);
145 auto model_index = list->index(index_nr);
146 contentsWidget->selectionModel()->select(model_index, QItemSelectionModel::Current | QItemSelectionModel::Select);
147
148 QMetaObject::invokeMethod(this, "delayed_scroll", Qt::QueuedConnection, Q_ARG(QModelIndex, model_index));
149 return QDialog::exec();
150}
151
152void IconPickerDialog::delayed_scroll(QModelIndex model_index)
153{

Callers 3

on_iconButton_clickedMethod · 0.80
on_iconButton_clickedMethod · 0.80

Calls 3

iconsMethod · 0.80
getIconIndexMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected