QWebHistoryItem Class Reference

#include <mw/QtWebKit/qwebhistory.h>

class QWebHistoryItem

The QWebHistoryItem class represents one item in the history of a QWebPage.

Public Member Functions
QWebHistoryItem(const QWebHistoryItem &)
~QWebHistoryItem()
QIcon icon()
boolisValid()
QDateTime lastVisited()
QWebHistoryItem &operator=(const QWebHistoryItem &)
QUrl originalUrl()
voidsetUserData(const QVariant &)
QString title()
QUrl url()
QVariant userData()

Detailed Description

Since
4.4 QtWebKit
Each QWebHistoryItem instance represents an entry in the history stack of a Web page, containing information about the page, its location, and when it was last visited.

The following table shows the properties of the page held by the history item, and the functions used to access them.

Function Description title() The page title. url() The location of the page. originalUrl() The URL used to access the page. lastVisited() The date and time of the user's last visit to the page. icon() The icon associated with the page that was provided by the server. userData() The user specific data that was stored with the history item.

Note:

QWebHistoryItem objects are value based, but {explicitly shared}. Changing a QWebHistoryItem instance by calling setUserData() will change all copies of that instance.

See also: QWebHistory, QWebPage::history(), QWebHistoryInterface

Constructor & Destructor Documentation

QWebHistoryItem ( const QWebHistoryItem & )

QWebHistoryItem(const QWebHistoryItem &other)

Constructs a history item from other. The new item and other will share their data, and modifying either this item or other will modify both instances.

~QWebHistoryItem ( )

~QWebHistoryItem()

Destroys the history item.

Member Function Documentation

icon ( )

QIcon icon()const

Returns the icon associated with the history item.

See also: title(), url(), lastVisited()

isValid ( )

boolisValid()const
Since
4.5 Returns whether this is a valid history item.

lastVisited ( )

QDateTime lastVisited()const

Returns the date and time that the page associated with the item was last visited.

See also: title(), icon(), url()

operator= ( const QWebHistoryItem & )

QWebHistoryItem &operator=(const QWebHistoryItem &other)

Assigns the other history item to this. This item and other will share their data, and modifying either this item or other will modify both instances.

originalUrl ( )

QUrl originalUrl()const

Returns the original URL associated with the history item.

See also: url()

setUserData ( const QVariant & )

voidsetUserData(const QVariant &userData)
Since
4.5
Stores user specific data userData with the history item.
Note:

All copies of this item will be modified.

See also: userData()

title ( )

QString title()const

Returns the title of the page associated with the history item.

See also: icon(), url(), lastVisited()

url ( )

QUrl url()const

Returns the URL associated with the history item.

See also: originalUrl(), title(), lastVisited()

userData ( )

QVariant userData()const
Since
4.5 Returns the user specific data that was stored with the history item.

See also: setUserData()