11 std::function<
void(
const MemoryID&,
const actions::ActionPath&)> func) :
19 auto* menu =
new QMenu(
"Actions", parent);
23 addMenuEntry(menu, {}, entry);
30 ActionsMenuBuilder::addMenuEntry(
32 actions::ActionPath path,
35 path.push_back(entry.
id);
38 menu->addAction(QString::fromStdString(entry.
text),
40 [
this, path]() { func(memoryID, path); });
44 QMenu* qSubmenu = menu->addMenu(QString::fromStdString(entry.
text));
45 for (
const auto& subEntry : entry.
entries)
47 addMenuEntry(qSubmenu, path, subEntry);