diff options
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp index c078d81..7e49ab8 100644 --- a/src/mainwindow/mainwindow.cpp +++ b/src/mainwindow/mainwindow.cpp @@ -11,7 +11,7 @@ #include "webengine/webview.h" #include "widgets/navigationbar.h" #include "widgets/searchform.h" -#include "window.h" +#include "subwindow.h" #include <QApplication> #include <QCloseEvent> #include "widgets/dockwidget.h" @@ -70,7 +70,7 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent) disconnect(statusBarConnection); subWindowAction->setMenu(nullptr); - auto *w = qobject_cast<Window *>(window); + auto *w = qobject_cast<SubWindow *>(window); if(w == nullptr) { // no current subwindow, clear everything setView(nullptr); @@ -78,8 +78,8 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent) } else { setView(w->currentView()); subWindowAction->setMenu(w->systemMenu()); - viewChangedConnection = connect(w, &Window::currentViewChanged, this, &MainWindow::setView); - statusBarConnection = connect(w, &Window::showStatusMessage, statusBar(), &QStatusBar::showMessage); + viewChangedConnection = connect(w, &SubWindow::currentViewChanged, this, &MainWindow::setView); + statusBarConnection = connect(w, &SubWindow::showStatusMessage, statusBar(), &QStatusBar::showMessage); } }); @@ -112,7 +112,7 @@ void MainWindow::createMenuBar() Q_CHECK_PTR(mdiArea); auto *smolboteMenu = menuBar()->addMenu(qApp->applicationDisplayName()); - smolboteMenu->addAction(tr("New tab group"), this, [this]() { + smolboteMenu->addAction(tr("New subwindow"), this, [this]() { createSubWindow(); }, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newGroup").value().c_str())); @@ -187,7 +187,7 @@ void MainWindow::removeDockWidget(QWidget *widget) void MainWindow::createTab(const QUrl &url) { - auto *w = qobject_cast<Window *>(mdiArea->currentSubWindow()); + auto *w = qobject_cast<SubWindow *>(mdiArea->currentSubWindow()); if(w == nullptr) { w = createSubWindow(url.toString()); } else { @@ -195,14 +195,14 @@ void MainWindow::createTab(const QUrl &url) } } -Window *MainWindow::currentSubWindow() const +SubWindow *MainWindow::currentSubWindow() const { - return qobject_cast<Window *>(mdiArea->currentSubWindow()); + return qobject_cast<SubWindow *>(mdiArea->currentSubWindow()); } -Window *MainWindow::createSubWindow(const QString &url) +SubWindow *MainWindow::createSubWindow(const QString &url) { - auto *w = new Window(m_config->section("window"), this); + auto *w = new SubWindow(m_config->section("window"), this); mdiArea->addSubWindow(w); w->showMaximized(); w->setFocus(); |