open_iA 2024.9
Loading...
Searching...
No Matches
iAQMenuHelper.cpp File Reference
#include "iAQMenuHelper.h"
#include <QMenu>

Functions

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

Function Documentation

◆ addToMenuSorted()

void addToMenuSorted ( QMenu * menu,
QAction * action )

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

◆ getOrAddSubMenu()

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

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