MCPcopy Create free account
hub / github.com/Entware/Entware / createEditor

Method createEditor

scripts/config/qconf.cc:246–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246QWidget *ConfigItemDelegate::createEditor(QWidget *parent,
247 const QStyleOptionViewItem &option,
248 const QModelIndex &index) const
249{
250 ConfigItem *item;
251
252 // Only the data column is editable
253 if (index.column() != dataColIdx)
254 return nullptr;
255
256 // You cannot edit invisible menus
257 item = static_cast<ConfigItem *>(index.internalPointer());
258 if (!item || !item->menu || !menu_is_visible(item->menu))
259 return nullptr;
260
261 return QStyledItemDelegate::createEditor(parent, option, index);
262}
263
264void ConfigItemDelegate::setModelData(QWidget *editor,
265 QAbstractItemModel *model,

Callers

nothing calls this directly

Calls 1

menu_is_visibleFunction · 0.85

Tested by

no test coverage detected