/* * 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_ADDRESSBAR_H #define SMOLBOTE_ADDRESSBAR_H #include #include class QWebEngineView; class UrlLineEdit; class QProgressBar; class QMenu; class AddressBar : public QWidget { Q_OBJECT public: AddressBar(const QHash &config, QWidget *parent = nullptr); ~AddressBar() override; signals: void complete(const QString &term, std::function callback); void search(const QString &term); public slots: void setView(QWebEngineView *view); void setPageMenu(QMenu *menu); void setToolsMenu(QMenu *menu); private: UrlLineEdit *urlBar; QProgressBar *progressBar; QMetaObject::Connection urlChangedConnection, loadUrlConnection; QMetaObject::Connection progressBarConnection; }; #endif // SMOLBOTE_ADDRESSBAR_H