• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • WebView
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Plasma::WebView Class Reference

#include <Plasma/Widgets/WebView>

Inheritance diagram for Plasma::WebView:
Inheritance graph
[legend]

Public Slots

void back ()
 
void forward ()
 
void reload ()
 
void stop ()
 

Signals

void loadFinished (bool success)
 
void loadProgress (int percent)
 
void urlChanged (const QUrl &url)
 

Public Member Functions

 WebView (QGraphicsItem *parent=0)
 
 ~WebView ()
 
QSizeF contentsSize () const
 
bool dragToScroll ()
 
QRectF geometry () const
 
QString html () const
 
QWebFrame * mainFrame () const
 
QWebPage * page () const
 
QPointF scrollPosition () const
 
void setDragToScroll (bool drag)
 
void setGeometry (const QRectF &geometry)
 
void setHtml (const QByteArray &html, const KUrl &baseUrl=KUrl())
 
void setHtml (const QString &html, const KUrl &baseUrl=KUrl())
 
void setPage (QWebPage *page)
 
void setScrollPosition (const QPointF &position)
 
void setUrl (const KUrl &url)
 
void setZoomFactor (const qreal zoom)
 
KUrl url () const
 
QRectF viewportGeometry () const
 
qreal zoomFactor () const
 

Protected Member Functions

void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
 
void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
 
void dropEvent (QGraphicsSceneDragDropEvent *event)
 
void focusInEvent (QFocusEvent *event)
 
void focusOutEvent (QFocusEvent *event)
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 
void keyPressEvent (QKeyEvent *event)
 
void keyReleaseEvent (QKeyEvent *event)
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint) const
 
void wheelEvent (QGraphicsSceneWheelEvent *event)
 

Properties

QSizeF contentsSize
 
bool dragToScroll
 
QString html
 
QPointF scrollPosition
 
KUrl url
 
QRectF viewportGeometry
 
qreal zoomFactor
 

Detailed Description

Provides a widget to display html content in Plasma.

Definition at line 46 of file webview.h.

Constructor & Destructor Documentation

Plasma::WebView::WebView ( QGraphicsItem *  parent = 0)
explicit

Definition at line 63 of file webview.cpp.

Plasma::WebView::~WebView ( )

Definition at line 93 of file webview.cpp.

Member Function Documentation

void Plasma::WebView::back ( )
slot

Loads the previous document in the list of documents built by navigating links.

Since
4.6

Definition at line 199 of file webview.cpp.

QSizeF Plasma::WebView::contentsSize ( ) const
Returns
the size of the internal widget
Since
4.4
void Plasma::WebView::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protected

Definition at line 249 of file webview.cpp.

void Plasma::WebView::dragEnterEvent ( QGraphicsSceneDragDropEvent *  event)
protected

Definition at line 279 of file webview.cpp.

void Plasma::WebView::dragLeaveEvent ( QGraphicsSceneDragDropEvent *  event)
protected

Definition at line 284 of file webview.cpp.

void Plasma::WebView::dragMoveEvent ( QGraphicsSceneDragDropEvent *  event)
protected

Definition at line 289 of file webview.cpp.

bool Plasma::WebView::dragToScroll ( )
Returns
true if the page can be scrolled by dragging the mouse
Since
4.3
void Plasma::WebView::dropEvent ( QGraphicsSceneDragDropEvent *  event)
protected

Definition at line 294 of file webview.cpp.

void Plasma::WebView::focusInEvent ( QFocusEvent *  event)
protected

Definition at line 269 of file webview.cpp.

void Plasma::WebView::focusOutEvent ( QFocusEvent *  event)
protected

Definition at line 274 of file webview.cpp.

void Plasma::WebView::forward ( )
slot

Loads the next document in the list of documents built by navigating links.

Since
4.6

Definition at line 204 of file webview.cpp.

QRectF Plasma::WebView::geometry ( ) const

Reimplementation.

Definition at line 126 of file webview.cpp.

void Plasma::WebView::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 229 of file webview.cpp.

QString Plasma::WebView::html ( ) const
Returns
the html content of the page
QVariant Plasma::WebView::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
protected

Definition at line 299 of file webview.cpp.

void Plasma::WebView::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 259 of file webview.cpp.

void Plasma::WebView::keyReleaseEvent ( QKeyEvent *  event)
protected

Definition at line 264 of file webview.cpp.

void Plasma::WebView::loadFinished ( bool  success)
signal

This signal is emitted when loading is completed.

