diff options
Diffstat (limited to 'src/subwindow/subwindow.h')
-rw-r--r-- | src/subwindow/subwindow.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/subwindow/subwindow.h b/src/subwindow/subwindow.h index 1fc0097..eb7973f 100644 --- a/src/subwindow/subwindow.h +++ b/src/subwindow/subwindow.h @@ -22,9 +22,16 @@ class SubWindow : public QMdiSubWindow Q_OBJECT public: + struct TabData + { + bool closeLocked = false; + bool refreshLocked = false; + }; + explicit SubWindow(const Configuration *config, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); ~SubWindow() override; + int currentTabIndex() const; WebView *currentView(); WebView *view(int index) const; int tabCount() const; @@ -32,13 +39,19 @@ public: void setProfile(WebProfile *profile); WebProfile *profile() const; + void setTabData(TabData &data, int index); + TabData tabData(int index) const; + signals: void currentViewChanged(WebView *view); void showStatusMessage(const QString &message, int timeout = 0); public slots: int addTab(const QUrl &url = QUrl(), WebProfile *profile = nullptr); + void closeTab(int index); + void setCurrentTab(int index); + void moveTab(int from, int to); int restoreLastTab(); void restoreTabMenu(QMenu *menu); @@ -51,4 +64,6 @@ private: QMetaObject::Connection linkHoveredConnection; }; +Q_DECLARE_METATYPE(SubWindow::TabData) + #endif // SMOLBOTE_SUBWINDOW_H |