open_iA 2024.9
Loading...
Searching...
No Matches
iAQMenuHelper.h File Reference
#include "iaguibase_export.h"

Functions

iAguibase_API void addToMenuSorted (QMenu *menu, QAction *action)
 Add a given action to a menu, such that the (previously sorted) menu stays alphabetically sorted.
 
iAguibase_API QMenu * getOrAddSubMenu (QMenu *parentMenu, QString const &title, bool addSeparator=false)
 Search in the given menu for a menu with the given title; if it doesn't exist, add it (alphabetically sorted).
 

Function Documentation

◆ addToMenuSorted()

iAguibase_API void addToMenuSorted ( QMenu * menu,
QAction * action )

Add a given action to a menu, such that the (previously sorted) menu stays alphabetically sorted.

◆ getOrAddSubMenu()

iAguibase_API QMenu * getOrAddSubMenu ( QMenu * parentMenu,
QString const & title,
bool addSeparator = false )

Search in the given menu for a menu with the given title; if it doesn't exist, add it (alphabetically sorted).