X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fmainview.h;h=ee82d79085ec91f1334f68f34626b667bf159123;hp=6b9e6ca8657f93405100422e43c54cc1a50ebfa7;hb=1cbda7a594e97dd3ba6e1c0675be6ec9f6a424b2;hpb=153c5c0d60eaf3185cb4419032fb0fdaeb78907c diff --git a/src/mainview.h b/src/mainview.h index 6b9e6ca..ee82d79 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -1,45 +1,62 @@ /* - 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 . + * + * This file is part of 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 . + */ #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(); + // Define the public slots. + void applyApplicationSettings(); + void applyDomainSettings(); + +private Q_SLOTS: + // Define the private slots. + void goHome(); + void loadUrl(const QString &urlFromUser); + void pageLinkHovered(const QString &linkUrl); + void toggleJavaScript(); + 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; + QPushButton *javaScriptButtonPointer; + KLineEdit *urlLineEditPointer; + QWebEngineHistory *webEngineHistoryPointer; + QWebEngineSettings *webEngineSettingsPointer; + QWebEngineView *webEngineViewPointer; }; - #endif