Falkon Develop
Cross-platform Qt-based web browser
sbi_iconsmanager.h
Go to the documentation of this file.
1/* ============================================================
2* StatusBarIcons - Extra icons in statusbar for Falkon
3* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef SBI_ICONSMANAGER_H
19#define SBI_ICONSMANAGER_H
20
21#include <QWidget>
22#include <QHash>
23
24class BrowserWindow;
26
27class SBI_IconsManager : public QObject
28{
29 Q_OBJECT
30public:
31 explicit SBI_IconsManager(const QString &settingsPath, QObject* parent = nullptr);
33
34 void loadSettings();
35
36 bool showImagesIcon() const;
37 void setShowImagesIcon(bool show);
38
39 bool showJavaScriptIcon() const;
40 void setShowJavaScriptIcon(bool show);
41
42 bool showNetworkIcon() const;
43 void setShowNetworkIcon(bool show);
44
45 bool showZoomWidget() const;
46 void setShowZoomWidget(bool show);
47
48 void reloadIcons();
49 void destroyIcons();
50
51public Q_SLOTS:
52 void mainWindowCreated(BrowserWindow* window);
53 void mainWindowDeleted(BrowserWindow* window);
54
55private:
56 QString m_settingsPath;
57 bool m_showImagesIcon;
58 bool m_showJavaScriptIcon;
59 bool m_showNetworkIcon;
60 bool m_showZoomWidget;
61
62 QHash<BrowserWindow*, QWidgetList> m_windows;
63 SBI_NetworkManager* m_networkManager;
64};
65
66#endif // SBI_ICONSMANAGER_H
void mainWindowDeleted(BrowserWindow *window)
void mainWindowCreated(BrowserWindow *window)
bool showNetworkIcon() const
bool showImagesIcon() const
bool showZoomWidget() const
void setShowImagesIcon(bool show)
void setShowNetworkIcon(bool show)
bool showJavaScriptIcon() const
SBI_IconsManager(const QString &settingsPath, QObject *parent=nullptr)
void setShowJavaScriptIcon(bool show)
void setShowZoomWidget(bool show)