/*
- 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 default contructor.
explicit MainView(QWidget *parent);
- /**
- * Default Destructor
- */
- ~MainView() override;
-
-public Q_SLOTS:
- void switchColors();
- void handleSettingsChanged();
+private Q_SLOTS:
+ // Define the private slots.
+ void loadUrl(const QString &urlFromUser);
+ void updateUrlLineEdit();
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.
+ KLineEdit *urlLineEditPointer;
+ QWebEngineView *webEngineViewPointer;
};
-
#endif