aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/mainwindow.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-12-13 12:49:28 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-12-13 13:41:50 +0100
commit4eedf60d76a047f63b0991eee0b623e9be854c76 (patch)
treec8b335c8909a309c2bc2765e823bec5da74aa5aa /src/mainwindow/mainwindow.h
parentFix crash creating ConfigurationEditorPlugin widget (diff)
downloadsmolbote-4eedf60d76a047f63b0991eee0b623e9be854c76.tar.xz
MainWindow: rework menu bar
Split off menu bar into its own class out of MainWindow Menu bar now has a 'Find in menus' function
Diffstat (limited to 'src/mainwindow/mainwindow.h')
-rw-r--r--src/mainwindow/mainwindow.h17
1 files changed, 5 insertions, 12 deletions
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<SubWindow *> 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;