]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/MainView.h
Reapply domain settings when the host changes.
[PrivacyBrowserPC.git] / src / MainView.h
index f08975eb6f061375e8a75264df2a08267a56145b..17c189dee5842be8256c228492f1a5869c18ed47 100644 (file)
@@ -20,9 +20,6 @@
 #ifndef MAINVIEW_H
 #define MAINVIEW_H
 
-// Application headers.
-#include "UserAgentHelper.h"
-
 // Qt framework headers.
 #include <QPushButton>
 #include <QWebEngineHistory>
@@ -42,24 +39,25 @@ public:
     explicit MainView(QWidget *parent);
 
 signals:
-    // Define the signals.
-    void linkHovered(const QString &linkUrl);
+    // The signals.
+    void linkHovered(const QString &linkUrl) const;
 
 public Q_SLOTS:
-    // Define the public slots.
-    void applyApplicationSettings();
-    void applyDomainSettingsAndReload();
+    // The public slots.
+    void applyApplicationSettings() const;
+    void applyDomainSettingsAndReload() const;
+    void applyDomainSettingsWithoutReloading() const;
 
 private Q_SLOTS:
-    // Define the private slots.
-    void goHome();
-    void loadUrl(const QString &urlFromUser);
-    void pageLinkHovered(const QString &linkUrl);
-    void toggleJavaScript();
-    void updateInterface();
+    // The private slots.
+    void goHome() const;
+    void loadUrlFromTextBox(QString urlFromUser) const;
+    void pageLinkHovered(const QString &linkUrl) const;
+    void toggleJavaScript() const;
+    void updateInterface() const;
 
 private:
-    // Define the private variables.
+    // The private variables.
     QPushButton *backButtonPointer;
     QPushButton *forwardButtonPointer;
     QPushButton *javaScriptButtonPointer;
@@ -68,9 +66,8 @@ private:
     QWebEngineProfile *webEngineProfilePointer;
     QWebEngineSettings *webEngineSettingsPointer;
     QWebEngineView *webEngineViewPointer;
-    UserAgentHelper *userAgentHelperPointer;
 
-    // Define the private functions.
-    void applyDomainSettings(bool reloadWebsite);
+    // The private functions.
+    void applyDomainSettings(bool reloadWebsite) const;
 };
 #endif