diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-09-18 09:57:29 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-18 09:57:29 +0300 |
commit | 1b1e327cb73491c17972a33a07c3c9beafe7f938 (patch) | |
tree | 57fa4bc121fc2e172db42288fec7cdd7ff95399c /src/panels/tabtoolbar.hpp | |
parent | Add Bookmarks toolbar (diff) | |
download | rekonq-1b1e327cb73491c17972a33a07c3c9beafe7f938.tar.xz |
Add Navigation and Tab toolbars
Diffstat (limited to 'src/panels/tabtoolbar.hpp')
-rw-r--r-- | src/panels/tabtoolbar.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/panels/tabtoolbar.hpp b/src/panels/tabtoolbar.hpp new file mode 100644 index 00000000..1c61ed2a --- /dev/null +++ b/src/panels/tabtoolbar.hpp @@ -0,0 +1,33 @@ +/* ============================================================ + * The rekonq project + * ============================================================ + * SPDX-License-Identifier: GPL-3.0-only + * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net> + * ============================================================ */ + +#pragma once + +#include "tabbar/tabbar.h" +#include <QToolBar> + +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; +}; |