adding keyboard shortcuts for menu items

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@36 b624d157-de02-0410-bad0-e51aec6abb33
master
matthiasmiller 19 years ago
parent 9c30c07438
commit 0bd327b0a7
  1. 22
      src/mainwindow.cpp

@ -60,6 +60,26 @@
KeepassMainWindow::KeepassMainWindow(QWidget *parent, Qt::WFlags flags):QMainWindow(parent,flags){
setupUi(this);
FileNewAction->setShortcut(tr("Ctrl+N"));
FileOpenAction->setShortcut(tr("Ctrl+O"));
FileSaveAction->setShortcut(tr("Ctrl+S"));
EditNewGroupAction->setShortcut(tr("Ctrl+G"));
EditPasswordToClipboardAction->setShortcut(tr("Ctrl+C"));
EditUsernameToClipboardAction->setShortcut(tr("Ctrl+B"));
EditOpenUrlAction->setShortcut(tr("Ctrl+U"));
EditNewEntryAction->setShortcut(tr("Ctrl+Y"));
EditEditEntryAction->setShortcut(tr("Ctrl+E"));
EditDeleteEntryAction->setShortcut(tr("Ctrl+D"));
EditCloneEntryAction->setShortcut(tr("Ctrl+K"));
EditSearchAction->setShortcut(tr("Ctrl+F"));
#ifdef Q_WS_MAC
FileCloseAction->setShortcut(tr("Ctrl+W"));
FileSaveAsAction->setShortcut(tr("Shift+Ctrl+S"));
EditGroupSearchAction->setShortcut(tr("Shift+Ctrl+F"));
#endif
QuickSearchEdit=new QLineEdit(toolBar);
QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
//QuickSearchEdit->
@ -611,4 +631,4 @@ return static_cast<GroupViewItem*>(GroupView->selectedItems()[0])->pGroup;
CEntry* KeepassMainWindow::currentEntry(){
Q_ASSERT(EntryView->selectedItems().size()==1);
return static_cast<EntryViewItem*>(EntryView->selectedItems()[0])->pEntry;
}
}