24 #include <KLocalizedString> 36 const QString &command,
37 const QKeySequence &shortcut,
39 :
Kwave::
MenuNode(parent, name, command, shortcut, uid), m_menu(menu)
43 if (act) act->setText(i18nc(
UTF8(
_(
"menu: ") +
path()),
UTF8(name)));
68 m_menu->setVisible(visible);
105 if (!menu)
return Q_NULLPTR;
110 if (!sub)
return Q_NULLPTR;
123 Q_ASSERT(name.length());
125 if (!name.length() || !
m_menu)
return Q_NULLPTR;
130 if (!item)
return Q_NULLPTR;
139 QListIterator<Kwave::MenuNode *> it(
m_children);
141 while (!found && it.hasPrevious()) {
143 if (!child)
continue;
144 if (uid.length() && ((uid == child->
uid()) || (uid == child->
name())))
150 insertChild(item, (found) ? child_after : Q_NULLPTR);
152 QAction *action_after = (found && child_after) ?
153 child_after->
action() : Q_NULLPTR;
165 QAction *act = (child) ? child->
action() : Q_NULLPTR;
174 Q_ASSERT(command.length());
175 if (!command.length())
return false;
177 if (command.startsWith(
_(
"#exclusive"))) {
179 }
else if (command.startsWith(
_(
"#separator"))) {