void MenuBar::addEditMenu() { QMenu *m = new QMenu(Qrc::text("menubar.edit"), this); m->addAction(Qrc::text("menubar.edit.undo"), parent(), SLOT(onMenuBarEditUndo()), QKeySequence::Undo); m->addAction(Qrc::text("menubar.edit.redo"), parent(), SLOT(onMenuBarEditRedo()), QKeySequence::Redo); m->addSeparator(); m->addAction(Qrc::text("menubar.edit.cut"), parent(), SLOT(onMenuBarEditCut()), QKeySequence::Cut); m->addAction(Qrc::text("menubar.edit.copy"), parent(), SLOT(onMenuBarEditCopy()), QKeySequence::Copy); m->addAction(Qrc::text("menubar.edit.paste"), parent(), SLOT(onMenuBarEditPaste()), QKeySequence::Paste); m->addSeparator(); m->addAction(Qrc::text("menubar.edit.find"), parent(), SLOT(onMenuBarEditFind()), QKeySequence::Find); m->addAction(Qrc::text("menubar.edit.replace"), parent(), SLOT(onMenuBarEditReplace()), QKeySequence::Replace); m->addAction(Qrc::text("menubar.edit.goto"), parent(), SLOT(onMenuBarEditGoto())); m->addSeparator(); m->addAction(Qrc::text("menubar.edit.settings"), parent(), SLOT(onMenuBarEditSettings()), QKeySequence::Preferences); addAction(m->menuAction()); }
void MenuBar::addEditMenu() { QMenu *m = new QMenu(__("edit", "menubar"), this); m->addAction(__("undo", "menubar"), parent(), SLOT(onMenuBarEditUndo()), QKeySequence::Undo); m->addAction(__("redo", "menubar"), parent(), SLOT(onMenuBarEditRedo()), QKeySequence::Redo); m->addSeparator(); m->addAction(__("cut", "menubar"), parent(), SLOT(onMenuBarEditCut()), QKeySequence::Cut); m->addAction(__("copy", "menubar"), parent(), SLOT(onMenuBarEditCopy()), QKeySequence::Copy); m->addAction(__("paste", "menubar"), parent(), SLOT(onMenuBarEditPaste()), QKeySequence::Paste); m->addSeparator(); m->addAction(__("find", "menubar"), parent(), SLOT(onMenuBarEditFind()), QKeySequence::Find); m->addAction(__("replace", "menubar"), parent(), SLOT(onMenuBarEditReplace()), QKeySequence::Replace); m->addAction(__("goto", "menubar"), parent(), SLOT(onMenuBarEditGoto())); m->addSeparator(); m->addAction(__("settings", "menubar"), parent(), SLOT(onMenuBarEditSettings()), QKeySequence::Preferences); addAction(m->menuAction()); }
AS_NAMESPACE_START ToolBar::ToolBar(QWidget *p) : QToolBar(p) { addAction(Qrc::icon("toolbar_apk"), Qrc::text("toolbar.item.apk"), p, SLOT(onMenuBarFileOpenApk())); addAction(Qrc::icon("toolbar_dir"), Qrc::text("toolbar.item.dir"), p, SLOT(onMenuBarFileOpenDir())); addSeparator(); addAction(Qrc::icon("toolbar_save"), Qrc::text("toolbar.item.save"), p, SLOT(onMenuBarFileSave())); addSeparator(); addAction(Qrc::icon("toolbar_build"), Qrc::text("toolbar.item.build"), p, SLOT(onMenuBarProjectBuild())); addAction(Qrc::icon("toolbar_sign"), Qrc::text("toolbar.item.sign"), p, SLOT(onMenuBarProjectSignExport())); addSeparator(); addAction(Qrc::icon("toolbar_terminal"), Qrc::text("toolbar.item.terminal"), p, SLOT(onMenuBarFileTerminal())); addAction(Qrc::icon("toolbar_settings"), Qrc::text("toolbar.item.settings"), p, SLOT(onMenuBarEditSettings())); setObjectName("ToolBar"); }