aboutsummaryrefslogtreecommitdiff
path: root/src/subwindow/subwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/subwindow/subwindow.h')
-rw-r--r--src/subwindow/subwindow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/subwindow/subwindow.h b/src/subwindow/subwindow.h
index 8343a9b..02f50d0 100644
--- a/src/subwindow/subwindow.h
+++ b/src/subwindow/subwindow.h
@@ -9,6 +9,7 @@
#ifndef SMOLBOTE_SUBWINDOW_H
#define SMOLBOTE_SUBWINDOW_H
+#include "session.hpp"
#include "tabwidget.h"
#include "webengine/webview.h"
#include <QMenu>
@@ -27,7 +28,9 @@ public:
};
explicit SubWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
+ explicit SubWindow(const Session::SubWindow &data, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
~SubWindow() = default;
+ [[nodiscard]] Session::SubWindow serialize() const;
[[nodiscard]] int currentTabIndex() const
{
@@ -66,6 +69,7 @@ signals:
public slots:
int addTab(const QUrl &url = QUrl(), WebProfile *profile = nullptr);
+ int addTab(const Session::WebView &data);
void closeTab(int index)
{
tabWidget->removeTab(index);