Falkon Develop
Cross-platform Qt-based web browser
siteinfopermissionitem.h
Go to the documentation of this file.
1/* ============================================================
2 * Falkon - Qt web browser
3 * Copyright (C) 2022 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 SITEINFOPERMISSIONITEM_H
20#define SITEINFOPERMISSIONITEM_H
21
22#include "sitesettingsmanager.h"
23#include <qwidget.h>
24#include <QScopedPointer>
25
26namespace Ui
27{
29}
30
34class SiteInfoPermissionItem : public QWidget
35{
36 Q_OBJECT
37
38public:
39 explicit SiteInfoPermissionItem(const SiteSettingsManager::Permission &a_permission, QWidget* parent = nullptr);
41
42 bool hasOptionAsk() const;
43
45 QString sqlColumn();
46
47 void setAttribute(const QWebEngineSettings::WebAttribute& attribute);
48 void setFeature(const QWebEnginePage::Feature &feature);
50
51 void setHasOptionAsk(bool hasAsk);
52
53private:
54 void setPermission(const SiteSettingsManager::Permission permission);
55 void setDefaultPermission(SiteSettingsManager::Permission permission);
56
57 bool m_hasOptionAsk;
58 QString m_sqlColumn;
59
60private:
61 QScopedPointer<Ui::SiteInfoPermissionItem> m_ui;
62};
63
64#endif // SITEINFOPERMISSIONITEM_H
SiteSettingsManager::Permission permission() const
void setOption(const SiteSettingsManager::PageOptions &option)
SiteInfoPermissionItem(const SiteSettingsManager::Permission &a_permission, QWidget *parent=nullptr)
void setFeature(const QWebEnginePage::Feature &feature)
void setAttribute(const QWebEngineSettings::WebAttribute &attribute)