MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / AddSelectionEntry

Function AddSelectionEntry

lib/utils/selection-helpers.cpp:318–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void AddSelectionEntry(QComboBox *sel, const char *description, bool selectable,
319 const char *tooltip)
320{
321 sel->insertItem(0, description);
322
323 if (strcmp(tooltip, "") != 0) {
324 sel->setItemData(0, tooltip, Qt::ToolTipRole);
325 }
326
327 QStandardItemModel *model =
328 qobject_cast<QStandardItemModel *>(sel->model());
329 QModelIndex firstIndex =
330 model->index(0, sel->modelColumn(), sel->rootModelIndex());
331 QStandardItem *firstItem = model->itemFromIndex(firstIndex);
332 if (!selectable) {
333 firstItem->setSelectable(false);
334 firstItem->setEnabled(false);
335 }
336}
337
338void AddSelectionGroup(QComboBox *selection, const QStringList &group,
339 bool addSeparator)

Callers 13

PopulateWindowSelectionFunction · 0.85
PopulateAudioSelectionFunction · 0.85
PopulateVideoSelectionFunction · 0.85
PopulateMediaSelectionFunction · 0.85
PopulateProcessSelectionFunction · 0.85
PopulateSceneSelectionFunction · 0.85
MidiDeviceSelectionMethod · 0.85
populateHotkeyNamesFunction · 0.85

Calls 1

modelMethod · 0.80

Tested by

no test coverage detected