1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

BrowserWindow: Add accessor for TabModel

This commit is contained in:
David Rosca 2018-02-02 10:00:39 +01:00
parent 9f4ac24cf8
commit 16c7af63b6
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 14 additions and 0 deletions

View File

@ -55,6 +55,7 @@
#include "historymenu.h" #include "historymenu.h"
#include "mainmenu.h" #include "mainmenu.h"
#include "downloadsbutton.h" #include "downloadsbutton.h"
#include "tabmodel.h"
#include <algorithm> #include <algorithm>
@ -712,6 +713,14 @@ QAction* BrowserWindow::action(const QString &name) const
return m_mainMenu->action(name); return m_mainMenu->action(name);
} }
TabModel *BrowserWindow::tabModel()
{
if (!m_tabModel) {
m_tabModel = new TabModel(this, this);
}
return m_tabModel;
}
void BrowserWindow::setWindowTitle(const QString &t) void BrowserWindow::setWindowTitle(const QString &t)
{ {
QString title = t; QString title = t;

View File

@ -51,6 +51,7 @@ class NavigationBar;
class NavigationContainer; class NavigationContainer;
class ClickableLabel; class ClickableLabel;
class LocationBar; class LocationBar;
class TabModel;
class FALKON_EXPORT BrowserWindow : public QMainWindow class FALKON_EXPORT BrowserWindow : public QMainWindow
{ {
@ -120,6 +121,8 @@ public:
QAction* action(const QString &name) const; QAction* action(const QString &name) const;
TabModel *tabModel();
signals: signals:
void startingCompleted(); void startingCompleted();
@ -214,6 +217,8 @@ private:
QMenu* m_superMenu; QMenu* m_superMenu;
MainMenu* m_mainMenu; MainMenu* m_mainMenu;
TabModel *m_tabModel = nullptr;
int m_sideBarWidth; int m_sideBarWidth;
int m_webViewWidth; int m_webViewWidth;