mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
Ladybird: Expanded toolbar with browser history and home button
This patch takes the browser history code from the Serenity browser and wires it up to the QT interface. This is tied in with a few extra toolbar buttons associated with each tab.
This commit is contained in:
parent
67ab6dd2e6
commit
7681ef25da
7 changed files with 194 additions and 9 deletions
|
@ -7,6 +7,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define AK_DONT_REPLACE_STD
|
||||
|
||||
#include "History.h"
|
||||
#include "WebView.h"
|
||||
#include <QBoxLayout>
|
||||
#include <QLineEdit>
|
||||
|
@ -20,10 +23,15 @@ public:
|
|||
|
||||
WebView& view() { return *m_view; }
|
||||
|
||||
void navigate(QString const&);
|
||||
|
||||
public slots:
|
||||
void location_edit_return_pressed();
|
||||
void page_title_changed(QString);
|
||||
void page_favicon_changed(QIcon);
|
||||
void back();
|
||||
void forward();
|
||||
void home();
|
||||
void reload();
|
||||
|
||||
signals:
|
||||
|
@ -36,6 +44,13 @@ private:
|
|||
QLineEdit* m_location_edit { nullptr };
|
||||
WebView* m_view { nullptr };
|
||||
QMainWindow* m_window { nullptr };
|
||||
Browser::History m_history;
|
||||
QString m_title;
|
||||
|
||||
OwnPtr<QAction> m_back_action;
|
||||
OwnPtr<QAction> m_forward_action;
|
||||
OwnPtr<QAction> m_home_action;
|
||||
OwnPtr<QAction> m_reload_action;
|
||||
|
||||
int tab_index();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue