LeechCraft 0.6.70-14794-g33744ae6ce
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
iwebbrowser.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QString>
12#include <QWidget>
13#include <QUrl>
14#include <QtPlugin>
15
22class Q_DECL_EXPORT IWebWidget
23{
24public:
25 virtual ~IWebWidget () = default;
26
33 virtual void Load (const QUrl& url) = 0;
34
44 virtual void SetHtml (const QString& html, const QUrl& base = {}) = 0;
45
53 virtual void SetNavBarVisible (bool visible) = 0;
54
63 virtual void SetEverythingElseVisible (bool visible) = 0;
64
69 virtual QWidget* GetQWidget () = 0;
70
75 virtual void urlChanged (const QUrl&) = 0;
76};
77
78class QWebView;
79
82class Q_DECL_EXPORT IWebBrowser
83{
84public:
85 virtual ~IWebBrowser () = default;
86
94 virtual IWebWidget* GetWidget () const = 0;
95};
96
97Q_DECLARE_INTERFACE (IWebWidget, "org.Deviant.LeechCraft.IWebWidget/1.0")
98Q_DECLARE_INTERFACE (IWebBrowser, "org.Deviant.LeechCraft.IWebBrowser/1.0")
Base class for plugins that provide a web browser.
Definition: iwebbrowser.h:83
virtual ~IWebBrowser()=default
virtual IWebWidget * GetWidget() const =0
Returns the IWebWidget for use in another modules of LeechCraft.
Common interface for a web widget.
Definition: iwebbrowser.h:23
virtual void SetHtml(const QString &html, const QUrl &base={})=0
Sets the contents of the web widget to the specified html.
virtual void SetNavBarVisible(bool visible)=0
Sets whether the navigation bar of the widget (where the address bar and reload/back/forward/etc butt...
virtual QWidget * GetQWidget()=0
Returns the IWebWidget as a QWidget.
virtual void SetEverythingElseVisible(bool visible)=0
Shows or hides every other panel in the browser but navbar.
virtual void Load(const QUrl &url)=0
Loads a given url.
virtual void urlChanged(const QUrl &)=0
Emitted when the URL rendered by the browser changes to @url.
virtual ~IWebWidget()=default