/* * 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/smolbote.hg * * SPDX-License-Identifier: GPL-3.0 */ #ifndef SMOLBOTE_BROWSER_H #define SMOLBOTE_BROWSER_H #include "singleapplication.h" #include #include #include #include #include QVector loadPlugins(const QString &location); class Configuration; class BookmarksWidget; class DownloadsWidget; class UrlRequestInterceptor; class MainWindow; class Browser : public SingleApplication { Q_OBJECT public: explicit Browser(int &argc, char *argv[]); ~Browser() final; Q_DISABLE_COPY(Browser) void setConfiguration(std::shared_ptr &config); void setup(const QString &defaultProfile); int command(const QString &command); QStringList commands() const { return m_commands.keys(); } public slots: void createSession(const QString &profileName, bool newWindow, const QStringList &urls); MainWindow *createWindow(); private: std::shared_ptr m_config; std::shared_ptr m_bookmarks; std::shared_ptr m_downloads; std::shared_ptr m_urlFilter; QVector m_windows; QVector m_plugins; QHash> m_commands; }; #endif // SMOLBOTE_BROWSER_H