/* ============================================================ * The rekonq project * ============================================================ * SPDX-License-Identifier: GPL-3.0-only * Copyright (C) 2022 aqua * ============================================================ */ #pragma once #include "tabbar/tabbar.h" #include class TabToolBar : public QToolBar { Q_OBJECT public: explicit TabToolBar(QWidget *parent = nullptr); ~TabToolBar() override = default; int addView(RekonqView *view); void setCurrentView(RekonqView *view); [[nodiscard]] RekonqView *currentView() const; signals: void currentViewChanged(RekonqView *view); void tabClosed(RekonqView *view); public slots: void closeCurrentTab() { emit tabs->tabCloseRequested(tabs->currentIndex()); } private: TabBar *tabs; };