Common interface for a web widget.
More...
#include "iwebbrowser.h"
|
virtual | ~IWebWidget ()=default |
|
virtual void | Load (const QUrl &url)=0 |
| Loads a given url. More...
|
|
virtual void | SetHtml (const QString &html, const QUrl &base={})=0 |
| Sets the contents of the web widget to the specified html. More...
|
|
virtual void | SetNavBarVisible (bool visible)=0 |
| Sets whether the navigation bar of the widget (where the address bar and reload/back/forward/etc buttons are) is visible. More...
|
|
virtual void | SetEverythingElseVisible (bool visible)=0 |
| Shows or hides every other panel in the browser but navbar. More...
|
|
virtual QWidget * | GetQWidget ()=0 |
| Returns the IWebWidget as a QWidget. More...
|
|
virtual void | urlChanged (const QUrl &)=0 |
| Emitted when the URL rendered by the browser changes to @url. More...
|
|
Common interface for a web widget.
A widget that is capable of showing/rendering web pages should implement this interface in order to communicate with other modules of LeechCraft.
Definition at line 23 of file iwebbrowser.h.
◆ ~IWebWidget()
virtual IWebWidget::~IWebWidget |
( |
| ) |
|
|
virtualdefault |
◆ GetQWidget()
virtual QWidget* IWebWidget::GetQWidget |
( |
| ) |
|
|
pure virtual |
◆ Load()
virtual void IWebWidget::Load |
( |
const QUrl & |
url | ) |
|
|
pure virtual |
Loads a given url.
The url should be UTF8-encoded.
- Parameters
-
[in] | url | The url of the resource. |
◆ SetEverythingElseVisible()
virtual void IWebWidget::SetEverythingElseVisible |
( |
bool |
visible | ) |
|
|
pure virtual |
Shows or hides every other panel in the browser but navbar.
If the IWebBrowser implementation has additional panels, toolbars, sidebars and similar stuff, it should be set visible according to the visible parameter.
- Parameters
-
[in] | visible | Whether additional stuff should be visible. |
◆ SetHtml()
virtual void IWebWidget::SetHtml |
( |
const QString & |
html, |
|
|
const QUrl & |
base = {} |
|
) |
| |
|
pure virtual |
Sets the contents of the web widget to the specified html.
External objects such as stylesheets or images referenced in the HTML document are located relative to the base.
- Parameters
-
[in] | html | The HTML with the new contents. |
[in] | base | Base address for resolution of external elements. |
◆ SetNavBarVisible()
virtual void IWebWidget::SetNavBarVisible |
( |
bool |
visible | ) |
|
|
pure virtual |
Sets whether the navigation bar of the widget (where the address bar and reload/back/forward/etc buttons are) is visible.
If the widget doesn't have such bar this function does nothing.
- Parameters
-
[in] | visible | Whether to show or hide the navbar. |
◆ urlChanged()
virtual void IWebWidget::urlChanged |
( |
const QUrl & |
| ) |
|
|
pure virtual |
Emitted when the URL rendered by the browser changes to @url.
- Parameters
-
[out] | url | The new URL that the browser renders. |
The documentation for this class was generated from the following file: