/*
    Copyright (C) 2015 The Qt Company Ltd.
    Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.
*/

// The documentation in this file was imported from QtWebKit and is thus constrained
// by its LGPL license. Documentation written from scratch for new methods should be
// placed inline in the code as usual.

/*!
    \class QWebEngineHistoryItem
    \brief The QWebEngineHistoryItem class represents one item in the history of a web engine page.
    \since 5.4
    \inmodule QtWebEngineWidgets

    Each web engine history item represents an entry in the history stack of a web page,
    containing information about the page, its location, and the time when it was last visited.

    \sa QWebEngineHistory, QWebEnginePage::history()
*/

/*!
    \fn QWebEngineHistoryItem::QWebEngineHistoryItem(const QWebEngineHistoryItem &other)
    Constructs a history item from \a other. The new item and \a other
    will share their data, and modifying either this item or \a other will
    modify both instances.
*/

/*!
    \fn QWebEngineHistoryItem &QWebEngineHistoryItem::operator=(const QWebEngineHistoryItem &other)
    Assigns the \a other history item to this. This item and \a other
    will share their data, and modifying either this item or \a other will
    modify both instances.
*/

/*!
    \fn QWebEngineHistoryItem::~QWebEngineHistoryItem()
    Destroys the history item.
*/

/*!
    \fn QUrl QWebEngineHistoryItem::originalUrl() const
    Returns the original URL associated with the history item.

    \sa url()
*/

/*!
    \fn QUrl QWebEngineHistoryItem::url() const
    Returns the URL associated with the history item.

    \sa originalUrl(), title(), lastVisited()
*/

/*!
    \fn QString QWebEngineHistoryItem::title() const
    Returns the title of the page associated with the history item.

    \sa url(), lastVisited()
*/

/*!
    \fn QDateTime QWebEngineHistoryItem::lastVisited() const
    Returns the date and time when the page associated with the item was last visited.

    \sa title(), url()
*/

/*!
    \fn bool QWebEngineHistoryItem::isValid() const
    Returns whether this is a valid history item.
*/

/*!
    \class QWebEngineHistory
    \brief The QWebEngineHistory class represents the history of a web engine page.
    \since 5.4
    \inmodule QtWebEngineWidgets

    Each web engine page contains a history of visited pages that can be accessed
    by QWebEnginePage::history().

    The history uses the concept of a \e{current item}, dividing the pages visited
    into those that can be visited by navigating \e back and \e 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.

    QWebEngineHistory's state can be saved to a QDataStream using the >> operator and loaded
    by using the << operator.

    \sa QWebEngineHistoryItem, QWebEnginePage
*/

/*!
    \fn void QWebEngineHistory::clear()
    Clears the history.

    \sa count(), items()
*/

/*!
    \fn QList<QWebEngineHistoryItem> QWebEngineHistory::items() const
    Returns a list of all items currently in the history.

    \sa count(), clear()
*/

/*!
    \fn QList<QWebEngineHistoryItem> QWebEngineHistory::backItems(int maxItems) const
    Returns the list of items in the backwards history list.
    At most \a maxItems entries are returned.

    \sa forwardItems()
*/

/*!
    \fn QList<QWebEngineHistoryItem> QWebEngineHistory::forwardItems(int maxItems) const
    Returns the list of items in the forward history list.
    At most \a maxItems entries are returned.

    \sa backItems()
*/

/*!
    \fn bool QWebEngineHistory::canGoBack() const
    Returns \c true if there is an item preceding the current item in the history;
    otherwise returns \c false.

    \sa canGoForward()
*/

/*!
    \fn bool QWebEngineHistory::canGoForward() const
    Returns \c true if we have an item to go forward to; otherwise returns \c false.

    \sa canGoBack()
*/

/*!
    \fn void QWebEngineHistory::back()
    Sets the current item to be the previous item in the history and goes to the
    corresponding page; that is, goes back one history item.

    \sa forward(), goToItem()
*/

/*!
    \fn void QWebEngineHistory::forward()
    Sets the current item to be the next item in the history and goes to the
    corresponding page; that is, goes forward one history item.

    \sa back(), goToItem()
*/

/*!
    \fn void QWebEngineHistory::goToItem(const QWebEngineHistoryItem &item)
    Sets the current item to be the specified \a item in the history and goes to the page.

    \sa back(), forward()
*/

/*!
    \fn QWebEngineHistoryItem QWebEngineHistory::backItem() const
    Returns the item before the current item in the history.
*/

/*!
    \fn QWebEngineHistoryItem QWebEngineHistory::currentItem() const
    Returns the current item in the history.
*/

/*!
    \fn QWebEngineHistoryItem QWebEngineHistory::forwardItem() const
    Returns the item after the current item in the history.
*/

/*!
    \fn int QWebEngineHistory::currentItemIndex() const
    Returns the index of the current item in history.
*/

/*!
    \fn QWebEngineHistoryItem QWebEngineHistory::itemAt(int i) const
    Returns the item at index \a i in the history.
*/

/*!
    \fn int QWebEngineHistory::count() const
    Returns the total number of items in the history.
*/

/*!
    \fn QDataStream& operator<<(QDataStream& stream, const QWebEngineHistory& history)
    \relates QWebEngineHistory

    Saves the web engine history \a history into \a stream.
*/


/*!
    \fn QDataStream& operator>>(QDataStream& stream, QWebEngineHistory& history)
    \relates QWebEngineHistory

    Loads the web engine history from \a stream into \a history.
*/
