2022-07-05 17:42:45 +00:00
|
|
|
#include <LibCore/Forward.h>
|
2022-07-05 04:53:11 +00:00
|
|
|
#include <QIcon>
|
2022-07-03 19:26:51 +00:00
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QToolBar>
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class WebView;
|
|
|
|
|
|
|
|
class BrowserWindow : public QMainWindow {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-07-05 17:42:45 +00:00
|
|
|
explicit BrowserWindow(Core::EventLoop&);
|
2022-07-03 19:26:51 +00:00
|
|
|
|
|
|
|
WebView& view() { return *m_view; }
|
|
|
|
|
2022-07-05 17:42:45 +00:00
|
|
|
virtual void closeEvent(QCloseEvent*) override;
|
|
|
|
|
2022-07-03 19:26:51 +00:00
|
|
|
public slots:
|
|
|
|
void location_edit_return_pressed();
|
2022-07-04 00:11:58 +00:00
|
|
|
void page_title_changed(QString);
|
2022-07-05 04:53:11 +00:00
|
|
|
void page_favicon_changed(QIcon);
|
2022-07-03 19:26:51 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QToolBar* m_toolbar { nullptr };
|
|
|
|
QLineEdit* m_location_edit { nullptr };
|
|
|
|
WebView* m_view { nullptr };
|
2022-07-05 17:42:45 +00:00
|
|
|
Core::EventLoop& m_event_loop;
|
2022-07-03 19:26:51 +00:00
|
|
|
};
|