Parameters
successtrue if the content was loaded successfully, otherwise false
void Plasma::WebView::loadProgress ( int  percent)
signal

During loading progress, this signal is emitted.

The values are always between 0 and 100, inclusive.

Parameters
percentthe estimated amount the loading is complete
QWebFrame * Plasma::WebView::mainFrame ( ) const

The main web frame associated with this item.

Definition at line 175 of file webview.cpp.

void Plasma::WebView::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 239 of file webview.cpp.

void Plasma::WebView::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 224 of file webview.cpp.

void Plasma::WebView::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 234 of file webview.cpp.

void Plasma::WebView::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 244 of file webview.cpp.

QWebPage * Plasma::WebView::page ( ) const

The QWebPage associated with this item.

Useful when more of the features of the full QWebPage object need to be accessed.

Definition at line 170 of file webview.cpp.

void Plasma::WebView::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
protected

Reimplementation.

Definition at line 219 of file webview.cpp.

void Plasma::WebView::reload ( )
slot

Reloads the current document.

Since
4.6

Definition at line 209 of file webview.cpp.

QPointF Plasma::WebView::scrollPosition ( ) const
Returns
the position of the webpage relative to this widget
Since
4.4
void Plasma::WebView::setDragToScroll ( bool  drag)

Sets if the page can be scrolled around by dragging the contents with the mouse.

Since
4.3

Definition at line 180 of file webview.cpp.

void Plasma::WebView::setGeometry ( const QRectF &  geometry)

Reimplementation.

Definition at line 310 of file webview.cpp.

void Plasma::WebView::setHtml ( const QByteArray &  html,
const KUrl &  baseUrl = KUrl() 
)

Sets the html to be shown along with a base URL to be used to resolve relative references.

Parameters
htmlthe html (in utf8) to display in the content area
baseUrlthe base url for relative references

Definition at line 109 of file webview.cpp.

void Plasma::WebView::setHtml ( const QString &  html,
const KUrl &  baseUrl = KUrl() 
)

Sets the html to be shown along with a base URL to be used to resolve relative references.

Parameters
htmlthe html (in utf8) to display in the content area
baseUrlthe base url for relative references

Definition at line 115 of file webview.cpp.

void Plasma::WebView::setPage ( QWebPage *  page)

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
pagethe page to set in this view

Definition at line 165 of file webview.cpp.

void Plasma::WebView::setScrollPosition ( const QPointF &  position)

Sets the position of the webpage relative to this widget.

Since
4.4

Definition at line 140 of file webview.cpp.

void Plasma::WebView::setUrl ( const KUrl &  url)

Sets the URL to display.

Loading may happen asynchronously.

Parameters
urlthe location of the content to load.

Definition at line 98 of file webview.cpp.

void Plasma::WebView::setZoomFactor ( const qreal  zoom)

Sets the zoom factor of the page.

Since
4.4

Definition at line 160 of file webview.cpp.

QSizeF Plasma::WebView::sizeHint ( Qt::SizeHint  which,
const QSizeF &  constraint 
) const
protected

Definition at line 317 of file webview.cpp.

void Plasma::WebView::stop ( )
slot

Stops loading the document.

Since
4.6

Definition at line 214 of file webview.cpp.

KUrl Plasma::WebView::url ( ) const
Returns
the html content of the page
void Plasma::WebView::urlChanged ( const QUrl &  url)
signal

url displayed by the web page changed

Since
4.6
QRectF Plasma::WebView::viewportGeometry ( ) const

The geometry of the area that actually displays the web page.

Since
4.4
void Plasma::WebView::wheelEvent ( QGraphicsSceneWheelEvent *  event)
protected

Definition at line 254 of file webview.cpp.

qreal Plasma::WebView::zoomFactor ( ) const

The zoom factor of the page.

Since
4.4

Property Documentation

QSizeF Plasma::WebView::contentsSize
read

Definition at line 54 of file webview.h.

bool Plasma::WebView::dragToScroll
readwrite

Definition at line 52 of file webview.h.

QString Plasma::WebView::html
readwrite

Definition at line 51 of file webview.h.

QPointF Plasma::WebView::scrollPosition
readwrite

Definition at line 53 of file webview.h.

KUrl Plasma::WebView::url
readwrite

Definition at line 50 of file webview.h.

QRectF Plasma::WebView::viewportGeometry
read

Definition at line 55 of file webview.h.

qreal Plasma::WebView::zoomFactor
readwrite

Definition at line 56 of file webview.h.


The documentation for this class was generated from the following files:
  • webview.h
  • webview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal