Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
Public Slots | Signals | Public Member Functions | Properties | List of all members
WebPage Class Reference

Provides an object to view and edit web documents. More...

Public Slots

void back ()
 Navigates to the previous item in the history, if possible.
void copy ()
 Copies the selected HTML to the clipboard.
void cut ()
 Copies the selected HTML to the clipboard and removes it from the web page.
bool findAllText (string text)
 Searches for all occurrances of text in the web page.
bool findText (string text)
 Searches for the next occurrance of text in the web page.
void forward ()
 Navigates to the next item in the history, if possible.
void load (url url)
 Attempts to load the web page located at url.
void paste ()
 Inserts the the clipboard's contents into the web page.
void reload ()
 Reloads the current web page.
void stop ()
 Aborts the loading of a web page.

Signals

void downloadRequested (variant request)
 This signal is emitted when the user decides to download a link.
void unsupportedContent (variant content)
 This signal is emitted when WebKit cannot handle a link the user navigated to or a web server's response includes a "Content-Disposition" header with the 'attachment' directive.

Public Member Functions

variant hitTestContent (int x, int y)
 Performs a hit test at x,y, and returns the result.

Properties

url baseUrl
 The base url of the web page.
int contentHeight
 The height of the content of the web page.
int contentWidth
 The width of the content of the web page.
bool hasSelection
 Whether any HTML is selected in the web page.
string html
 The HTML of the web page.
string icon
 The source of the web page icon.
Component newWindowComponent
 The component used when a new window is requested.
int preferredHeight
 The preferred height of the web page.
int preferredWidth
 The preferred width of the web page.
int progress
 The loading progress of the web page.
url requestedUrl
 The requested url used to load the page, before any redirects.
enumeration status
 The current status of the web page.
string statusText
 The status text of the web page.
string text
 The HTML of the web page as plain text.
string title
 The title of the web page.
url url
 The source url of the web page.
string userAgent
 The user-agent string used when loading a web page.
real zoomFactor
 The zoom factor of the web page.

Detailed Description

Provides an object to view and edit web documents.

WebPage holds a main frame responsible for web content, settings, the history of navigated links and actions. This class can be used to provide functionality like WebView in an item-less environment.

See Also
WebView

Member Function Documentation

void WebPage::back ( )
slot

Navigates to the previous item in the history, if possible.

See Also
WebHistory::backItem, WebHistory::canGoBack
void WebPage::copy ( )
slot

Copies the selected HTML to the clipboard.

See Also
hasSelection, selectedHtml
void WebPage::cut ( )
slot

Copies the selected HTML to the clipboard and removes it from the web page.

See Also
hasSelection, selectedHtml, contentEditable
void WebPage::downloadRequested ( variant  request)
signal

This signal is emitted when the user decides to download a link.

The url of the link as well as additional meta-information is contained in request.

See Also
unsupportedContent()
bool WebPage::findAllText ( string  text)
slot

Searches for all occurrances of text in the web page.

Returns true if successful.

bool WebPage::findText ( string  text)
slot

Searches for the next occurrance of text in the web page.

Returns true if successful.

void WebPage::forward ( )
slot

Navigates to the next item in the history, if possible.

See Also
WebHistory::forwardItem, WebHistory::canGoForward
void WebPage::load ( url  url)
slot

Attempts to load the web page located at url.

See Also
url, baseUrl, requestedUrl
void WebPage::paste ( )
slot

Inserts the the clipboard's contents into the web page.

See Also
contentEditable
void WebPage::unsupportedContent ( variant  content)
signal

This signal is emitted when WebKit cannot handle a link the user navigated to or a web server's response includes a "Content-Disposition" header with the 'attachment' directive.

If "Content-Disposition" is present in content, the web server is indicating that the client should prompt the user to save the content regardless of content-type. See RFC 2616 sections 19.5.1 for details about Content-Disposition.

Note
This signal is only emitted if the forwardUnsupportedContent property is set to true.
See Also
downloadRequested()

Property Documentation

WebPage::enumeration WebPage::status
read

The current status of the web page.

Possible values are:

Value Description
WebPage.Null No web page has been loaded (default).
WebPage.Loading The web page is being loaded.
WebPage.Ready The web page has been loaded.
WebPage.Error An error occured when loading the web page.