summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
blob: 5e3ebecb1b29bf96fc65c99ac8e3ca617434d1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/*
    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.
*/