]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/mainview.h
Enable the forward and back mouse buttons.
[PrivacyBrowserPC.git] / src / mainview.h
index 6b9e6ca8657f93405100422e43c54cc1a50ebfa7..5e5535fba43fb741a9ca5fecdc89ea454cc3a544 100644 (file)
@@ -1,45 +1,53 @@
 /*
-    SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}>
-
-    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
-*/
+ * Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ *
+ * Privacy Browser PC is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser PC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef MAINVIEW_H
 #define MAINVIEW_H
 
+// Application headers.
 #include "ui_mainview.h"
 
-
-/**
- * This class serves as the main window for privacybrowserpc.  It handles the
- * menus, toolbars and status bars.
- *
- * @short Main window class
- * @author %{AUTHOR} <%{EMAIL}>
- * @version %{VERSION}
- */
 class MainView : public QWidget
 {
+    // Include the Q_OBJECT macro.
     Q_OBJECT
+
 public:
-    /**
-     * Default Constructor
-     */
+    // The primary contructor.
     explicit MainView(QWidget *parent);
 
-    /**
-     * Default Destructor
-     */
-    ~MainView() override;
+signals:
+    // Define the signals.
+    void linkHovered(const QString &linkUrl);
 
-public Q_SLOTS:
-    void switchColors();
-    void handleSettingsChanged();
+private Q_SLOTS:
+    // Define the private slots.
+    void loadUrl(const QString &urlFromUser);
+    void pageLinkHovered(const QString &linkUrl);
+    void updateInterface();
 
 private:
-    // this is the name of the root widget inside our Ui file
-    // you can rename it in designer and then change it here
-    Ui::MainView m_ui;
+    // Define the private variables.
+    QPushButton *backButtonPointer;
+    QPushButton *forwardButtonPointer;
+    KLineEdit *urlLineEditPointer;
+    QWebEngineHistory *webEngineHistoryPointer;
+    QWebEngineView *webEngineViewPointer;
 };
-
 #endif