]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/windows/BrowserWindow.cpp
Add the handbook.
[PrivacyBrowserPC.git] / src / windows / BrowserWindow.cpp
index effb0918b0faeca5b1bace2b017300e6dae7a1d7..f1dd59e3ea8b3bb8963130687c54d97e591df78e 100644 (file)
@@ -60,7 +60,7 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
 
     // Add the standard actions.
     KStandardAction::print(tabWidgetPointer, SLOT(print()), actionCollectionPointer);
-    KStandardAction::printPreview(tabWidgetPointer, SLOT(printPreview()), actionCollectionPointer);
+    QAction *printPreviewActionPointer = KStandardAction::printPreview(tabWidgetPointer, SLOT(printPreview()), actionCollectionPointer);
     KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollectionPointer);
     KStandardAction::redisplay(this, SLOT(refresh()), actionCollectionPointer);
     fullScreenActionPointer = KStandardAction::fullScreen(this, SLOT(toggleFullScreen()), this, actionCollectionPointer);
@@ -201,10 +201,50 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     // Create the key sequences.
     QKeySequence ctrlTKeySequence = QKeySequence(i18nc("The open new tab key sequence.", "Ctrl+T"));
     QKeySequence ctrlNKeySequence = QKeySequence(i18nc("The open new window key sequence.", "Ctrl+N"));
+    QKeySequence ctrlShiftPKeySequence = QKeySequence(i18nc("The print preview key sequence.", "Ctrl+Shift+P"));
+    QKeySequence ctrlAltPKeySequence = QKeySequence(i18nc("The Privacy Browser user agent key sequence.", "Ctrl+Alt+P"));
+    QKeySequence ctrlAltWKeySequence = QKeySequence(i18nc("The WebEngine Default user agent key sequence.", "Ctrl+Alt+W"));
+    QKeySequence ctrlAltFKeySequence = QKeySequence(i18nc("The Firefox on Linux user agent key sequence.", "Ctrl+Alt+F"));
+    QKeySequence ctrlAltCKeySequence = QKeySequence(i18nc("The Chromium on Linux user agent key sequence.", "Ctrl+Alt+C"));
+    QKeySequence ctrlAltShiftFKeySequence = QKeySequence(i18nc("The Firefox on Windows user agent key sequence.", "Ctrl+Alt+Shift+F"));
+    QKeySequence ctrlAltShiftCKeySequence = QKeySequence(i18nc("The Chrome on Windows user agent key sequence.", "Ctrl+Alt+Shift+C"));
+    QKeySequence ctrlAltEKeySequence = QKeySequence(i18nc("The Edge on Windows user agent key sequence.", "Ctrl+Alt+E"));
+    QKeySequence ctrlAltSKeySequence = QKeySequence(i18nc("The Safari on macOS user agent key sequence.", "Ctrl+Alt+S"));
+    QKeySequence altShiftCKeySequence = QKeySequence(i18nc("The custom user agent key sequence.", "Alt+Shift+C"));
+    QKeySequence ctrlAltZKeySequence = QKeySequence(i18nc("The zoom factor key sequence.", "Ctrl+Alt+Z"));
+    QKeySequence ctrlShiftMKeySequence = QKeySequence(i18nc("The Mojeek search engine key sequence.", "Ctrl+Shift+M"));
+    QKeySequence ctrlShiftOKeySequence = QKeySequence(i18nc("The Monocles search engine key sequence.", "Ctrl+Shift+O"));
+    QKeySequence ctrlShiftEKeySequence = QKeySequence(i18nc("The MetaGer search engine key sequence.", "Ctrl+Shift+E"));
+    QKeySequence ctrlShiftGKeySequence = QKeySequence(i18nc("The Google search engine key sequence.", "Ctrl+Shift+G"));
+    QKeySequence ctrlShiftBKeySequence = QKeySequence(i18nc("The Bing search engine key sequence.", "Ctrl+Shift+B"));
+    QKeySequence ctrlShiftYKeySequence = QKeySequence(i18nc("The Yahoo search engine key sequence.", "Ctrl+Shift+Y"));
+    QKeySequence ctrlShiftCKeySequence = QKeySequence(i18nc("The custom search engine key sequence.", "Ctrl+Shift+C"));
+    QKeySequence ctrlDKeySequence = QKeySequence(i18nc("The domain settings key sequence.", "Ctrl+D"));
+    QKeySequence ctrlSemicolonKeySequence = QKeySequence(i18nc("The cookies dialog key sequence.", "Ctrl+;"));
 
     // Set the action key sequences.
     newTabActionPointer->setShortcut(ctrlTKeySequence);
     newWindowActionPointer->setShortcut(ctrlNKeySequence);
+    printPreviewActionPointer->setShortcut(ctrlShiftPKeySequence);
+    userAgentPrivacyBrowserActionPointer->setShortcut(ctrlAltPKeySequence);
+    userAgentWebEngineDefaultActionPointer->setShortcut(ctrlAltWKeySequence);
+    userAgentFirefoxLinuxActionPointer->setShortcut(ctrlAltFKeySequence);
+    userAgentChromiumLinuxActionPointer->setShortcut(ctrlAltCKeySequence);
+    userAgentFirefoxWindowsActionPointer->setShortcut(ctrlAltShiftFKeySequence);
+    userAgentChromeWindowsActionPointer->setShortcut(ctrlAltShiftCKeySequence);
+    userAgentEdgeWindowsActionPointer->setShortcut(ctrlAltEKeySequence);
+    userAgentSafariMacosActionPointer->setShortcut(ctrlAltSKeySequence);
+    userAgentCustomActionPointer->setShortcut(altShiftCKeySequence);
+    zoomFactorActionPointer->setShortcut(ctrlAltZKeySequence);
+    searchEngineMojeekActionPointer->setShortcut(ctrlShiftMKeySequence);
+    searchEngineMonoclesActionPointer->setShortcut(ctrlShiftOKeySequence);
+    searchEngineMetagerActionPointer->setShortcut(ctrlShiftEKeySequence);
+    searchEngineGoogleActionPointer->setShortcut(ctrlShiftGKeySequence);
+    searchEngineBingActionPointer->setShortcut(ctrlShiftBKeySequence);
+    searchEngineYahooActionPointer->setShortcut(ctrlShiftYKeySequence);
+    searchEngineCustomActionPointer->setShortcut(ctrlShiftCKeySequence);
+    domainSettingsActionPointer->setShortcut(ctrlDKeySequence);
+    cookiesActionPointer->setShortcut(ctrlSemicolonKeySequence);
 
     // Execute the actions.
     connect(newTabActionPointer, SIGNAL(triggered()), tabWidgetPointer, SLOT(addTab()));
@@ -449,7 +489,7 @@ void BrowserWindow::escape() const
     }
     else if (!findTextLineEditPointer->text().isEmpty())  // Find text is populated.
     {
-        // Clear the text in the line edit.
+        // Clear the find text line edit.
         findTextLineEditPointer->clear();
 
         // Clear the search in the WebEngine.