![]() |
Home · All Classes · All Functions · Overviews |
The QGraphicsWebView class allows web content to be added to a GraphicsView. More...
#include <QGraphicsWebView>
This class is not part of the Qt GUI Framework Edition.
Inherits QGraphicsWidget.
This class was introduced in Qt 4.6.
|
|
QGraphicsWebView ( QGraphicsItem * parent = 0 ) | |
~QGraphicsWebView () | |
QWebHistory * | history () const |
QIcon | icon () const |
bool | isInteractive () const |
void | load ( const QUrl & url ) |
void | load ( const QNetworkRequest & request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray & body = QByteArray() ) |
QWebPage * | page () const |
qreal | progress () const |
void | setContent ( const QByteArray & data, const QString & mimeType = QString(), const QUrl & baseUrl = QUrl() ) |
void | setHtml ( const QString & html, const QUrl & baseUrl = QUrl() ) |
void | setInteractive ( bool ) |
void | setPage ( QWebPage * page ) |
void | setUrl ( const QUrl & ) |
void | setZoomFactor ( qreal ) |
QWebSettings * | settings () const |
QString | status () const |
QString | title () const |
QString | toHtml () const |
QUrl | url () const |
qreal | zoomFactor () const |
virtual bool | event ( QEvent * event ) |
virtual void | paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 ) |
virtual void | setGeometry ( const QRectF & rect ) |
virtual void | updateGeometry () |
void | back () |
void | forward () |
void | reload () |
void | stop () |
void | iconChanged () |
void | interactivityChanged () |
void | loadFailed () |
void | loadFinished () |
void | loadStarted () |
void | progressChanged ( qreal ) |
void | statusChanged () |
void | titleChanged ( const QString & ) |
void | urlChanged ( const QUrl & ) |
void | zoomFactorChanged () |
virtual void | contextMenuEvent ( QGraphicsSceneContextMenuEvent * ev ) |
virtual void | dragEnterEvent ( QGraphicsSceneDragDropEvent * ev ) |
virtual void | dragLeaveEvent ( QGraphicsSceneDragDropEvent * ev ) |
virtual void | dragMoveEvent ( QGraphicsSceneDragDropEvent * ev ) |
virtual void | dropEvent ( QGraphicsSceneDragDropEvent * ev ) |
virtual void | focusInEvent ( QFocusEvent * ev ) |
virtual bool | focusNextPrevChild ( bool next ) |
virtual void | focusOutEvent ( QFocusEvent * ev ) |
virtual void | hoverLeaveEvent ( QGraphicsSceneHoverEvent * ev ) |
virtual void | hoverMoveEvent ( QGraphicsSceneHoverEvent * ev ) |
virtual void | inputMethodEvent ( QInputMethodEvent * ev ) |
virtual void | keyPressEvent ( QKeyEvent * ev ) |
virtual void | keyReleaseEvent ( QKeyEvent * ev ) |
virtual void | mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * ev ) |
virtual void | mouseMoveEvent ( QGraphicsSceneMouseEvent * ev ) |
virtual void | mousePressEvent ( QGraphicsSceneMouseEvent * ev ) |
virtual void | mouseReleaseEvent ( QGraphicsSceneMouseEvent * ev ) |
virtual bool | sceneEvent ( QEvent * event ) |
virtual void | wheelEvent ( QGraphicsSceneWheelEvent * ev ) |
The QGraphicsWebView class allows web content to be added to a GraphicsView.
A WebGraphicsItem renders web content based on a URL or set data.
If the width and height of the item is not set, they will dynamically adjust to a size appropriate for the content. This width may be large (eg. 980) for typical online web pages.
This property provides an HTML interface to the text in the webview.
When setting this property, external objects such as stylesheets or images referenced in the HTML document are located relative to baseUrl.
The html is loaded immediately; external objects are loaded asynchronously.
When using these methods, WebKit assumes that external resources such as JavaScript programs or style sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external script can be specified through the charset attribute of the HTML script tag. Alternatively, the encoding can also be specified by the web server.
Access functions:
QString | toHtml () const |
void | setHtml ( const QString & html, const QUrl & baseUrl = QUrl() ) |
See also load(), setContent(), and QWebFrame::toHtml().
This property holds the icon associated with the web page currently viewed.
By default, this property contains a null icon.
Access functions:
QIcon | icon () const |
Notifier signal:
void | iconChanged () |
See also iconChanged() and QWebSettings::iconForUrl().
This property holds controls whether the item responds to mouse and key events.
Access functions:
bool | isInteractive () const |
void | setInteractive ( bool ) |
Notifier signal:
void | interactivityChanged () |
This property holds the progress of loading the current URL, from 0 to 1.
Access functions:
qreal | progress () const |
Notifier signal:
void | progressChanged ( qreal ) |
This property holds the load status message.
Provides the latest status message set during the load of a URL. Commonly shown by Status Bar widgets.
Access functions:
QString | status () const |
Notifier signal:
void | statusChanged () |
See also statusChanged().
This property holds the title of the web page currently viewed.
By default, this property contains an empty string.
Access functions:
QString | title () const |
Notifier signal:
void | titleChanged ( const QString & ) |
See also titleChanged().
This property holds the url of the web page currently viewed.
Setting this property clears the view and loads the URL.
By default, this property contains an empty, invalid URL.
Access functions:
QUrl | url () const |
void | setUrl ( const QUrl & ) |
Notifier signal:
void | urlChanged ( const QUrl & ) |
See also load() and urlChanged().
This property holds the zoom factor for the view.
This property was introduced in Qt 4.5.
Access functions:
qreal | zoomFactor () const |
void | setZoomFactor ( qreal ) |
Notifier signal:
void | zoomFactorChanged () |
Constructs an empty QGraphicsWebView with parent parent.
See also load().
Destroys the web graphicsitem.
Convenience slot that loads the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.
See also forward().
Reimplemented from QGraphicsItem::contextMenuEvent().
Reimplemented from QGraphicsItem::dragEnterEvent().
Reimplemented from QGraphicsItem::dragLeaveEvent().
Reimplemented from QGraphicsItem::dragMoveEvent().
Reimplemented from QGraphicsItem::dropEvent().
Reimplemented from QObject::event().
Reimplemented from QGraphicsItem::focusInEvent().
Reimplemented from QGraphicsWidget::focusNextPrevChild().
Reimplemented from QGraphicsItem::focusOutEvent().
Convenience slot that loads the next document in the list of documents built by navigating links. Does nothing if there is no next document.
See also back().
Returns a pointer to the view's history of navigated web pages.
It is equivalent to
view->page()->history();
Reimplemented from QGraphicsItem::hoverLeaveEvent().
Reimplemented from QGraphicsItem::hoverMoveEvent().
Reimplemented from QGraphicsItem::inputMethodEvent().
Reimplemented from QGraphicsItem::keyPressEvent().
Reimplemented from QGraphicsItem::keyReleaseEvent().
Loads the specified url and displays it.
Note: The view remains the same until enough data has arrived to display the new url.
See also setUrl(), url(), and urlChanged().
Loads a network request, request, using the method specified in operation.
body is optional and is only used for POST operations.
Note: The view remains the same until enough data has arrived to display the new url.
See also url() and urlChanged().
Reimplemented from QGraphicsItem::mouseDoubleClickEvent().
Reimplemented from QGraphicsItem::mouseMoveEvent().
Reimplemented from QGraphicsItem::mousePressEvent().
Reimplemented from QGraphicsItem::mouseReleaseEvent().
Returns a pointer to the underlying web page.
See also setPage().
Reimplemented from QGraphicsItem::paint().
Reloads the current document.
See also stop() and loadStarted().
Reimplemented from QGraphicsItem::sceneEvent().
Sets the content of the web graphicsitem to the specified content data. If the mimeType argument is empty it is currently assumed that the content is HTML but in future versions we may introduce auto-detection.
External objects referenced in the content are located relative to baseUrl.
The data is loaded immediately; external objects are loaded asynchronously.
See also load(), setHtml(), and QWebFrame::toHtml().
Reimplemented from QGraphicsLayoutItem::setGeometry().
Makes page the new web page of the web graphicsitem.
The parent QObject of the provided page remains the owner of the object. If the current document is a child of the web view, it will be deleted.
See also page().
Returns a pointer to the view/page specific settings object.
It is equivalent to
view->page()->settings();
See also QWebSettings::globalSettings().
Convenience slot that stops loading the document.
See also reload() and loadFinished().
Reimplemented from QGraphicsLayoutItem::updateGeometry().
Reimplemented from QGraphicsItem::wheelEvent().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.6.0 |