foreach(const KSycocaEntry::Ptr &e, folder->entries(true, !m_showHidden, true, m_detailedMenuEntries && !m_detailedEntriesNamesFirst)) { if (e->isType(KST_KServiceGroup)) { KServiceGroup::Ptr g(KServiceGroup::Ptr::staticCast(e)); MenuFolderInfo *subFolderInfo = new MenuFolderInfo(); readMenuFolderInfo(subFolderInfo, g, folderInfo->fullId); folderInfo->add(subFolderInfo, true); } else if (e->isType(KST_KService)) { folderInfo->add(new MenuEntryInfo(KService::Ptr::staticCast(e)), true); } else if (e->isType(KST_KServiceSeparator)) { //folderInfo->add(m_separator, true); } }
TreeView *m_tree = new TreeView();
FindMenu()
m_tree->FindMenu(m_rootFolder, "/путь/где/находится/файл/с/пунктами/меню");
kde4_add_kdeinit_executable
kde4_add_kdeinit_executable( kmenu_test_2 ${mySources})
kde4_add_executable( kmenu_test_2 ${mySources})