From 120a5f7c6d31a3bc5acdb54b19326516f8399767 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 11 Jan 2017 10:18:08 +0100 Subject: Initial commit --- src/widgets/webviewtabbar.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/widgets/webviewtabbar.h (limited to 'src/widgets/webviewtabbar.h') diff --git a/src/widgets/webviewtabbar.h b/src/widgets/webviewtabbar.h new file mode 100644 index 0000000..28a9a18 --- /dev/null +++ b/src/widgets/webviewtabbar.h @@ -0,0 +1,31 @@ +#ifndef WEBVIEWTABBAR_H +#define WEBVIEWTABBAR_H + +#include +#include + +class WebViewTabBar : public QTabBar +{ + Q_OBJECT + +public: + WebViewTabBar(QWidget *parent = 0); + ~WebViewTabBar(); + + int addTab(QWebEngineView *view); + QWebEngineView *currentView(); + +signals: + void currentTabChanged(QWebEngineView *view); + +private slots: + void handleCurrentChanged(int index); + void handleTabClose(int index); + + void updateTabText(QWebEngineView *view, const QString &text); + +private: + QVector m_views; +}; + +#endif // WEBVIEWTABBAR_H -- cgit v1.2.1