WebView Class Reference
from PyKDE4.plasma import *
Inherits: QGraphicsWidget → QObject
Namespace: Plasma
Detailed Description
WebView plasma/widgets/webview.h <Plasma/Widgets/WebView>
Provides a widget to display html content in Plasma.
Signals |
| loadFinished (bool success) |
| loadProgress (int percent) |
Methods |
| __init__ (self, QGraphicsItem parent=0) |
| contextMenuEvent (self, QGraphicsSceneContextMenuEvent event) |
| dragEnterEvent (self, QGraphicsSceneDragDropEvent event) |
| dragLeaveEvent (self, QGraphicsSceneDragDropEvent event) |
| dragMoveEvent (self, QGraphicsSceneDragDropEvent event) |
bool | dragToScroll (self) |
| dropEvent (self, QGraphicsSceneDragDropEvent event) |
| focusInEvent (self, QFocusEvent event) |
| focusOutEvent (self, QFocusEvent event) |
QRectF | geometry (self) |
| hoverMoveEvent (self, QGraphicsSceneHoverEvent event) |
QString | html (self) |
| keyPressEvent (self, QKeyEvent event) |
| keyReleaseEvent (self, QKeyEvent event) |
| loadFinished (self, bool success) |
| loadProgress (self, int percent) |
QWebFrame | mainFrame (self) |
| mouseDoubleClickEvent (self, QGraphicsSceneMouseEvent event) |
| mouseMoveEvent (self, QGraphicsSceneMouseEvent event) |
| mousePressEvent (self, QGraphicsSceneMouseEvent event) |
| mouseReleaseEvent (self, QGraphicsSceneMouseEvent event) |
QWebPage | page (self) |
| paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=0) |
| setDragToScroll (self, bool drag) |
| setGeometry (self, QRectF geometry) |
| setHtml (self, QByteArray html, KUrl baseUrl=KUrl()) |
| setHtml (self, QString html, KUrl baseUrl=KUrl()) |
| setPage (self, QWebPage page) |
| setUrl (self, KUrl url) |
KUrl | url (self) |
| wheelEvent (self, QGraphicsSceneWheelEvent event) |
Method Documentation
bool dragToScroll |
( |
|
self ) |
|
- Returns:
- true if the page can be scrolled by dragging the mouse
- Since:
- 4.3
- Returns:
- the html content of the page
loadFinished |
( |
self, |
|
|
|
bool |
success |
|
) |
|
|
|
This signal is emitted when loading is completed.
- Parameters:
-
| success | true if the content was loaded successfully,
otherwise false
|
- Signal syntax:
QObject.connect(source, SIGNAL("loadFinished(bool)"), target_slot)
loadProgress |
( |
self, |
|
|
|
int |
percent |
|
) |
|
|
|
During loading progress, this signal is emitted. The values
are always between 0 and 100, inclusive.
- Parameters:
-
| percent | the estimated amount the loading is complete
|
- Signal syntax:
QObject.connect(source, SIGNAL("loadProgress(int)"), target_slot)
The main web frame associated with this item.
The QWebPage associated with this item. Useful when more
of the features of the full QWebPage object need to be accessed.
setDragToScroll |
( |
self, |
|
|
|
bool |
drag |
|
) |
|
|
|
Sets if the page can be scrolled around by dragging the contents with the mouse
- Since:
- 4.3
setGeometry |
( |
self, |
|
|
|
QRectF |
geometry |
|
) |
|
|
|
Sets the html to be shown along with a base URL to be used
to resolve relative references.
- Parameters:
-
| html | the html (in utf8) to display in the content area
|
| baseUrl | the base url for relative references
|
Sets the html to be shown along with a base URL to be used
to resolve relative references.
- Parameters:
-
| html | the html (in utf8) to display in the content area
|
| baseUrl | the base url for relative references
|
Sets the page to use in this item. The owner of the webpage remains,
however if this WebView object is the owner of the current page,
then the current page is deleted
- Parameters:
-
| page | the page to set in this view
|
setUrl |
( |
self, |
|
|
|
KUrl |
url |
|
) |
|
|
|
Sets the URL to display. Loading may happen asynchronously.
- Parameters:
-
| url | the location of the content to load.
|
- Returns:
- the html content of the page