Warning, /graphics/okular/mobile/app/package/contents/ui/TableOfContents.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.15
0008 import QtQuick.Controls 2.15 as QQC2
0009 import QtQuick.Layouts 1.15
0010 import org.kde.kirigami 2.17 as Kirigami
0011 import org.kde.kitemmodels 1.0
0012 
0013 ColumnLayout {
0014     id: root
0015     Kirigami.AbstractApplicationHeader {
0016         topPadding: Kirigami.Units.smallSpacing / 2;
0017         bottomPadding: Kirigami.Units.smallSpacing / 2;
0018         rightPadding: Kirigami.Units.smallSpacing
0019         leftPadding: Kirigami.Units.smallSpacing
0020 
0021         width: root.width
0022         Kirigami.SearchField {
0023             id: searchField
0024             width: parent.width
0025         }
0026     }
0027     QQC2.ScrollView {
0028         Layout.fillWidth: true
0029         Layout.fillHeight: true
0030         ListView {
0031             model: KDescendantsProxyModel {
0032                 model: documentItem.tableOfContents
0033                 expandsByDefault: false
0034             }
0035 
0036             delegate: TreeItem {
0037                 text: model.display
0038                 onClicked: {
0039                     documentItem.currentPage = page - 1;
0040                     contextDrawer.drawerOpen = false;
0041                 }
0042             }
0043         }
0044     }
0045 }