summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
blob: 83bc8ecdf3ff3b240c6fdcdaa000165e473698f9 (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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/*
    Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
    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
    \since 4.4
    \brief The QWebEngineHistoryItem class represents one item in the history of a QWebEnginePage

    \inmodule QtWebEngine

    Each QWebEngineHistoryItem 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.

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

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

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

/*!
    \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 icon(), url(), lastVisited()
*/

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

    \sa title(), icon(), url()
*/

/*!
    \fn QIcon QWebEngineHistoryItem::icon() const
    Returns the icon associated with the history item.

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

/*!
    \fn QVariant QWebEngineHistoryItem::userData() const
    \since 4.5
    Returns the user specific data that was stored with the history item.

    \sa setUserData()
*/

/*!
    \fn void QWebEngineHistoryItem::setUserData(const QVariant& userData)
    \since 4.5

    Stores user specific data \a userData with the history item.

    \note All copies of this item will be modified.

    \sa userData()
*/

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

/*!
    \class QWebEngineHistory
    \since 4.4
    \brief The QWebEngineHistory class represents the history of a QWebEnginePage

    \inmodule QtWebEngine

    Each QWebEnginePage instance contains a history of visited pages that can be accessed
    by QWebEnginePage::history(). QWebEngineHistory represents this history and makes it possible
    to navigate it.

    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, QWebEngineHistoryInterface, 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 true if there is an item preceding the current item in the history;
    otherwise returns false.

    \sa canGoForward()
*/

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

    \sa canGoBack()
*/

/*!
    \fn void QWebEngineHistory::back()
    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.

    \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; i.e., 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
    \since 4.5
    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 int QWebEngineHistory::maximumItemCount() const
    \since 4.5
    Returns the maximum number of items in the history.

    \sa setMaximumItemCount()
*/

/*!
    \fn void QWebEngineHistory::setMaximumItemCount(int count)
    \since 4.5
    Sets the maximum number of items in the history to \a count.

    \sa maximumItemCount()
*/

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

    \brief The operator<< function streams a history into a data stream.

    It saves the \a history into the specified \a stream.
*/


/*!
    \fn QDataStream& operator>>(QDataStream& source, QWebEngineHistory& history)
    \relates QWebEngineHistory
    \since 4.6

    \brief The operator>> function loads a history from a data stream.

    Loads a QWebEngineHistory from the specified \a stream into the given \a history.
*/