Logo Search packages:      
Sourcecode: packagesearch version File versions

void PackageSearchImpl::addMenuEntry ( pair< QString, QAction * >  menuEntry  )  [protected]

Adds the given action (menuEntry.second) to the menu with the given name (menuEntry.first).

If the menu is not yet existent it will be created.

Parameters:
menuEntry 
  • menuEntry.first name of the menu the action will be added to
  • menuEntry.second action to be added

Definition at line 710 of file packagesearchimpl.cpp.

Referenced by addPlugin().

{
      if (menuEntry.first == "System")
      {
            menuEntry.second->addTo(_pSystemMenu);
      }
      else  // this is not exactly what I wanted, only to realize the problem later...
      {
            QPopupMenu* pMenu = new QPopupMenu();
            menuEntry.second->addTo(pMenu);
            menuBar()->insertItem(menuEntry.first, pMenu);
      }
}


Generated by  Doxygen 1.6.0   Back to index