aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
deleted file mode 100644
index 79773d3..0000000
--- a/src/mainwindow.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * This file is part of smolbote. It's copyrighted by the contributors recorded
- * in the version control history of the file, available from its original
- * location: git://neueland.iserlohn-fortress.net/smolbote.git
- *
- * SPDX-License-Identifier: GPL-3.0
- */
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include "browser.h"
-#include "lib/navigation/navigationbutton.h"
-#include "webengine/webengineprofile.h"
-#include "widgets/loadingbar.h"
-#include "widgets/mainwindowtabbar.h"
-#include <QMainWindow>
-#include <QUrl>
-#include <interfaces.h>
-#include <memory>
-
-namespace Ui
-{
-class MainWindow;
-}
-
-class SearchForm;
-
-class Configuration;
-class BookmarksWidget;
-class DownloadsWidget;
-
-class MainWindowMenuBar;
-class UrlLineEdit;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
- friend class WebView;
- friend class SearchForm;
-
- friend class MainWindowMenuBar;
-
-public:
- explicit MainWindow(std::shared_ptr<Configuration> config, QWidget *parent = nullptr);
- Q_DISABLE_COPY(MainWindow)
- ~MainWindow() override;
-
- void addTabbedDock(Qt::DockWidgetArea area, QWidget *widget);
-
-public slots:
- void about();
- void showSettingsDialog();
-
- void newTab(const QUrl &url = QUrl(""));
- MainWindow *newWindow(const QUrl &url = QUrl(""));
-
- void setProfile(std::shared_ptr<WebEngineProfile> profile);
- WebEngineProfile *profile();
-
- void setBookmarksWidget(std::shared_ptr<BookmarksWidget> &widget);
- void setDownloadsWidget(std::shared_ptr<DownloadsWidget> &widget);
- void addPlugins(const QVector<Browser::Plugin> &plugins);
-
- void toggleFullscreen();
-
-protected:
- void closeEvent(QCloseEvent *event) override;
-
-private slots:
- void handleTabChanged(WebView *view);
- void handleTitleUpdated(const QString &title);
-
-private:
- Ui::MainWindow *ui;
- SearchForm *m_searchBox;
-
- MainWindowTabBar *tabBar;
- WebView *m_currentView;
-
- MainWindowMenuBar *menuBar;
-
- // navigation
- NavigationButton *m_backButton, *m_forwardButton, *m_reloadButton;
- UrlLineEdit *m_addressBar;
- LoadingBar *m_progressBar;
-
- bool m_tabBarAdded = false;
- std::shared_ptr<WebEngineProfile> m_profile;
- std::shared_ptr<Configuration> m_config;
- std::shared_ptr<BookmarksWidget> m_bookmarksWidget;
- std::shared_ptr<DownloadsWidget> m_downloadsWidget;
-};
-
-#endif // MAINWINDOW_H