11QAndroidPlatformMenuBar::QAndroidPlatformMenuBar()
14 QtAndroidMenu::addMenuBar(
this);
25 m_menus.insert(std::find(m_menus.begin(),
27 static_cast<QAndroidPlatformMenu *>(before)),
28 static_cast<QAndroidPlatformMenu *>(menu));
29 m_menuHash.insert(m_nextMenuId++, menu);
35 m_menus.erase(std::find(m_menus.begin(),
37 static_cast<QAndroidPlatformMenu *>(menu)));
40 QHash<
int, QPlatformMenu *>::iterator it = m_menuHash.begin();
41 while (it != m_menuHash.end()) {
42 if (it.value() == menu) {
43 it = m_menuHash.erase(it);
45 maxId = qMax(maxId, it.key());
50 m_nextMenuId = maxId + 1;
55 QHash<
int, QPlatformMenu *>::const_iterator it;
56 for (it = m_menuHash.constBegin(); it != m_menuHash.constEnd(); ++it) {
57 if (it.value() == menu)
71 if (m_parentWindow == newParentWindow)
73 m_parentWindow = newParentWindow;
79 for (QAndroidPlatformMenu *menu : m_menus) {
80 if (menu->tag() == tag)
89 return m_menuHash.value(menuId);
94 return m_parentWindow;
104 return &m_menusListMutex;
Combined button and popup list for selecting options.
void removeMenuBar(QAndroidPlatformMenuBar *menuBar)
void syncMenu(QAndroidPlatformMenu *)
void setMenuBar(QAndroidPlatformMenuBar *menuBar, QWindow *window)