Warning, /frameworks/kirigami/examples/applicationitemapp/main.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
0008 import org.kde.kirigami as Kirigami
0009 
0010 Kirigami.ApplicationItem {
0011     id: root
0012 
0013     globalDrawer: Kirigami.GlobalDrawer {
0014         actions: [
0015             Kirigami.Action {
0016                 text: "View"
0017                 icon.name: "view-list-icons"
0018                 Kirigami.Action {
0019                     text: "action 1"
0020                 }
0021                 Kirigami.Action {
0022                     text: "action 2"
0023                 }
0024                 Kirigami.Action {
0025                     text: "action 3"
0026                 }
0027             },
0028             Kirigami.Action {
0029                 text: "action 3"
0030             },
0031             Kirigami.Action {
0032                 text: "action 4"
0033             }
0034         ]
0035         handleVisible: true
0036     }
0037     contextDrawer: Kirigami.ContextDrawer {
0038         id: contextDrawer
0039 
0040         actions: (pageStack.currentItem as Kirigami.Page)?.actions ?? []
0041     }
0042 
0043     pageStack.initialPage: mainPageComponent
0044 
0045     Component {
0046         id: mainPageComponent
0047         Kirigami.Page {
0048             title: "Hello"
0049             actions: [
0050                 Kirigami.Action {
0051                     text: "action 1"
0052                 },
0053                 Kirigami.Action {
0054                     text: "action 2"
0055                 }
0056             ]
0057             Rectangle {
0058                 color: "#aaff7f"
0059                 anchors.fill: parent
0060             }
0061         }
0062     }
0063 }