1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

TabWidget: Add BrowserWindow accessor

This commit is contained in:
David Rosca 2018-02-04 11:02:02 +01:00
parent 0bf881c168
commit ee2e1e9f78
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 9 additions and 2 deletions

View File

@ -82,7 +82,7 @@ void MenuTabs::mouseReleaseEvent(QMouseEvent* event)
QMenu::mouseReleaseEvent(event);
}
TabWidget::TabWidget(BrowserWindow* window, QWidget* parent)
TabWidget::TabWidget(BrowserWindow *window, QWidget *parent)
: TabStackedWidget(parent)
, m_window(window)
, m_locationBars(new QStackedWidget)
@ -153,6 +153,11 @@ TabWidget::TabWidget(BrowserWindow* window, QWidget* parent)
loadSettings();
}
BrowserWindow *TabWidget::browserWindow() const
{
return m_window;
}
void TabWidget::loadSettings()
{
Settings settings;

View File

@ -66,9 +66,11 @@ class FALKON_EXPORT TabWidget : public TabStackedWidget
{
Q_OBJECT
public:
explicit TabWidget(BrowserWindow* mainclass, QWidget* parent = 0);
explicit TabWidget(BrowserWindow *window, QWidget *parent = nullptr);
~TabWidget();
BrowserWindow *browserWindow() const;
bool restoreState(const QVector<WebTab::SavedTab> &tabs, int currentTab);
void setCurrentIndex(int index);