diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-06-04 13:06:28 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-06-04 13:06:28 +0200 |
commit | 77a27e730b2e8baed2a8b954e4da5bb162d9d824 (patch) | |
tree | ae3f3b5e95df4d6eeb70cccbd6ac7ea5fe4240cf /src/browser.h | |
parent | Adding plugin action to the menu bar (diff) | |
download | smolbote-77a27e730b2e8baed2a8b954e4da5bb162d9d824.tar.xz |
Browser class refactoring
Diffstat (limited to 'src/browser.h')
-rw-r--r-- | src/browser.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/browser.h b/src/browser.h index 2c30bcc..75102c6 100644 --- a/src/browser.h +++ b/src/browser.h @@ -21,11 +21,10 @@ #ifndef BROWSER_H #define BROWSER_H -#include <QApplication> +#include "singleapplication.h" #include <QVector> #include "forms/bookmarkswidget.h" #include "forms/downloadswidget.h" -#include <QLocalServer> #include "settings.h" #include <QNetworkAccessManager> #include "webengine/webengineprofile.h" @@ -38,7 +37,7 @@ #define sNetwork Browser::instance()->network() class MainWindow; -class Browser : public QApplication +class Browser : public SingleApplication { Q_OBJECT @@ -48,7 +47,9 @@ public: QString applicationLongVersion() const; - bool prepare(QStringList urls); + void setConfigPath(const QString &path); + void loadPlugins(); + void loadProfiles(); static Browser *instance(); @@ -58,24 +59,21 @@ public: DownloadsWidget *downloads(); BlockerManager *blocklists(); - void setConfigPath(const QString &path); - void addWindow(MainWindow* window); MainWindow *mainWindow(); WebEngineProfile *profile(const QString name); QStringList profiles(); - QObject *plugin(); + QObject *plugin(const QString name); + QStringList plugins(); public slots: + void addWindow(MainWindow* window); + void addWindow(const QStringList params); void removeWindow(MainWindow* window); -private slots: - void handleNewConnection(); - private: Settings *m_settings; - QLocalServer *m_localServer; QVector<MainWindow *> m_windows; QHash<QString, WebEngineProfile *> m_profiles; |