Falkon Develop
Cross-platform Qt-based web browser
tabmanagerwidgetcontroller.h
Go to the documentation of this file.
1/* ============================================================
2* TabManager plugin for Falkon
3* Copyright (C) 2013-2017 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com>
4* Copyright (C) 2018 David Rosca <nowrep@gmail.com>
5*
6* This program is free software: you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation, either version 3 of the License, or
9* (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18* ============================================================ */
19#ifndef TABMANAGERWIDGETCONTROLLER_H
20#define TABMANAGERWIDGETCONTROLLER_H
21
22#include "sidebarinterface.h"
23#include "tabmanagerwidget.h"
24
25class WebPage;
27
29{
30 Q_OBJECT
31public:
32 explicit TabManagerWidgetController(QObject* parent = nullptr);
34
35 QString title() const override;
36 QAction* createMenuAction() override;
37 QWidget* createSideBarWidget(BrowserWindow* mainWindow) override;
38
40
42 TabManagerWidget* createTabManagerWidget(BrowserWindow* mainClass, QWidget* parent = nullptr, bool defaultWidget = false);
43
45
46 void addStatusBarIcon(BrowserWindow* window);
48
49public Q_SLOTS:
51 void mainWindowDeleted(BrowserWindow* window);
52 void raiseTabManager();
53 void showSideBySide();
54 void emitRefreshTree();
55
56private:
57 TabManagerWidget* m_defaultTabManager;
59
60 QHash<BrowserWindow*, AbstractButtonInterface*> m_statusBarIcons;
61 QHash<BrowserWindow*, QAction*> m_actions;
62
63Q_SIGNALS:
64 void requestRefreshTree(WebPage* p = nullptr);
65};
66
67#endif // TABMANAGERWIDGETCONTROLLER_H
TabManagerWidget * createTabManagerWidget(BrowserWindow *mainClass, QWidget *parent=nullptr, bool defaultWidget=false)
void mainWindowDeleted(BrowserWindow *window)
void setGroupType(TabManagerWidget::GroupType type)
TabManagerWidgetController(QObject *parent=nullptr)
QWidget * createSideBarWidget(BrowserWindow *mainWindow) override
void removeStatusBarIcon(BrowserWindow *window)
TabManagerWidget::GroupType groupType()
AbstractButtonInterface * createStatusBarIcon(BrowserWindow *mainWindow)
void addStatusBarIcon(BrowserWindow *window)
void requestRefreshTree(WebPage *p=nullptr)
~TabManagerWidgetController() override