blob: 28a9a18a18f388c87aca73f72b3e8c95834e1fca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef WEBVIEWTABBAR_H
#define WEBVIEWTABBAR_H
#include <QTabBar>
#include <QWebEngineView>
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<QWebEngineView*> m_views;
};
#endif // WEBVIEWTABBAR_H
|