Commit 524f2db2 authored by LE BRETON Come's avatar LE BRETON Come

Adds convenience function to retrieve submenus in menus.

parent 7dc5f9fd
......@@ -153,6 +153,14 @@ QVector<dtkWidgetsMenu *> dtkWidgetsMenu::menus(void) const
return d->menu_list;
dtkWidgetsMenu * dtkWidgetsMenu::menu(const QString& id) const
return nullptr;
return dynamic_cast<dtkWidgetsMenu *>(d->object_hash[id]);
QObject *dtkWidgetsMenu::object(const QString& id)
......@@ -70,6 +70,8 @@ public:
QVector<dtkWidgetsMenu *> menus(void) const;
dtkWidgetsMenu *menu(const QString&) const;
QObject *object(const QString&);
QVector<QObject *> objects(void) const;
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