QWebHistory Class Reference |
void | back () |
QWebHistoryItem | backItem () const |
QList<QWebHistoryItem> | backItems ( int maxItems ) const |
bool | canGoBack () const |
bool | canGoForward () const |
void | clear () |
int | count () const |
QWebHistoryItem | currentItem () const |
int | currentItemIndex () const |
void | forward () |
QWebHistoryItem | forwardItem () const |
QList<QWebHistoryItem> | forwardItems ( int maxItems ) const |
void | goToItem ( const QWebHistoryItem & item ) |
QWebHistoryItem | itemAt ( int i ) const |
QList<QWebHistoryItem> | items () const |
int | maximumItemCount () const |
void | setMaximumItemCount ( int count ) |
QDataStream & | operator<< ( QDataStream & stream, const QWebHistory & history ) |
QDataStream & | operator>> ( QDataStream & stream, QWebHistory & history ) |
The QWebHistory class represents the history of a QWebPage
Each QWebPage instance contains a history of visited pages that can be accessed by QWebPage::history(). QWebHistory represents this history and makes it possible to navigate it.
The history uses the concept of a current item, dividing the pages visited into those that can be visited by navigating back and forward using the back() and forward() functions. The current item can be obtained by calling currentItem(), and an arbitrary item in the history can be made the current item by passing it to goToItem().
A list of items describing the pages that can be visited by going back can be obtained by calling the backItems() function; similarly, items describing the pages ahead of the current page can be obtained with the forwardItems() function. The total list of items is obtained with the items() function.
Just as with containers, functions are available to examine the history in terms of a list. Arbitrary items in the history can be obtained with itemAt(), the total number of items is given by count(), and the history can be cleared with the clear() function.
QWebHistory's state can be saved to a QDataStream using the >> operator and loaded by using the << operator.
See also QWebHistoryItem, QWebHistoryInterface, and QWebPage.
Set the current item to be the previous item in the history and goes to the corresponding page; i.e., goes back one history item.
See also forward() and goToItem().
Returns the item before the current item in the history.
Returns the list of items in the backwards history list. At most maxItems entries are returned.
See also forwardItems().
Returns true if there is an item preceding the current item in the history; otherwise returns false.
See also canGoForward().
Returns true if we have an item to go forward to; otherwise returns false.
See also canGoBack().
Clears the history.
Returns the total number of items in the history.
Returns the current item in the history.
Returns the index of the current item in history.
This function was introduced in Qt 4.5.
Sets the current item to be the next item in the history and goes to the corresponding page; i.e., goes forward one history item.
See also back() and goToItem().
Returns the item after the current item in the history.
Returns the list of items in the forward history list. At most maxItems entries are returned.
See also backItems().
Sets the current item to be the specified item in the history and goes to the page.
See also back() and forward().
Returns the item at index i in the history.
Returns a list of all items currently in the history.
Returns the maximum number of items in the history.
This function was introduced in Qt 4.5.
See also setMaximumItemCount().
Sets the maximum number of items in the history to count.
This function was introduced in Qt 4.5.
See also maximumItemCount().
The operator<< function streams a history into a data stream.
It saves the history into the specified stream.
This function was introduced in Qt 4.6.
The operator>> function loads a history from a data stream.
Loads a QWebHistory from the specified stream into the given history.
This function was introduced in Qt 4.6.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6-snapshot | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com