diff --git a/qucs/qucs/qucs.h b/qucs/qucs/qucs.h index 780e5e4563..549c57976b 100644 --- a/qucs/qucs/qucs.h +++ b/qucs/qucs/qucs.h @@ -115,6 +115,8 @@ struct tQucsSettings { bool IgnoreFutureVersion; bool GraphAntiAliasing; bool TextAntiAliasing; + //shortcut + QVector* > > Shortcut; }; // extern because nearly everywhere used @@ -125,6 +127,8 @@ extern VersionTriplet QucsVersion; extern QucsApp *QucsMain; // the Qucs application itself // TODO move these inside the QucsApp class? +void setDefaultShortcut(); +void clearShortcutMap(); bool loadSettings(); bool saveApplSettings(); diff --git a/qucs/qucs/qucs_init.cpp b/qucs/qucs/qucs_init.cpp index a3f30fcdb4..b87a511fae 100644 --- a/qucs/qucs/qucs_init.cpp +++ b/qucs/qucs/qucs_init.cpp @@ -44,6 +44,7 @@ setDefaultShortcut() QMap *filemap = new QMap; filemap->insert("New", QString(QKeySequence(Qt::CTRL+Qt::Key_N))); filemap->insert("New Text", QString(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_V))); + filemap->insert("Stand-alone Document", QString(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_H))); filemap->insert("Open", QString(QKeySequence(Qt::CTRL+Qt::Key_O))); filemap->insert("Close", QString(QKeySequence(Qt::CTRL+Qt::Key_W))); filemap->insert("Save", QString(QKeySequence(Qt::CTRL+Qt::Key_S))); @@ -181,7 +182,7 @@ QucsApp::slotSetAllShortcut() fileNew ->setShortcut(QKeySequence(map->value("New"))); textNew ->setShortcut(QKeySequence(map->value("New Text"))); - fileNewNoDD ->setShortcut(QKeySequence(map->value(New stand-alone schematic or data display))); + fileNewNoDD ->setShortcut(QKeySequence(map->value("Stand-alone Document"))); fileOpen ->setShortcut(QKeySequence(map->value("Open"))); fileClose ->setShortcut(QKeySequence(map->value("Close"))); fileSave ->setShortcut(QKeySequence(map->value("Save")));