From 4eedf60d76a047f63b0991eee0b623e9be854c76 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 13 Dec 2018 12:49:28 +0100 Subject: MainWindow: rework menu bar Split off menu bar into its own class out of MainWindow Menu bar now has a 'Find in menus' function --- src/mainwindow/mainwindow.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/mainwindow/mainwindow.h') diff --git a/src/mainwindow/mainwindow.h b/src/mainwindow/mainwindow.h index de77540..44ee633 100644 --- a/src/mainwindow/mainwindow.h +++ b/src/mainwindow/mainwindow.h @@ -22,15 +22,11 @@ class SearchForm; class WebView; class NavigationBar; class WebProfile; - -namespace Ui -{ -class MainWindow; -} - +class MenuBar; class MainWindow : public QMainWindow { friend class Browser; + friend class MenuBar; Q_OBJECT @@ -49,22 +45,19 @@ public: const QVector subWindows() const; SubWindow *currentSubWindow() const; -signals: - void createBookmark(const QString &title, const QString &url); - public slots: void createTab(const QUrl &url); - SubWindow *createSubWindow(const Configuration *config, WebProfile *profile); + SubWindow *createSubWindow(WebProfile *profile = nullptr, bool openProfileNewtab = false); private slots: void setView(WebView *view); - void updatePageLoadProfileMenu(); protected: void closeEvent(QCloseEvent *event) override; private: - Ui::MainWindow *ui; + const Configuration *configuration = nullptr; + MenuBar *m_menuBar = nullptr; QMenu *toolsMenu = nullptr; QMenu *pageLoadProfileMenu = nullptr; -- cgit v1.2.1