LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
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 <memory>
12
#include <QString>
13
#include <QWidget>
14
#include <QUrl>
15
#include <QtPlugin>
16
23
class
Q_DECL_EXPORT
IWebWidget
24
{
25
public
:
26
virtual
~IWebWidget
() =
default
;
27
34
virtual
void
Load
(
const
QUrl& url) = 0;
35
45
virtual
void
SetHtml
(
const
QString& html,
const
QUrl& base = {}) = 0;
46
54
virtual
void
SetNavBarVisible
(
bool
visible) = 0;
55
64
virtual
void
SetEverythingElseVisible
(
bool
visible) = 0;
65
70
virtual
QWidget*
GetQWidget
() = 0;
71
76
virtual
void
urlChanged
(
const
QUrl&) = 0;
77
};
78
79
class
QWebView;
80
83
class
Q_DECL_EXPORT
IWebBrowser
84
{
85
public
:
86
virtual
~IWebBrowser
() =
default
;
87
93
virtual
std::unique_ptr<IWebWidget>
CreateWidget
()
const
= 0;
94
};
95
96
Q_DECLARE_INTERFACE (
IWebWidget
,
"org.Deviant.LeechCraft.IWebWidget/1.0"
)
97
Q_DECLARE_INTERFACE (
IWebBrowser
,
"org.Deviant.LeechCraft.IWebBrowser/1.0"
)
IWebBrowser
Base class for plugins that provide a web browser.
Definition
iwebbrowser.h:84
IWebBrowser::~IWebBrowser
virtual ~IWebBrowser()=default
IWebBrowser::CreateWidget
virtual std::unique_ptr< IWebWidget > CreateWidget() const =0
Returns the IWebWidget for use in another modules of LeechCraft.
IWebWidget
Common interface for a web widget.
Definition
iwebbrowser.h:24
IWebWidget::SetHtml
virtual void SetHtml(const QString &html, const QUrl &base={})=0
Sets the contents of the web widget to the specified html.
IWebWidget::SetNavBarVisible
virtual void SetNavBarVisible(bool visible)=0
Sets whether the navigation bar of the widget (where the address bar and reload/back/forward/etc butt...
IWebWidget::GetQWidget
virtual QWidget * GetQWidget()=0
Returns the IWebWidget as a QWidget.
IWebWidget::SetEverythingElseVisible
virtual void SetEverythingElseVisible(bool visible)=0
Shows or hides every other panel in the browser but navbar.
IWebWidget::Load
virtual void Load(const QUrl &url)=0
Loads a given url.
IWebWidget::urlChanged
virtual void urlChanged(const QUrl &)=0
Emitted when the URL rendered by the browser changes to @url.
IWebWidget::~IWebWidget
virtual ~IWebWidget()=default
src
interfaces
iwebbrowser.h
Generated by
1.17.0