Warning, /frameworks/kirigami/examples/simpleexamples/pagePoolFirstColumn.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.15
0008 import org.kde.kirigami 2.20 as Kirigami
0009 
0010 Kirigami.ApplicationWindow {
0011     id: root
0012 
0013     Kirigami.PagePool {
0014         id: mainPagePool
0015     }
0016 
0017     globalDrawer: Kirigami.GlobalDrawer {
0018         title: "Hello App"
0019         titleIcon: "applications-graphics"
0020     }
0021     contextDrawer: Kirigami.ContextDrawer {
0022         id: contextDrawer
0023     }
0024 
0025     pageStack.initialPage: wideScreen ? [firstPage, mainPagePool.loadPage("SimplePage.qml")] : [firstPage]
0026 
0027     Component {
0028         id: firstPage
0029         Kirigami.ScrollablePage {
0030             id: root
0031             title: i18n("Sidebar")
0032             property list<Kirigami.PagePoolAction> pageActions: [
0033                 Kirigami.PagePoolAction {
0034                     text: i18n("Page1")
0035                     icon.name: "speedometer"
0036                     pagePool: mainPagePool
0037                     basePage: root
0038                     page: "SimplePage.qml"
0039                 },
0040                 Kirigami.PagePoolAction {
0041                     text: i18n("Page2")
0042                     icon.name: "window-duplicate"
0043                     pagePool: mainPagePool
0044                     basePage: root
0045                     page: "MultipleColumnsGallery.qml"
0046                 }
0047             ]
0048             ListView {
0049                 model: pageActions
0050                 keyNavigationEnabled: true
0051                 activeFocusOnTab: true
0052                 delegate: Kirigami.BasicListItem {
0053                     id: delegate
0054                     action: modelData
0055                 }
0056             }
0057         }
0058     }
0059 }