예제 #1
0
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());
}
예제 #2
0
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());
}