Falkon Develop
Cross-platform Qt-based web browser
sitesettingsview_plugin.cpp
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
21#include "browserwindow.h"
22#include "webview.h"
23#include "pluginproxy.h"
24#include "mainapplication.h"
25#include "sidebar.h"
26#include "webhittestresult.h"
27#include "../config.h"
28
29#include <QMenu>
30#include <QPushButton>
31
33 : QObject()
34 , m_view(nullptr)
35{
36}
37
38void SiteSettingsView::init(InitState state, const QString &settingsPath)
39{
40 Q_UNUSED(settingsPath)
41
42 // State can be either StartupInitState or LateInitState, and it
43 // indicates when the plugin have been loaded.
44 // Currently, it can be from preferences, or automatically at startup.
45 // Plugins are loaded before first BrowserWindow is created.
46 Q_UNUSED(state)
47
48 // Adding new sidebar into application
49 m_sideBar = new SiteSettingsView_Controller(this);
50 SideBarManager::addSidebar(QSL("sitesettingsview-sidebar"), m_sideBar);
51
54}
55
57{
58 // Removing sidebar from application
60 delete m_sideBar;
61}
62
64{
65 return (QString::fromLatin1(Qz::VERSION) == QLatin1String(FALKON_VERSION));
66}
void webPageCreated(WebPage *page)
void mainWindowDeleted(BrowserWindow *window)
static void removeSidebar(SideBarInterface *interface)
Definition: sidebar.cpp:141
static void addSidebar(const QString &id, SideBarInterface *interface)
Definition: sidebar.cpp:136
void mainWindowDeleted(BrowserWindow *window)
void init(InitState state, const QString &settingsPath) override
#define mApp
FALKON_EXPORT const char * VERSION
Definition: qzcommon.cpp:26
State state
#define QSL(x)
Definition: qzcommon.h:40