]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/windows/BrowserWindow.h
Implement finding of text withing a page.
[PrivacyBrowserPC.git] / src / windows / BrowserWindow.h
index f4dc071e5f4c597c245f270e1dcf484fed09dbab..4c043d2e8f4717b13e4dba0193ba8e7225d3064c 100644 (file)
 #define BROWSERWINDOW_H
 
 // Application headers.
-#include "views/BrowserView.h"
+#include "widgets/TabWidget.h"
 
 // KDE Frameworks headers.
 #include <KConfigDialog>
+#include <KToggleFullScreenAction>
 #include <KXmlGuiWindow>
 
 // Qt toolkit headers.
+#include <QComboBox>
 #include <QLabel>
+#include <QProgressBar>
 
 class BrowserWindow : public KXmlGuiWindow
 {
@@ -37,25 +40,80 @@ class BrowserWindow : public KXmlGuiWindow
 
 public:
     // The default constructor.
-    BrowserWindow();
+    BrowserWindow(bool firstWindow=true);
+
+    // The public functions.
+    QSize sizeHint() const override;
+
+    // The public variables.
+    TabWidget *tabWidgetPointer;
 
 private Q_SLOTS:
     // The private slots.
+    void addOrEditDomainSettings() const;
+    void back() const;
+    void clearUrlLineEditFocus() const;
+    void escape() const;
     void fileNew() const;
+    void findNext() const;
+    void findPrevious() const;
+    void focusFindLineEdit() const;
+    void forward() const;
+    void fullScreenRequested(const bool toggleOn);
     void getZoomFactorFromUser();
-    void settingsConfigure();
-    void updateOnTheFlySearchEngine(const QString &searchEngine) const;
-    void updateOnTheFlyUserAgent(const QString &userAgent) const;
-    void updateOnTheFlyZoomFactor(const double &zoomFactor);
+    void home() const;
+    void loadUrlFromLineEdit(const QString &url) const;
+    void refresh() const;
+    void showCookiesDialog();
+    void showDownloadLocationBrowseDialog() const;
+    void showDomainSettingsDialog() const;
+    void showProgressBar(const int &progress) const;
+    void showSettingsDialog();
+    void toggleDomStorage() const;
+    void toggleFindCaseSensitive() const;
+    void toggleJavaScript() const;
+    void toggleLocalStorage() const;
+    void toggleFullScreen();
+    void updateCookiesAction(const int numberOfCookies) const;
+    void updateDomStorageAction(const bool &isEnabled) const;
+    void updateDomainSettingsIndicator(const bool status);
+    void updateFindText(const QString &text, const bool findCaseSensitive) const;
+    void updateFindTextResults(const QWebEngineFindTextResult &findTextResult) const;
+    void updateJavaScriptAction(const bool &isEnabled);
+    void updateLocalStorageAction(const bool &isEnabled);
+    void updateSearchEngineActions(const QString &searchEngine, const bool &updateCustomSearchEngineStatus);
+    void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus);
+    void updateZoomFactorAction(const double &zoomFactor);
     void updateSearchEngineLabel(const QString &searchEngineString) const;
-    void updateStatusBar(const QString &statusBarMessage) const;
+    void updateUrlLineEdit(const QUrl &newUrl);
     void updateUserAgentLabel(const QString &userAgentDatabaseName) const;
+    void updateWindowTitle(const QString &title);
 
 private:
     // The private variables.
-    BrowserView *browserViewPointer;
+    KConfigDialog *configDialogPointer;
+    QAction *cookiesActionPointer;
+    QUrl currentUrl;
     double currentZoomFactor;
+    bool customSearchEngineEnabled;
+    bool customUserAgentEnabled;
+    QAction *domStorageActionPointer;
+    QComboBox *downloadLocationComboBoxPointer;
+    QAction *findCaseSensitiveActionPointer;
+    QLabel *findTextLabelPointer;
+    KLineEdit *findTextLineEditPointer;
+    KToggleFullScreenAction *fullScreenActionPointer;
+    QAction *javaScriptActionPointer;
+    bool javaScriptEnabled;
+    QAction *localStorageActionPointer;
+    bool localStorageEnabled;
+    KToolBar *navigationToolBarPointer;
+    QPalette negativeBackgroundPalette;
+    QPalette normalBackgroundPalette;
+    QPalette positiveBackgroundPalette;
+    QProgressBar *progressBarPointer;
     QLabel *searchEngineLabelPointer;
+    QAction *searchEngineMenuActionPointer;
     QAction *searchEngineMojeekActionPointer;
     QAction *searchEngineMonoclesActionPointer;
     QAction *searchEngineMetagerActionPointer;
@@ -64,7 +122,9 @@ private:
     QAction *searchEngineYahooActionPointer;
     QAction *searchEngineCustomActionPointer;
     QLabel *userAgentLabelPointer;
+    QAction *userAgentMenuActionPointer;
     QAction *userAgentPrivacyBrowserActionPointer;
+    QAction *userAgentWebEngineDefaultActionPointer;
     QAction *userAgentFirefoxLinuxActionPointer;
     QAction *userAgentChromiumLinuxActionPointer;
     QAction *userAgentFirefoxWindowsActionPointer;
@@ -72,7 +132,8 @@ private:
     QAction *userAgentEdgeWindowsActionPointer;
     QAction *userAgentSafariMacosActionPointer;
     QAction *userAgentCustomActionPointer;
+    KLineEdit *urlLineEditPointer;
+    KToolBar *urlToolBarPointer;
     QAction *zoomFactorActionPointer;
-    KConfigDialog *configDialogPointer;
 };
 #endif