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
|
/*
* SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.15
import org.kde.kirigami 2.20 as Kirigami
Kirigami.ApplicationWindow {
id: root
Kirigami.PagePool {
id: mainPagePool
}
globalDrawer: Kirigami.GlobalDrawer {
title: "Hello App"
titleIcon: "applications-graphics"
}
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
}
pageStack.initialPage: wideScreen ? [firstPage, mainPagePool.loadPage("SimplePage.qml")] : [firstPage]
Component {
id: firstPage
Kirigami.ScrollablePage {
id: root
title: i18n("Sidebar")
property list<Kirigami.PagePoolAction> pageActions: [
Kirigami.PagePoolAction {
text: i18n("Page1")
icon.name: "speedometer"
pagePool: mainPagePool
basePage: root
page: "SimplePage.qml"
},
Kirigami.PagePoolAction {
text: i18n("Page2")
icon.name: "window-duplicate"
pagePool: mainPagePool
basePage: root
page: "MultipleColumnsGallery.qml"
}
]
ListView {
model: pageActions
keyNavigationEnabled: true
activeFocusOnTab: true
delegate: Kirigami.BasicListItem {
id: delegate
action: modelData
}
}
}
}
}
|