diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-11-19 18:22:36 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-11-19 18:22:36 +0200 |
commit | 1bc1ae8cd09851faa05345f5a6b105b02fe75dd2 (patch) | |
tree | 4fd33c0f8c79157031defd9f87f0dee4331b85de /src/browser.h | |
parent | Remove updater (diff) | |
download | smolbote-1bc1ae8cd09851faa05345f5a6b105b02fe75dd2.tar.xz |
Drop args.hxx dependency
Replace args.hxx with QCommandLineParser.
Diffstat (limited to 'src/browser.h')
-rw-r--r-- | src/browser.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/browser.h b/src/browser.h index 69cf804..8e443fe 100644 --- a/src/browser.h +++ b/src/browser.h @@ -1,7 +1,7 @@ /* * 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: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote + * location: https://neueland.iserlohn-fortress.net/cgit/smolbote * * SPDX-License-Identifier: GPL-3.0 */ @@ -37,26 +37,32 @@ public: return qAsConst(m_windows); } - BookmarksWidget *bookmarks() const + [[deprecated]] BookmarksWidget *bookmarks() const { return m_bookmarks.get(); } - DownloadsWidget *downloads() const + [[deprecated]] DownloadsWidget *downloads() const { return m_downloads.get(); } + bool remoteEnabled() const + { + return static_cast<bool>(remoteConnection); + } signals: void pluginAdded(QPluginLoader *); public slots: - void about(); - void aboutPlugins(); + [[deprecated]] void about(); + [[deprecated]] void aboutPlugins(); - void showWidget(QWidget *widget, MainWindow *where) const; + [[deprecated]] void showWidget(QWidget *widget, MainWindow *where) const; void open(const QVector<Session::MainWindow> &data, bool merge = true); + void loadConfiguration(const QString &path); bool loadPlugin(const QString &path); + void enableRemote(bool toggle); private: struct PluginInfo { @@ -77,6 +83,8 @@ private: Q_DISABLE_COPY(Browser) + QMetaObject::Connection remoteConnection; + std::unique_ptr<Configuration> m_conf; std::shared_ptr<BookmarksWidget> m_bookmarks; std::unique_ptr<DownloadsWidget> m_downloads; std::unique_ptr<WebProfileManager<false>> m_profileManager{ nullptr }; |