Commit 481b40e7 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

add removeMenu in dtkWidgetsMenu

parent 7f0060f0
......@@ -149,6 +149,15 @@ void dtkWidgetsMenu::removeItem(dtkWidgetsMenuItem *item)
d->object_list.removeAll(item);
}
void dtkWidgetsMenu::removeMenu(dtkWidgetsMenu *menu)
{
if (menu && d->object_hash.contains(menu->title())) {
d->object_hash.remove(menu->title());
d->object_list.removeAll(menu);
d->menu_list.removeAll(menu);
}
}
QString dtkWidgetsMenu::title(void) const
{
return d->title;
......
......@@ -60,7 +60,8 @@ public:
dtkWidgetsMenuItem *addParameter(const QString&, dtkCoreParameter *, const QString& representation);
void removeItem(dtkWidgetsMenuItem *item);
void removeMenu(dtkWidgetsMenu *menu);
#pragma mark -
public slots:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment