bool ActionManager::initWithApp(IApplication *app) { if (!IActionManager::initWithApp(app)) { return false; } insertMenu(ID_MENU_FILE,tr("&File")); insertMenu(ID_MENU_RECENT,tr("&Recent")); insertMenu(ID_MENU_EDIT,tr("&Edit")); insertMenu(ID_MENU_FIND,tr("F&ind")); m_viewMenu = insertMenu(ID_MENU_VIEW,tr("&View")); m_viewMenu->addSeparator(); m_baseToolBarAct = m_viewMenu->addSeparator(); m_baseBrowserAct = m_viewMenu->addSeparator(); m_viewMenu->addSeparator(); insertMenu(ID_MENU_TOOLS,tr("&Tools")); insertMenu(ID_MENU_BUILD,tr("&Build")); insertMenu(ID_MENU_DEBUG,tr("&Debug")); insertMenu(ID_MENU_HELP,tr("&Help")); QToolBar *stdToolBar = insertToolBar(ID_TOOLBAR_STD,tr("Standard Toolbar")); insertViewMenu(LiteApi::ViewMenuToolBarPos,stdToolBar->toggleViewAction()); return true; }
bool ActionManager::initWithApp(IApplication *app) { if (!IActionManager::initWithApp(app)) { return false; } insertMenu("menu/file",tr("&File")); insertMenu("menu/recent",tr("&Recent")); insertMenu("menu/edit",tr("&Edit")); insertMenu("menu/find",tr("F&ind")); m_viewMenu = insertMenu("menu/view",tr("&View")); m_viewToolMenu = m_viewMenu->addMenu(tr("Tool Windows")); m_viewMenu->addSeparator(); m_baseToolBarAct = m_viewMenu->addSeparator(); m_baseBrowserAct = m_viewMenu->addSeparator(); m_viewMenu->addSeparator(); insertMenu("menu/help",tr("&Help")); QToolBar *stdToolBar = insertToolBar("toolbar/std",tr("Standard Toolbar")); insertViewMenu(LiteApi::ViewMenuToolBarPos,stdToolBar->toggleViewAction()); return true; }