Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickpdfbookmarkmodel.cpp
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
"qquickpdfbookmarkmodel_p.h"
5
#
include
<
QLoggingCategory
>
6
7
QT_BEGIN_NAMESPACE
8
9
/*!
10
\qmltype PdfBookmarkModel
11
//! \nativetype QQuickPdfBookmarkModel
12
\inqmlmodule QtQuick.Pdf
13
\ingroup pdf
14
\brief A tree of links (anchors) within a PDF document, such as the table of contents.
15
\since 6.4
16
17
A PDF document can contain a hierarchy of link destinations, usually
18
representing the table of contents, to be shown in a sidebar in a PDF
19
viewer, so that the user can quickly jump to those locations in the
20
document. This QAbstractItemModel holds the information in a form
21
suitable for display with TreeView, ListView, QTreeView or QListView.
22
*/
23
24
QQuickPdfBookmarkModel::QQuickPdfBookmarkModel(QObject *parent)
25
: QPdfBookmarkModel(parent)
26
{
27
}
28
29
/*!
30
\internal
31
*/
32
QQuickPdfBookmarkModel::~QQuickPdfBookmarkModel() =
default
;
33
34
/*!
35
\qmlproperty PdfDocument PdfBookmarkModel::document
36
37
This property holds the PDF document in which bookmarks are to be found.
38
*/
39
QQuickPdfDocument *QQuickPdfBookmarkModel::document()
const
40
{
41
return
m_quickDocument;
42
}
43
44
void
QQuickPdfBookmarkModel::setDocument(QQuickPdfDocument *document)
45
{
46
if
(document == m_quickDocument)
47
return
;
48
m_quickDocument = document;
49
QPdfBookmarkModel::setDocument(document->document());
50
emit documentChanged();
51
}
52
53
QT_END_NAMESPACE
54
55
#
include
"moc_qquickpdfbookmarkmodel_p.cpp"
qtwebengine
src
pdfquick
qquickpdfbookmarkmodel.cpp
Generated on Thu Nov 14 2024 01:09:23 for Qt by
1.12.0