Falkon Develop
Cross-platform Qt-based web browser
sitesettingsview_widget.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2024 Juraj Oravec <jurajoravec@mailo.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
19#ifndef SITESETTINGSVIEW_WIDGET_H
20#define SITESETTINGSVIEW_WIDGET_H
21
23#include "sitesettingsmanager.h"
24
25#include <QWidget>
26#include <QWebEngineSettings>
27
28class QTreeWidget;
29class QTreeWidgetItem;
30
31class BrowserWindow;
32
33class SiteSettingsView_Widget : public QWidget
34{
35 Q_OBJECT
36public:
37 explicit SiteSettingsView_Widget(BrowserWindow *window);
38
39 void loadFinished(WebPage* page);
40
41private Q_SLOTS:
42 void updateData(int index = 0);
43
44private:
45 QTreeWidget *m_attributes;
46 QTreeWidget *m_features;
47 QTreeWidget *m_options;
48 BrowserWindow *m_window;
49 QBrush m_brushGreen;
50 QBrush m_brushYellow;
51 QBrush m_brushOrange;
52 QBrush m_brushRed;
53 QBrush m_brushBlue;
54
55 QLabel *m_isWebValue;
56
57 QList<SiteSettingsManager::PageOptions> m_availableOptions;
58
59 QHash<QWebEngineSettings::WebAttribute, QTreeWidgetItem*> m_attributeItems;
60 QHash<QWebEnginePage::Feature, QTreeWidgetItem*> m_featureItems;
61 QHash<SiteSettingsManager::PageOptions, QTreeWidgetItem*> m_optionsItems;
62
63 QBrush permissionColor(SiteSettingsManager::Permission permission);
64};
65
66#endif /* SITESETTINGSVIEW_WIDGET_H */
SiteSettingsView_Widget(BrowserWindow *window)