summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-10-07 12:37:54 +0200
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-10-07 12:27:10 +0000
commit62766a37505629c78917ad2bb9431f7051cbf0af (patch)
tree1e38395ecc86da0d8013f6cef301dfc904c946f6 /src
parent8318548b32134203a6a74029312da5cdff484a35 (diff)
Doc: add docs for WebEngineHistoryListModel type
Task-number: QTBUG-48596 Change-Id: Icda2dd21a198ba409e3cf8c53d9ff449f4675902 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/webengine/api/qquickwebenginehistory.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp
index 483fa86f9..175b52248 100644
--- a/src/webengine/api/qquickwebenginehistory.cpp
+++ b/src/webengine/api/qquickwebenginehistory.cpp
@@ -118,6 +118,26 @@ int QQuickWebEngineForwardHistoryListModelPrivate::offsetForIndex(int index) con
return index + 1;
}
+/*!
+ \qmltype WebEngineHistoryListModel
+ \instantiates QQuickWebEngineHistoryListModel
+ \inqmlmodule QtWebEngine 1.1
+ \since QtWebEngine 1.1
+
+ \brief A data model that represents the history of a web engine page.
+
+ The WebEngineHistoryListModel type exposes the \e title, \e url, and \e offset roles. The
+ \e title and \e url specify the title and URL of the visited page. The \e offset specifies
+ the position of the page in respect to the current page (0). A positive number indicates that
+ the page was visited after the current page, whereas a negative number indicates that the page
+ was visited before the current page.
+
+ This type is uncreatable, but it can be accessed by using the
+ \l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
+
+ \sa WebEngineHistory
+*/
+
QQuickWebEngineHistoryListModel::QQuickWebEngineHistoryListModel()
: QAbstractListModel()
{
@@ -191,12 +211,12 @@ QQuickWebEngineHistoryPrivate::~QQuickWebEngineHistoryPrivate()
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
- \brief Data models that represent the history of a web engine page.
+ \brief Provides data models that represent the history of a web engine page.
- The uncreatable WebEngineHistory type can be accessed by using the
+ The WebEngineHistory type can be accessed by using the
\l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
- The WebEngineHistory type provides the following data models:
+ The WebEngineHistory type providess the following WebEngineHistoryListModel data model objects:
\list
\li \c backItems, which contains the URLs of visited pages.
@@ -226,7 +246,7 @@ QQuickWebEngineHistoryPrivate::~QQuickWebEngineHistoryPrivate()
format of the list items. The appearance of each item of the list in the delegate can be defined
separately (it is not web engine specific).
- The model roles \c title and \c url specify the title and URL of the visited page. The \c offset
+ The model roles \e title and \e url specify the title and URL of the visited page. The \e offset
role specifies the position of the page in respect to the current page (0). A positive number
indicates that the page was visited after the current page, whereas a negative number indicates
that the page was visited before the current page.
@@ -242,6 +262,8 @@ QQuickWebEngineHistoryPrivate::~QQuickWebEngineHistoryPrivate()
\printuntil }
For the complete example, see \l{WebEngine Quick Nano Browser}.
+
+ \sa WebEngineHistoryListModel
*/
QQuickWebEngineHistory::QQuickWebEngineHistory(QQuickWebEngineViewPrivate *view)